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

Loading...
Searching...
No Matches
CRM64Pro::SceneLayerObject
Scene module » Scene Layer base » Scene LayerObject

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.
void | setSpatialGridCellSize (Sint32 size)
| Set the spatial grid cell size.
bool | setSize (float width, float height)
| Set the logical size of the layer (in pixels).
void | setRenderOrderMode (eSceneObjectRenderOrder mode)
| 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 * > &results)
| Query objects whose AABB overlaps a region.
SceneObject * | getObjectByID (Sint32 iObjectID)
| 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 * > &out)
| Find all objects matching an exact type string.
void | findAllByName (const string &sName, vector< SceneObject * > &out)
| Find all objects matching an exact name string.
void | setOnTriggerEvent (SceneObject::SCENE_OnTriggerEvent fn, void *pUserData=nullptr)
| Set a layer-wide trigger event callback.
virtual float | getTotalWidth () const override
| Get layer total width in pixels.
virtual float | getTotalHeight () const override
| Get layer total height in pixels.
Public Member Functions inherited from CRM64Pro::SceneLayer
void | setOnUpdateCallback (SCENE_OnLayerCallback callback)
| Set the callback for update events.
void | setOnRenderCallback (SCENE_OnLayerCallback callback)
| Set the callback for render events.
SCENE_OnLayerCallback | getOnUpdateCallback () const
| Get the update callback.
SCENE_OnLayerCallback | getOnRenderCallback () const
| Get the render callback.

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