Rebel Fork Framework
Urho3D::DefaultBakedSceneCollector Class Reference

Standard scene collector for light baking. More...

#include <Urho3D/Glow/BakedSceneCollector.h>

Inheritance diagram for Urho3D::DefaultBakedSceneCollector:
Urho3D::BakedSceneCollector

Classes

struct  ChunkData
 Chunk data. More...
 

Public Member Functions

void LockScene (Scene *scene, const Vector3 &chunkSize) override
 
ea::vector< IntVector3GetChunks () override
 Return all scene chunks.
 
BakedSceneBackgroundArrayPtr GetBackgrounds () override
 Return all scene backgrounds. [0] is expected to be pitch-black background.
 
ea::vector< Component * > GetUniqueGeometries (const IntVector3 &chunkIndex) override
 Return unique geometries within chunk.
 
void CommitGeometries (const IntVector3 &chunkIndex) override
 Called when geometries were changed externally.
 
ea::vector< LightProbeGroup * > GetUniqueLightProbeGroups (const IntVector3 &chunkIndex) override
 Return unique light probe groups within chunk. Order of groups must stay the same for each call.
 
ZoneGetLightProbeGroupZone (const IntVector3 &chunkIndex, LightProbeGroup *lightProbeGroup) override
 Return zone that corresponds to light probe group within chunk.
 
unsigned GetZoneBackground (const IntVector3 &chunkIndex, Zone *zone) override
 Return background index for zone within chunk.
 
BoundingBox GetChunkBoundingBox (const IntVector3 &chunkIndex) override
 Return bounding box of unique nodes of the chunk.
 
ea::vector< Light * > GetLightsInBoundingBox (const IntVector3 &chunkIndex, const BoundingBox &boundingBox) override
 Return lights intersecting given volume.
 
ea::vector< Component * > GetGeometriesInBoundingBox (const IntVector3 &chunkIndex, const BoundingBox &boundingBox) override
 Return geometries intersecting given volume.
 
ea::vector< LightProbeGroup * > GetLightProbeGroupsInBoundingBox (const IntVector3 &chunkIndex, const BoundingBox &boundingBox) override
 Return light probe groups intersecting given volume.
 
ea::vector< Component * > GetGeometriesInFrustum (const IntVector3 &chunkIndex, const Frustum &frustum) override
 Return geometries intersecting given frustum. The frustum is guaranteed to contain specified chunk.
 
void UnlockScene () override
 Called after everything else. Scene objects must stay unchanged until this call.
 
- Public Member Functions inherited from Urho3D::BakedSceneCollector
virtual ~BakedSceneCollector ()
 Destruct.
 

Private Member Functions

ea::vector< Component * > CollectGeometriesFromDrawables (const ea::vector< Drawable * > drawables)
 Filter drawables and return relevant components.
 

Private Attributes

Scenescene_ {}
 Scene.
 
Vector3 chunkSize_
 Chunk size.
 
BoundingBox boundingBox_
 Bounding box of the scene.
 
IntVector3 chunkGridDimension_
 Dimensions of chunk grid.
 
Octreeoctree_ {}
 Scene Octree.
 
ea::unordered_map< IntVector3, ChunkDatachunks_
 
ea::vector< LightProbeGroup * > lightProbeGroups_
 
ea::vector< Zone * > zones_
 
BakedSceneBackgroundArrayPtr backgrounds_
 
ea::unordered_map< Zone *, unsigned > zoneToBackgroundMap_
 

Detailed Description

Standard scene collector for light baking.

Member Function Documentation

◆ CommitGeometries()

void Urho3D::DefaultBakedSceneCollector::CommitGeometries ( const IntVector3 chunkIndex)
overridevirtual

Called when geometries were changed externally.

Implements Urho3D::BakedSceneCollector.

◆ GetBackgrounds()

BakedSceneBackgroundArrayPtr Urho3D::DefaultBakedSceneCollector::GetBackgrounds ( )
overridevirtual

Return all scene backgrounds. [0] is expected to be pitch-black background.

