| CRM64Pro GDK v0.19.0 A free cross-platform game development kit built on top of SDL 3.0

Loading...
Searching...
No Matches
CRM64Pro::SceneLayerObjectfinal
Scene modules » Scene Layer » Scene Layer Object

Object layer containing game objects with spatial partitioning. More...

## Detailed Description

Object layer containing game objects with spatial partitioning.

Inheritance diagram for CRM64Pro::SceneLayerObject:

## Public Member Functions
eSceneLayerType | getType () const override
| Get the layer type.
Sint32 | addObject (SceneObject *pObj)
| Add an object to this layer.
bool | closeObject (Sint32 id)
| Destroy an object by its ID.
bool | setSpatialGridCellSize (Sint32 iSize)
| Set the spatial grid cell size.
bool | setSize (float fWidth, float fHeight)
| Set the logical size of the layer (in pixels).
void | setRenderOrderMode (eSceneObjectRenderOrder eMode)
| Set object rendering order policy.
eSceneObjectRenderOrder | getRenderOrderMode () const
| Get object rendering order policy.
void | queryRegion (float fX, float fY, float fW, float fH, vector< SceneObject * > &vResults)
| Query objects whose AABB overlaps a region.
SceneObject * | getObjectByID (Sint32 idObject)
| Get object by Tiled ID.
Sint32 | getObjectCount ()
| Get number of objects in this layer.
SceneObject * | findFirstByType (const string &sType)
| Find first object matching an exact type string.
SceneObject * | findFirstByName (const string &sName)
| Find first object matching an exact name string.
void | findAllByType (const string &sType, vector< SceneObject * > &vResults)
| Find all objects matching an exact type string.
void | findAllByName (const string &sName, vector< SceneObject * > &vResults)
| Find all objects matching an exact name string.
void | setOnTriggerEvent (SceneObject::TriggerEventCallback fnCallback)
| Set a layer-wide trigger event callback.
float | getTotalWidth () const override
| Get layer total width in pixels.
float | getTotalHeight () const override
| Get layer total height in pixels.
Public Member Functions inherited from CRM64Pro::SceneLayer
void | setOnUpdateCallback (SceneLayerCallback fnCallback)
| Set the callback for update events.
void | setOnRenderCallback (SceneLayerCallback fnCallback)
| Set the callback for render events.
SceneLayerCallback | getOnUpdateCallback () const
| Get the update callback.
SceneLayerCallback | getOnRenderCallback () const
| Get the render callback.

## Protected Member Functions
Sint32 | update (Scene *pEngine, SceneLayerContext &rContext) override
| Update object layer logic.
Sint32 | render (Scene *pEngine, SceneLayerContext &rContext) override
| Render object layer content.