class

FRenderSceneIndex

The scene's spatial half of the persistent render scene (ROADMAP §20.2.1 / A24): one FRenderSceneBvh entry per mesh render proxy, kept across frames.

Module
Game
Header
#include "Scene/RenderSceneIndex.h"
Namespace
Mowo

Change detection is a per-frame compare, not a dirty flag, because a missed change makes an object vanish from whatever trusts the index. Several writers set TransformComponent::worldMatrix without moving worldVersion (actor groups, merge, weapon attachment), so the index compares the world matrix itself, and a shape key over the meshes, their bounds and the piece offsets the gather draws with. Only an entry whose matrix or shape moved is refitted; the tree work is O(changed * depth).

A structural ECS change (the proxy list rebuilt) is diffed by entity id and ECS slot generation: survivors keep their tree entry, an id that came back in a new slot generation (an undo that restores a deleted UUID) is a new entry, and the rest are removed.

Entries whose drawn bounds are not known from the mesh — an enabled cloth or soft body (simulated, world space) and an enabled morph instance — stay out of the tree and are reported visible to every query. A skinned entry is bounded by its bind pose inflated the way the animation visibility test always was.

Public functions

ReturnsNameDescription
uint32_tSyncBrings the tree in line with the proxies; call after proxies.Sync(world).
uint32_tQueryVisibleOne flag per proxy (the order of FMeshRenderProxyCache::GetProxies at the last Sync): 1 when the entry's box is not wholly outside one of the planes or its bounds are unknown, 0 otherwise.
voidReset
const FRenderSceneBvh&GetBvh
FStatsGetStats

Function details

Sync

C++
uint32_t Sync(const World& world, const FMeshRenderProxyCache& proxies)

Brings the tree in line with the proxies; call after proxies.Sync(world). Returns the entries whose bounds changed (inserted, moved or re-shaped).

QueryVisible

C++
uint32_t QueryVisible(const Vec4 (&planes)[6], std::vector<uint8_t>& visibleByProxy) const

One flag per proxy (the order of FMeshRenderProxyCache::GetProxies at the last Sync): 1 when the entry's box is not wholly outside one of the planes or its bounds are unknown, 0 otherwise. Planes keep a*x + b*y + c*z + d >= 0. Returns the visible count.

Reset

C++
void Reset()

GetBvh

C++
const FRenderSceneBvh& GetBvh() const

GetStats

C++
FStats GetStats() const
Generated from Scene/RenderSceneIndex.h via game.json · Dec 5, 2026Version 1.1.0