Plasma Engine  2.0
Loading...
Searching...
No Matches
plSpatialSystem Class Referenceabstract
Inheritance diagram for plSpatialSystem:

Classes

struct  QueryParams
 

Public Member Functions

virtual void StartNewFrame ()
 
Spatial Data Functions
virtual plSpatialDataHandle CreateSpatialData (const plSimdBBoxSphere &bounds, plGameObject *pObject, plUInt32 uiCategoryBitmask, const plTagSet &tags)=0
 
virtual plSpatialDataHandle CreateSpatialDataAlwaysVisible (plGameObject *pObject, plUInt32 uiCategoryBitmask, const plTagSet &tags)=0
 
virtual void DeleteSpatialData (const plSpatialDataHandle &hData)=0
 
virtual void UpdateSpatialDataBounds (const plSpatialDataHandle &hData, const plSimdBBoxSphere &bounds)=0
 
virtual void UpdateSpatialDataObject (const plSpatialDataHandle &hData, plGameObject *pObject)=0
 
- Public Member Functions inherited from plReflectedClass
virtual const plRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const plRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
PL_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Protected Attributes

plProxyAllocator m_Allocator
 
plUInt64 m_uiFrameCounter = 0
 

Simple Queries

using QueryCallback = plDelegate<plVisitorExecution::Enum(plGameObject*)>
 
virtual void FindObjectsInSphere (const plBoundingSphere &sphere, const QueryParams &queryParams, plDynamicArray< plGameObject * > &out_objects) const
 
virtual void FindObjectsInSphere (const plBoundingSphere &sphere, const QueryParams &queryParams, QueryCallback callback) const =0
 
virtual void FindObjectsInBox (const plBoundingBox &box, const QueryParams &queryParams, plDynamicArray< plGameObject * > &out_objects) const
 
virtual void FindObjectsInBox (const plBoundingBox &box, const QueryParams &queryParams, QueryCallback callback) const =0
 

Visibility Queries

using IsOccludedFunc = plDelegate<bool(const plSimdBBox&)>
 
virtual void FindVisibleObjects (const plFrustum &frustum, const QueryParams &queryParams, plDynamicArray< const plGameObject * > &out_objects, IsOccludedFunc isOccluded, plVisibilityState visType) const =0
 
virtual plVisibilityState GetVisibilityState (const plSpatialDataHandle &hData, plUInt32 uiNumFramesBeforeInvisible) const =0
 Retrieves a state describing how visible the object is.
 

Additional Inherited Members

- Static Public Member Functions inherited from plNoBase
static const plRTTIGetStaticRTTI ()
 

Member Function Documentation

◆ GetVisibilityState()

virtual plVisibilityState plSpatialSystem::GetVisibilityState ( const plSpatialDataHandle & hData,
plUInt32 uiNumFramesBeforeInvisible ) const
pure virtual

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.

Implemented in plSpatialSystem_RegularGrid.


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