AnimEngine
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Scene Class Reference
Collaboration diagram for Scene:
Collaboration graph
[legend]

Public Member Functions

void pauseAll ()
 
void unpauseAll ()
 
void togglePauseAll ()
 
void addEntity (Entity *entity)
 
template<typename DynamicType = Entity*>
DynamicType findEntityByUUID (ent_uuid_t aId)
 
template<typename DynamicType = Entity*>
const DynamicType findConstEntityByUUID (ent_uuid_t aId) const
 
template<typename DynamicType = Entity*>
DynamicType findEntityByName (const std::string &aName)
 
template<typename DynamicType = Entity*>
const DynamicType findConstEntityByName (const std::string &aName) const
 

Public Attributes

bool mShouldExit = false
 
std::vector< BaseCameraEntity * > cameras
 
size_t mActiveCameraIndex = 0
 
AnimatorCollection animators
 
std::unordered_map< ent_uuid_t, Entity * > entities
 
Timeline mGlobalTime = Timeline(true)
 
Timeline mAnimationTime = Timeline(true)
 
Timeline mEffectTime = Timeline(true)
 
double mFrameTime = 0.0
 
double mStartTime = 0.0
 
double mEndTime = -1.0
 
std::string mSceneSpecialization
 
std::unordered_map< ent_uuid_t, Entity * > _all_entities
 

Protected Member Functions

void _traverse_entity_for_bookeeping (Entity *entity)
 

Member Function Documentation

◆ findConstEntityByName()

template<typename DynamicType >
const DynamicType Scene::findConstEntityByName ( const std::string &  aName) const

Find and return an Entity with matching name or nullptr if none is found. If multiple entities in the scene have the same name, only the first is returned and it may be non-deterministic as to which gets returned.

A template type parameter can be specified to narrow the lookup to a specific derived type of Entity* e.g. const SolidMeshEntity* mesh = findEntityByName<SolidMeshEntity*>("GemObject");

◆ findConstEntityByUUID()

template<typename DynamicType >
const DynamicType Scene::findConstEntityByUUID ( ent_uuid_t  aId) const

Find and return Entity with matching uuid as const pointer. Returns nullptr if none is found.

A template type parameter can be specified to narrow the lookup to a specific derived type of Entity* e.g. const SolidMeshEntity* mesh = findConstEntityByUUID<SolidMeshEntity*>(uuid);

◆ findEntityByName()

template<typename DynamicType >
DynamicType Scene::findEntityByName ( const std::string &  aName)

Find and return an Entity with matching name or nullptr if none is found. If multiple entities in the scen have the same name, only the first is returned and it may be non-deterministic as to which gets returned.

A template type parameter can be specified to narrow the lookup to a specific derived type of Entity* e.g. SolidMeshEntity* mesh = findEntityByName<SolidMeshEntity*>("GemObject");

◆ findEntityByUUID()

template<typename DynamicType >
DynamicType Scene::findEntityByUUID ( ent_uuid_t  aId)

Find and return Entity with matching uuid as pointer. Returns nullptr if none is found.

A template type parameter can be specified to narrow the lookup to a specific derived type of Entity* e.g. SolidMeshEntity* mesh = findEntityByUUID<SolidMeshEntity*>(uuid);


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