 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
2 #ifndef _Demo_GameEntityManager_H_
3 #define _Demo_GameEntityManager_H_
31 Region(
size_t _slotOffset,
size_t _count,
size_t _bufferIdx ) :
32 slotOffset( _slotOffset ),
34 bufferIdx( _bufferIdx )
40 Ogre::uint32 mCurrentId;
41 GameEntityVec mGameEntities[Ogre::NUM_SCENE_MEMORY_MANAGER_TYPES];
43 std::vector<GameEntityTransform*> mTransformBuffers;
44 std::vector<Region> mAvailableTransforms;
47 size_t mScheduledForRemovalCurrentSlot;
48 std::vector<size_t> mScheduledForRemovalAvailableSlots;
53 Ogre::uint32 getScheduledForRemovalAvailableSlot(
void);
56 void aquireTransformSlot(
size_t &outSlot,
size_t &outBufferIdx );
83 const Ogre::Vector3 &initialPos,
84 const Ogre::Quaternion &initialRot,
85 const Ogre::Vector3 &initialScale );
void queueSendMessage(MessageQueueSystem *dstSystem, Mq::MessageId messageId, const T &msg)
Queues message 'msg' to be sent to a destination MessageQueueSystem.
Definition: MessageQueueSystem.h:66
std::vector< GameEntityVec > GameEntityVecVec
Definition: GameEntityManager.h:22
GameEntityTransform * mTransform[NUM_GAME_ENTITY_BUFFERS]
Definition: GameEntity.h:53
@ GAME_ENTITY_REMOVED
Definition: MqMessages.h:17
GameEntity * 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 ap...
Definition: GameEntityManager.cpp:50
Definition: BaseSystem.cpp:5
void _notifyGameEntitiesRemoved(size_t slot)
Must be called by LogicSystem when Mq::GAME_ENTITY_SCHEDULED_FOR_REMOVAL_SLOT message arrives.
Definition: GameEntityManager.cpp:93
void _notifyGameEntityManager(GameEntityManager *mgr)
Definition: LogicSystem.h:31
static bool OrderById(const GameEntity *_l, const GameEntity *_r)
Definition: GameEntity.h:82
Ogre::SceneMemoryMgrTypes mType
Definition: GameEntity.h:54
void removeGameEntity(GameEntity *toRemove)
Removes the GameEntity from the world.
Definition: GameEntityManager.cpp:81
Definition: LogicSystem.h:14
Definition: GameEntityManager.h:13
GameEntity * gameEntity
Definition: GameEntityManager.h:18
@ GAME_ENTITY_SCHEDULED_FOR_REMOVAL_SLOT
Definition: MqMessages.h:19
Definition: GameEntity.h:35
Definition: GameEntity.h:20
GameEntityManager(Mq::MessageQueueSystem *graphicsSystem, LogicSystem *logicSystem)
Definition: GameEntityManager.cpp:11
Definition: MessageQueueSystem.h:16
#define NUM_GAME_ENTITY_BUFFERS
Definition: GameEntity.h:11
void finishFrameParallel(void)
Must be called every frame from the LOGIC THREAD.
Definition: GameEntityManager.cpp:185
Definition: GameEntityManager.h:16
const size_t cNumTransforms
Definition: GameEntityManager.cpp:9
std::vector< GameEntity * > GameEntityVec
Definition: GameEntity.h:88
size_t mTransformBufferIdx
Definition: GameEntity.h:60
GameEntityTransform initialTransform
Definition: GameEntityManager.h:19
~GameEntityManager()
Definition: GameEntityManager.cpp:21
@ GAME_ENTITY_ADDED
Definition: MqMessages.h:16