Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CEntityManager Class Reference

This object class manages all entities within a scene. More...

#include <Entity/CEntityManager.h>

Public Member Functions

void update ()
void render ()
void renderEmission ()
void cullingAndRender ()
void registerCallback (IEntityManagerCallback *callback)
void unRegisterCallback (IEntityManagerCallback *callback)
void setCamera (CCamera *camera)
CCameragetCamera ()
void setRenderPipeline (IRenderPipeline *p)
IRenderPipelinegetRenderPipeline ()
CEntitycreateEntity ()
CEntity ** createEntity (int num, core::array< CEntity * > &entities)
void releaseAllEntities ()
void releaseAllSystems ()
void releaseAllGroups ()
int getNumEntities ()
CEntitygetEntity (int index)
CEntity ** getEntities ()
CEntitygetEntityByID (const char *id)
void removeEntity (int index)
void removeEntity (CEntity *entity)
void updateRemoveEntity ()
template<class T>
T * addSystem ()
template<class T>
T * addRenderSystem ()
template<class T>
T * getSystem ()
template<class T>
T * getRenderSystem ()
bool removeSystem (IEntitySystem *system)
void addTransformDataToEntity (CEntity *entity, CTransform *transform)
void updateEntityParent (CEntity *entity)
CEntityGroupaddCustomGroup (CEntityGroup *group)
CEntityGroupcreateGroupFromVisible (const u32 *types, int count)
CEntityGroupcreateGroup (const u32 *types, int count)
CEntityGroupcreateGroup (const u32 *types, int count, CEntityGroup *parent)
CEntityGroupfindGroup (const u32 *types, int count)
void removeGroup (CEntityGroup *group)
void removeAllGroup ()
void notifyUpdateSortEntities ()
void notifyUpdateGroup (u32 dataType)
void notifySystemOrderChanged ()
void notifyRendererOrderChanged ()

Protected Member Functions

int getDepth (CWorldTransformData *t)
void sortAliveEntities ()
void initDefaultData (CEntity *entity)
void sortRenderer ()
void sortSystem ()

Protected Attributes

core::array< CEntity * > m_alives
core::array< CEntity * > m_entities
core::array< CEntity * > m_unused
core::array< CEntity * > m_delayRemove
core::array< CEntityGroup * > m_groups
CFastArray< CEntity * > m_sortDepth [MAX_ENTITY_DEPTH]
std::vector< IEntitySystem * > m_systems
std::vector< IRenderSystem * > m_renders
std::vector< IEntitySystem * > m_sortUpdate
std::vector< IRenderSystem * > m_sortRender
std::vector< IEntityManagerCallback * > m_callbacks
bool m_systemChanged
bool m_rendererChanged
bool m_needSortEntities
CCameram_camera
IRenderPipelinem_renderPipeline

Detailed Description

This object class manages all entities within a scene.

When a scene is created, it will generate a CEntityManager object A scene's data, including models, coordinates, and more, will be stored within IEntityData, CEntity objects and managed by the CEntityManager.

CScene* scene = new CScene();
CEntityManager* entityMgr = scene->getEntityManager()
This object class manages all other objects, it represents the data of a scene.
Definition CScene.h:103
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CIndexBuffer.h:13
See also
CEntity, CEntityGroup

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