Open 3D Engine AzFramework API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::OctreeScene Class Reference

#include <OctreeSystemComponent.h>

Inherits AzFramework::IVisibilityScene.

Public Member Functions

 AZ_RTTI (OctreeScene, "{A88E4D86-11F1-4E3F-A91A-66DE99502B93}")
 
 AZ_CLASS_ALLOCATOR (OctreeScene, AZ::SystemAllocator)
 
 AZ_DISABLE_COPY_MOVE (OctreeScene)
 
 OctreeScene (const AZ::Name &sceneName)
 
const AZ::Name & GetName () const override
 
void InsertOrUpdateEntry (VisibilityEntry &entry) override
 
void RemoveEntry (VisibilityEntry &entry) override
 
void Enumerate (const AZ::Aabb &aabb, const IVisibilityScene::EnumerateCallback &callback) const override
 
void Enumerate (const AZ::Sphere &sphere, const IVisibilityScene::EnumerateCallback &callback) const override
 
void Enumerate (const AZ::Hemisphere &hemisphere, const IVisibilityScene::EnumerateCallback &callback) const override
 
void Enumerate (const AZ::Capsule &capsule, const IVisibilityScene::EnumerateCallback &callback) const override
 
void Enumerate (const AZ::Frustum &frustum, const IVisibilityScene::EnumerateCallback &callback) const override
 
void Enumerate (const AZ::Frustum &includeFrustum, const AZ::Frustum &excludeFrustum, const EnumerateCallback &callback) const override
 
void EnumerateNoCull (const IVisibilityScene::EnumerateCallback &callback) const override
 
uint32_t GetEntryCount () const override
 Return the number of VisibilityEntries that have been added to the system.
 
uint32_t GetNodeCount () const
 
uint32_t GetFreeNodeCount () const
 
uint32_t GetPageCount () const
 
uint32_t GetChildNodeCount () const
 
void DumpStats ()
 
- Public Member Functions inherited from AzFramework::IVisibilityScene
 AZ_RTTI (IVisibilityScene, "{822BC414-3CE3-40B4-A9A2-A42EA5B9499F}")
 

Friends

class OctreeNode
 

Additional Inherited Members

- Public Types inherited from AzFramework::IVisibilityScene
using EnumerateCallback = AZStd::function< void(const NodeData &)>
 

Detailed Description

Implementation of the visibility system interface. This uses a simple adaptive octree to support partitioning an object set for a specific scene and efficiently running gathers and visibility queries.

Member Function Documentation

◆ Enumerate() [1/6]

void AzFramework::OctreeScene::Enumerate ( const AZ::Aabb &  aabb,
const IVisibilityScene::EnumerateCallback &  callback 
) const
overridevirtual

Intersects an axis aligned bounding box against the visibility system.

Parameters
aabbthe axis aligned bounding box to test against
callbackthe callback to invoke when a node is visible

Implements AzFramework::IVisibilityScene.

◆ Enumerate() [2/6]

void AzFramework::OctreeScene::Enumerate ( const AZ::Capsule &  capsule,
const IVisibilityScene::EnumerateCallback &  callback 
) const
overridevirtual

Intersects a capsule against the visibility system.

Parameters
capsulethe capsule to test against
callbackthe callback to invoke when a node is visible

Implements AzFramework::IVisibilityScene.

◆ Enumerate() [3/6]

void AzFramework::OctreeScene::Enumerate ( const AZ::Frustum &  frustum,
const IVisibilityScene::EnumerateCallback &  callback 
) const
overridevirtual

Intersects a frustum against the visibility system.

Parameters
frustumthe frustum to test against
callbackthe callback to invoke when a node is visible

Implements AzFramework::IVisibilityScene.

◆ Enumerate() [4/6]

void AzFramework::OctreeScene::Enumerate ( const AZ::Frustum &  includeFrustum,
const AZ::Frustum &  excludeFrustum,
const EnumerateCallback &  callback 
) const
overridevirtual

Intersects a frustum against the visibility system, but rejects everything entirely contained inside the excludeFrustum. This is useful for cascade shadows where a larger cascade need not render things completely covered by a smaller cascade.

Parameters
includeFrustumthe frustum to test against for inclusion
excludeFrustumthe frustum to test against for exclusion
callbackthe callback to invoke when a node is visible

Implements AzFramework::IVisibilityScene.

◆ Enumerate() [5/6]

void AzFramework::OctreeScene::Enumerate ( const AZ::Hemisphere &  hemisphere,
const IVisibilityScene::EnumerateCallback &  callback 
) const
overridevirtual

Intersects a hemisphere against the visibility system.

Parameters
hemispherethe hemisphere to test against
callbackthe callback to invoke when a node is visible

Implements AzFramework::IVisibilityScene.

◆ Enumerate() [6/6]

void AzFramework::OctreeScene::Enumerate ( const AZ::Sphere &  sphere,
const IVisibilityScene::EnumerateCallback &  callback 
) const
overridevirtual

Intersects a sphere against the visibility system.

Parameters
spherethe sphere to test against
callbackthe callback to invoke when a node is visible

Implements AzFramework::IVisibilityScene.

◆ EnumerateNoCull()

void AzFramework::OctreeScene::EnumerateNoCull ( const IVisibilityScene::EnumerateCallback &  callback) const
overridevirtual

Enumerate all OctreeNodes that have any entries in them (without any culling).

Parameters
callbackthe callback to invoke when a node is visible

Implements AzFramework::IVisibilityScene.

◆ GetName()

const AZ::Name& AzFramework::OctreeScene::GetName ( ) const
overridevirtual

◆ GetNodeCount()

uint32_t AzFramework::OctreeScene::GetNodeCount ( ) const

Stats

◆ InsertOrUpdateEntry()

void AzFramework::OctreeScene::InsertOrUpdateEntry ( VisibilityEntry visibilityEntry)
overridevirtual

Insert or update an entry within the visibility system. This encompasses the following three scenarios:

Parameters
visibilityEntrydata for the object being added/updated

Implements AzFramework::IVisibilityScene.

◆ RemoveEntry()

void AzFramework::OctreeScene::RemoveEntry ( VisibilityEntry visibilityEntry)
overridevirtual

Removes an entry from the visibility system.

Parameters
visibilityEntrydata for the object being removed

Implements AzFramework::IVisibilityScene.


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