IScanTraceBackend
A trace the LiDAR scanner can cast shots against instead of the Jolt colliders. The Embree scan hierarchy is one, and it lives in an opt-in plugin (ScanHierarchy) so a game that does not enable it ships no Embree; with none registered the scanner stays on the Jolt batch path.
- Module
- Game
- Header
#include "PointCloud/ScanTraceBackend.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
virtual ~IScanTraceBackend() = default | ~IScanTraceBackend |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Build | Bakes the level's static geometry. |
void | Sync | Re-poses moving bodies and bone capsules. |
void | Prewarm | Build in three steps for a caller that must not stall a frame on it: Prewarm (any thread, touches no world) stands up what the build needs, BuildDeferred (game thread) gathers the level, FinishBuild (any thread) builds the hierarchy over what was gathered. |
void | BuildDeferred | |
void | FinishBuild | |
bool | IsAvailable | False when the backend could not build anything to trace against; the scanner then falls back to Jolt. |
uint32_t | Trace | |
std::shared_ptr<IAcousticGeometry> | CreateAcousticGeometry | The same geometry as something sound can be traced against, or null when the backend cannot offer it. |
Function details
~IScanTraceBackend
virtual ~IScanTraceBackend() = defaultBuild
virtual void Build(World& world) = 0Bakes the level's static geometry. Game thread, before the first shot.
Sync
virtual void Sync(World& world) = 0Re-poses moving bodies and bone capsules. Game thread, before a frame's shots.
Prewarm
virtual void Prewarm()Build in three steps for a caller that must not stall a frame on it: Prewarm (any thread, touches no world) stands up what the build needs, BuildDeferred (game thread) gathers the level, FinishBuild (any thread) builds the hierarchy over what was gathered. Nothing may trace the backend before FinishBuild returns. A backend that cannot split its build does all of it in BuildDeferred.
BuildDeferred
virtual void BuildDeferred(World& world)FinishBuild
virtual void FinishBuild()IsAvailable
virtual bool IsAvailable() const = 0False when the backend could not build anything to trace against; the scanner then falls back to Jolt.
Trace
virtual uint32_t Trace(const FLidarShot& shot, std::vector<FLidarHit>& outHits) = 0CreateAcousticGeometry
virtual std::shared_ptr<IAcousticGeometry> CreateAcousticGeometry()The same geometry as something sound can be traced against, or null when the backend cannot offer it. It reads the backend's current build: a later Build() replaces what it points at, so ask again after one.