![]() |
VR-Forces 4.5 Class Documentation
|
Manager to handle multiple entity creation. More...
Classes | |
| struct | CreateEntitiesGroup |
Public Member Functions | |
| DtMultipleEntityCreationManager (DtCgf *cgf) | |
| virtual | ~DtMultipleEntityCreationManager () |
| virtual bool | init () |
| Must be called after construction to initialize the callbacks. | |
Protected Types | |
| typedef std::list< std::pair < CreateEntitiesGroup *, DtNavAreaQuery::Ptr > > | QueuedQueryData |
Protected Member Functions | |
| virtual void | processCreateMultipleEntities (DtSimMessage *msg) |
| Multiple entity creation callback. | |
| virtual void | createSelectionGroups (const DtString groupName, const std::vector< DtUUID > &entNames) |
| Create a selection group from the entities created. | |
| virtual bool | collisionWithOtherEntities (DtExtent &extent, const DtVector &pos, double radius) |
| Determine if a location collides with existing entities. | |
| virtual DtVrfObject * | createEntity (const DtVector &location, const DtBufferSerialize::DtGroupEntityInfo &entityInfo) |
| Creates the entity using the generated location and the info for its creation group. | |
| virtual void | processCreateMultipleEntitiesNoNavData (const DtBufferSerialize::DtGroupEntityInfo &entityInfo, DtVrfObject *areaObject, std::vector< DtUUID > &nameList) |
| A simpler version of spawning used when the area is not in NavData. | |
| virtual void | processSimTick () |
| Sends out queued tasks/sets in batches. | |
| virtual bool | ProcessCreationPointTest (const DtVector &localPoint, DtNavAreaQuery *query) |
Static Protected Member Functions | |
| static void | createMultipleEntitiesCallback (DtSimMessage *msg, void *usr) |
| calls processCreateMultipleEntities | |
| static void | simTickCallback (void *arg) |
| Calls processSimTick to send out queued tasks/sets to avoid network flood and lost messages after a batch of entities has been created. | |
| static bool | CreationPointTestCallback (const DtVector &localPoint, DtNavAreaQuery *query, void *userData) |
Protected Attributes | |
| QueuedQueryData | myQueuedQueries |
| std::list< std::pair < DtVrfObject *, DtSetDataRequest * > > | myQueuedSetMessages |
| std::list< std::pair < DtVrfObject *, DtSimTask * > > | myQueuedTaskMessages |
| DtCgf * | myCgf |
| int | myDelayTaskingTickCount |
| Indicates that a spawn message was just processed and draining the message queues should wait. | |
Private Member Functions | |
| DtMultipleEntityCreationManager (const DtMultipleEntityCreationManager &orig) | |
| Not implemented. | |
| DtMultipleEntityCreationManager & | operator= (const DtMultipleEntityCreationManager &orig) |
| Not implemented. | |
Manager to handle multiple entity creation.
Responds to DtIfCreateMutipleEntity messages.
|
protected |
| DtMultipleEntityCreationManager::DtMultipleEntityCreationManager | ( | DtCgf * | cgf | ) |
|
virtual |
|
private |
Not implemented.
|
private |
Not implemented.
|
virtual |
Must be called after construction to initialize the callbacks.
|
staticprotected |
calls processCreateMultipleEntities
|
protectedvirtual |
Multiple entity creation callback.
This function does the heart of entity creation and is called whenever the DtCreateMultipleEntitiesType message is processed.
|
protectedvirtual |
Create a selection group from the entities created.
|
protectedvirtual |
Determine if a location collides with existing entities.
|
protectedvirtual |
Creates the entity using the generated location and the info for its creation group.
|
protectedvirtual |
A simpler version of spawning used when the area is not in NavData.
Creates entities at random locations. This is a last resort used only when NavData cannot be found.
|
staticprotected |
Calls processSimTick to send out queued tasks/sets to avoid network flood and lost messages after a batch of entities has been created.
|
protectedvirtual |
Sends out queued tasks/sets in batches.
|
staticprotected |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Indicates that a spawn message was just processed and draining the message queues should wait.