ezEngine Release 25.08
Loading...
Searching...
No Matches
ezSpatialSystem_RegularGrid Class Reference
Inheritance diagram for ezSpatialSystem_RegularGrid:

Public Member Functions

 ezSpatialSystem_RegularGrid (ezUInt32 uiCellSize=128)
 
ezResult GetCellBoxForSpatialData (const ezSpatialDataHandle &hData, ezBoundingBox &out_boundingBox) const
 Returns the bounding box of the cell associated with the given spatial data. Useful for debug visualizations.
 
void GetAllCellBoxes (ezDynamicArray< ezBoundingBox > &out_boundingBoxes, ezSpatialData::Category filterCategory=ezInvalidSpatialDataCategory) const
 Returns bounding boxes of all existing cells.
 
template<typename Functor >
EZ_FORCE_INLINE void ForEachGrid (const Data &data, const ezSpatialDataHandle &hData, Functor func) const
 
- Public Member Functions inherited from ezSpatialSystem
virtual void FindObjectsInSphere (const ezBoundingSphere &sphere, const QueryParams &queryParams, ezDynamicArray< ezGameObject * > &out_objects) const
 
virtual void FindObjectsInBox (const ezBoundingBox &box, const QueryParams &queryParams, ezDynamicArray< ezGameObject * > &out_objects) const
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Private Member Functions

ezVisibilityState::Enum GetVisibilityState (const ezSpatialDataHandle &hData, ezUInt32 uiNumFramesBeforeInvisible) const override
 Retrieves a state describing how visible the object is.
 

Additional Inherited Members

- Public Types inherited from ezSpatialSystem
using QueryCallback = ezDelegate< ezVisitorExecution::Enum(ezGameObject *)>
 
using IsOccludedFunc = ezDelegate< bool(const ezSimdBBox &)>
 
- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 
- Protected Attributes inherited from ezSpatialSystem
ezProxyAllocator m_Allocator
 
ezUInt64 m_uiFrameCounter = 0
 

Member Function Documentation

◆ CreateSpatialData()

ezSpatialDataHandle ezSpatialSystem_RegularGrid::CreateSpatialData ( const ezSimdBBoxSphere bounds,
ezGameObject pObject,
ezUInt32  uiCategoryBitmask,
const ezTagSet tags 
)
overrideprivatevirtual

Implements ezSpatialSystem.

◆ CreateSpatialDataAlwaysVisible()

ezSpatialDataHandle ezSpatialSystem_RegularGrid::CreateSpatialDataAlwaysVisible ( ezGameObject pObject,
ezUInt32  uiCategoryBitmask,
const ezTagSet tags 
)
overrideprivatevirtual

Implements ezSpatialSystem.

◆ DeleteSpatialData()

void ezSpatialSystem_RegularGrid::DeleteSpatialData ( const ezSpatialDataHandle hData)
overrideprivatevirtual

Implements ezSpatialSystem.

◆ FindObjectsInBox()

void ezSpatialSystem_RegularGrid::FindObjectsInBox ( const ezBoundingBox box,
const QueryParams queryParams,
QueryCallback  callback 
) const
overrideprivatevirtual

Implements ezSpatialSystem.

◆ FindObjectsInSphere()

void ezSpatialSystem_RegularGrid::FindObjectsInSphere ( const ezBoundingSphere sphere,
const QueryParams queryParams,
QueryCallback  callback 
) const
overrideprivatevirtual

Implements ezSpatialSystem.

◆ FindVisibleObjects()

void ezSpatialSystem_RegularGrid::FindVisibleObjects ( const ezFrustum frustum,
const QueryParams queryParams,
ezDynamicArray< const ezGameObject * > &  out_Objects,
ezSpatialSystem::IsOccludedFunc  IsOccluded,
ezVisibilityState::Enum  visType 
) const
overrideprivatevirtual

Implements ezSpatialSystem.

◆ GetVisibilityState()

ezVisibilityState::Enum ezSpatialSystem_RegularGrid::GetVisibilityState ( const ezSpatialDataHandle hData,
ezUInt32  uiNumFramesBeforeInvisible 
) const
overrideprivatevirtual

Retrieves a state describing how visible the object is.

An object may be invisible, fully visible, or indirectly visible (through shadows or reflections).

Parameters
uiNumFramesBeforeInvisibleUsed to treat an object that was visible and just became invisible as visible for a few more frames.

Implements ezSpatialSystem.

◆ StartNewFrame()

void ezSpatialSystem_RegularGrid::StartNewFrame ( )
overrideprivatevirtual

Reimplemented from ezSpatialSystem.

◆ UpdateSpatialDataBounds()

void ezSpatialSystem_RegularGrid::UpdateSpatialDataBounds ( const ezSpatialDataHandle hData,
const ezSimdBBoxSphere bounds 
)
overrideprivatevirtual

Implements ezSpatialSystem.

◆ UpdateSpatialDataObject()

void ezSpatialSystem_RegularGrid::UpdateSpatialDataObject ( const ezSpatialDataHandle hData,
ezGameObject pObject 
)
overrideprivatevirtual

Implements ezSpatialSystem.


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