Implements Urho3D::BakedSceneCollector.

◆ GetChunkBoundingBox()

BoundingBox Urho3D::DefaultBakedSceneCollector::GetChunkBoundingBox ( const IntVector3 chunkIndex)
overridevirtual

Return bounding box of unique nodes of the chunk.

Implements Urho3D::BakedSceneCollector.

◆ GetChunks()

ea::vector< IntVector3 > Urho3D::DefaultBakedSceneCollector::GetChunks ( )
overridevirtual

Return all scene chunks.

Implements Urho3D::BakedSceneCollector.

◆ GetGeometriesInBoundingBox()

ea::vector< Component * > Urho3D::DefaultBakedSceneCollector::GetGeometriesInBoundingBox ( const IntVector3 chunkIndex,
const BoundingBox boundingBox 
)
overridevirtual

Return geometries intersecting given volume.

Implements Urho3D::BakedSceneCollector.

◆ GetGeometriesInFrustum()

ea::vector< Component * > Urho3D::DefaultBakedSceneCollector::GetGeometriesInFrustum ( const IntVector3 chunkIndex,
const Frustum frustum 
)
overridevirtual

Return geometries intersecting given frustum. The frustum is guaranteed to contain specified chunk.

Implements Urho3D::BakedSceneCollector.

◆ GetLightProbeGroupsInBoundingBox()

ea::vector< LightProbeGroup * > Urho3D::DefaultBakedSceneCollector::GetLightProbeGroupsInBoundingBox ( const IntVector3 chunkIndex,
const BoundingBox boundingBox 
)
overridevirtual

Return light probe groups intersecting given volume.

Implements Urho3D::BakedSceneCollector.

◆ GetLightProbeGroupZone()

Zone * Urho3D::DefaultBakedSceneCollector::GetLightProbeGroupZone ( const IntVector3 chunkIndex,
LightProbeGroup lightProbeGroup 
)
overridevirtual

Return zone that corresponds to light probe group within chunk.

Implements Urho3D::BakedSceneCollector.

◆ GetLightsInBoundingBox()

ea::vector< Light * > Urho3D::DefaultBakedSceneCollector::GetLightsInBoundingBox ( const IntVector3 chunkIndex,
const BoundingBox boundingBox 
)
overridevirtual

Return lights intersecting given volume.

Implements Urho3D::BakedSceneCollector.

◆ GetUniqueGeometries()

ea::vector< Component * > Urho3D::DefaultBakedSceneCollector::GetUniqueGeometries ( const IntVector3 chunkIndex)
overridevirtual

Return unique geometries within chunk.

Implements Urho3D::BakedSceneCollector.

◆ GetUniqueLightProbeGroups()

ea::vector< LightProbeGroup * > Urho3D::DefaultBakedSceneCollector::GetUniqueLightProbeGroups ( const IntVector3 chunkIndex)
overridevirtual

Return unique light probe groups within chunk. Order of groups must stay the same for each call.

Implements Urho3D::BakedSceneCollector.

◆ GetZoneBackground()

unsigned Urho3D::DefaultBakedSceneCollector::GetZoneBackground ( const IntVector3 chunkIndex,
Zone zone 
)
overridevirtual

Return background index for zone within chunk.

Implements Urho3D::BakedSceneCollector.

◆ LockScene()

void Urho3D::DefaultBakedSceneCollector::LockScene ( Scene scene,
const Vector3 chunkSize 
)
overridevirtual

◆ UnlockScene()

void Urho3D::DefaultBakedSceneCollector::UnlockScene ( )
overridevirtual

Called after everything else. Scene objects must stay unchanged until this call.

Implements Urho3D::BakedSceneCollector.

Member Data Documentation

◆ backgrounds_

BakedSceneBackgroundArrayPtr Urho3D::DefaultBakedSceneCollector::backgrounds_
private

Baking backgrounds

◆ chunks_

ea::unordered_map<IntVector3, ChunkData> Urho3D::DefaultBakedSceneCollector::chunks_
private

All relevant objects within scene


The documentation for this class was generated from the following files: