class

FLidarScanService

The scan loop between a scanner and the clouds. Every machine holds its OWN cloud (what this player scanned, owner slot 0) and a SHARED cloud (what the others scanned, re-traced locally from their shots, tinted by a per-player slot 1..7) — and nothing else: there is no global cloud on any machine, the host included. Shots, not points, cross the network: a shot fired in a session goes out through FNetSession::ReportLidarShot, which applies it here at once and relays it to everyone, whose services re-trace it into their shared cloud.

Module
Game
Header
#include "PointCloud/LidarScanService.h"
Namespace
Mowo

Type aliases

AliasDescription
using TraceFn = std::function<uint32_t(const FLidarShot&, std::vector<FLidarHit>&)>
using FScanGateFn = bool (*)(World& world, EntityID scanner)Whether scanner may fire this frame. The engine knows nothing about what occupies a player's hands; a gameplay plugin installs the rule (the carry system refuses while a Medium or heavier object is held) and the scanner system asks before every shot. No gate = every scanner fires.

Constructors

SignatureNameDescription
FLidarScanService() = defaultFLidarScanService
~FLidarScanService()~FLidarScanService
FLidarScanService(const FLidarScanService&) = deleteFLidarScanService

Public functions

ReturnsNameDescription
FLidarScanService&operator=
voidAttachFinds or creates the two cloud entities ("ScanCloud.Own" and "ScanCloud.Shared") and takes over the session's shot delegate.
voidDetach
boolIsAttached
voidFireA shot from this machine's player.
voidApplyNetShotA shot the session delivered: this player's own (the local echo) goes to the own cloud, anyone else's to the shared cloud under their slot.
uint8_tOwnerSlotForStable per session: the first other player seen gets slot 1, the next 2, and so on round to 7.
voidTickAdvances every Fill wave still spreading, releasing the hits the front has reached.
uint32_tGetActiveWaveCount
FPointCloudAccumulator*GetOwnCloud
FPointCloudAccumulator*GetSharedCloud
EntityIDGetOwnCloudEntity
EntityIDGetSharedCloudEntity
uint32_tGetShotsApplied
FNetLidarShotToNet
FLidarShotFromNet
voidSetScanGate
FScanGateFnGetScanGate
boolIsScanAllowed

Function details

FLidarScanService

C++
FLidarScanService() = default

~FLidarScanService

C++
~FLidarScanService()

FLidarScanService

C++
FLidarScanService(const FLidarScanService&) = delete

operator=

C++
FLidarScanService& operator=(const FLidarScanService&) = delete

Attach

C++
void Attach(Scene& scene, const FLidarScanConfig& config, TraceFn trace)

Finds or creates the two cloud entities ("ScanCloud.Own" and "ScanCloud.Shared") and takes over the session's shot delegate.

Detach

C++
void Detach()

IsAttached

C++
bool IsAttached() const

Fire

C++
void Fire(const FLidarShot& shot)

A shot from this machine's player. In a session it is reported and comes back through ApplyNetShot; outside one it is applied directly.

ApplyNetShot

C++
void ApplyNetShot(const FNetLidarShot& shot)

A shot the session delivered: this player's own (the local echo) goes to the own cloud, anyone else's to the shared cloud under their slot.

OwnerSlotFor

C++
uint8_t OwnerSlotFor(uint32_t shooterPlayerId)

Stable per session: the first other player seen gets slot 1, the next 2, and so on round to 7. Player ids are never reused and run past 7, so the slot is a mapping, not the id.

Tick

C++
void Tick(float deltaSeconds)

Advances every Fill wave still spreading, releasing the hits the front has reached. The scanner system calls it every frame.

GetActiveWaveCount

C++
uint32_t GetActiveWaveCount() const

GetOwnCloud

C++
FPointCloudAccumulator* GetOwnCloud() const

GetSharedCloud

C++
FPointCloudAccumulator* GetSharedCloud() const

GetOwnCloudEntity

C++
EntityID GetOwnCloudEntity() const

GetSharedCloudEntity

C++
EntityID GetSharedCloudEntity() const

GetShotsApplied

C++
uint32_t GetShotsApplied() const

ToNet

C++
static FNetLidarShot ToNet(const FLidarShot& shot)

FromNet

C++
static FLidarShot FromNet(const FNetLidarShot& shot)

SetScanGate

C++
static void SetScanGate(FScanGateFn gate)

GetScanGate

C++
static FScanGateFn GetScanGate()

IsScanAllowed

C++
static bool IsScanAllowed(World& world, EntityID scanner)
Generated from PointCloud/LidarScanService.h via game.json · Nov 5, 2026Version 1.0.0