FScanBvhWorld
The level's triangles gathered into an FScanBvhScene: every enabled mesh renderer, static bodies into the static hierarchy once, moving bodies and one tessellated capsule per animated bone into the dynamic hierarchy on each Sync. Pure CPU data — the GPU mesh's CPU copy, the same bytes whichever RHI loaded it — so a D3D12 client and a Vulkan client build the same scene.
- Module
- Game
- Header
#include "PointCloud/ScanBvhWorld.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
FScanBvhWorld() | FScanBvhWorld | |
~FScanBvhWorld() | ~FScanBvhWorld |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Build | |
void | Sync | |
void | Gather | Build split for a caller that builds off the game thread: Gather reads the world (game thread) and only notes each static mesh with its transform; BuildStatic copies their triangles in and builds the hierarchy, touching nothing else. |
void | BuildStatic | |
bool | IsAvailable | |
const FScanBvhScene& | Scene | |
FScanBvhScene& | Scene | |
uint32_t | DynamicMeshCount | |
uint32_t | CapsuleCount | |
void | TessellateCapsule | A capsule along +Y, centred on the origin, as triangles. |
Function details
FScanBvhWorld
FScanBvhWorld()~FScanBvhWorld
~FScanBvhWorld()Build
void Build(World& world, const FScanBvhRuleFn& rules = {})Sync
void Sync(World& world, const FScanBvhRuleFn& rules = {})Gather
void Gather(World& world, const FScanBvhRuleFn& rules = {})Build split for a caller that builds off the game thread: Gather reads the world (game thread) and only notes each static mesh with its transform; BuildStatic copies their triangles in and builds the hierarchy, touching nothing else. The copy is the costly part: done in Gather it held the game thread 5 s when Play started on the Intel Sponza.
BuildStatic
void BuildStatic()IsAvailable
bool IsAvailable() constScene
const FScanBvhScene& Scene() constScene
FScanBvhScene& Scene()DynamicMeshCount
uint32_t DynamicMeshCount() constCapsuleCount
uint32_t CapsuleCount() constTessellateCapsule
static void TessellateCapsule(float radius, float halfHeight, uint32_t segments, uint32_t rings, std::vector<Vec3>& outPositions, std::vector<uint32_t>& outIndices)A capsule along +Y, centred on the origin, as triangles. Public so the determinism row can tessellate one without a skeleton.