#include <GameEntityManager.h>
◆ GameEntityVecVec
◆ GameEntityManager()
◆ ~GameEntityManager()
Demo::GameEntityManager::~GameEntityManager |
( |
| ) |
|
◆ _notifyGameEntitiesRemoved()
void Demo::GameEntityManager::_notifyGameEntitiesRemoved |
( |
size_t |
slot | ) |
|
◆ addGameEntity()
GameEntity * Demo::GameEntityManager::addGameEntity |
( |
Ogre::SceneMemoryMgrTypes |
type, |
|
|
const MovableObjectDefinition * |
moDefinition, |
|
|
const Ogre::Vector3 & |
initialPos, |
|
|
const Ogre::Quaternion & |
initialRot, |
|
|
const Ogre::Vector3 & |
initialScale |
|
) |
| |
Creates a GameEntity, adding it to the world, and scheduling for the Graphics thread to create the appropiate SceneNode and Item pointers.
MUST BE CALLED FROM LOGIC THREAD.
- Parameters
-
type | Whether this GameEntity is dynamic (going to change transform frequently), or static (will move/rotate/scale very, very infrequently) |
initialPos | Starting position of the GameEntity |
initialRot | Starting orientation of the GameEntity |
initialScale | Starting scale of the GameEntity |
- Returns
- Pointer of GameEntity ready to be used by the Logic thread. Take in mind not all of its pointers may filled yet (the ones that are not meant to be used by the logic thread)
◆ finishFrameParallel()
void Demo::GameEntityManager::finishFrameParallel |
( |
void |
| ) |
|
Must be called every frame from the LOGIC THREAD.
◆ removeGameEntity()
void Demo::GameEntityManager::removeGameEntity |
( |
GameEntity * |
toRemove | ) |
|
Removes the GameEntity from the world.
The pointer is not immediately destroyed, we first need to release data in other threads (i.e. Graphics). It will be destroyed after the Render thread confirms it is done with it (via a Mq::GAME_ENTITY_SCHEDULED_FOR_REMOVAL_SLOT message)
The documentation for this class was generated from the following files: