![]() |
VR-Forces Developer's Guide
|
Manager to handle multiple entity creation. Responds to DtIfCreateMutipleEntity messages.
Classes | |
| struct | CreateEntitiesGroup |
Public Member Functions | |
| DtMultipleEntityCreationManager (DtCgf *cgf) | |
| virtual | ~DtMultipleEntityCreationManager () |
| virtual bool | init () |
Protected Types | |
| typedef std::list< std::pair < CreateEntitiesGroup *, DtNavAreaQuery::Ptr > > | QueuedQueryData |
Protected Member Functions | |
| virtual void | processCreateMultipleEntities (DtSimMessage *msg) |
| virtual void | createSelectionGroups (const DtString groupName, const std::vector< DtUUID > &entNames) |
| virtual bool | collisionWithOtherEntities (DtExtent &extent, const DtVector &pos, double radius) |
| virtual DtLocalObject * | createEntity (const DtVector &location, const DtBufferSerialize::DtGroupEntityInfo &entityInfo) |
| virtual void | processCreateMultipleEntitiesNoNavData (const DtBufferSerialize::DtGroupEntityInfo &entityInfo, const DtSimObject *areaObject, std::vector< DtUUID > &nameList) |
| virtual void | processSimTick () |
| virtual bool | ProcessCreationPointTest (const DtVector &localPoint, DtNavAreaQuery *query) |
Static Protected Member Functions | |
| static void | createMultipleEntitiesCallback (DtSimMessage *msg, void *usr) |
| static void | simTickCallback (void *arg) |
| static bool | CreationPointTestCallback (const DtVector &localPoint, DtNavAreaQuery *query, void *userData) |
Protected Attributes | |
| QueuedQueryData | myQueuedQueries |
| std::list< std::pair < DtLocalObject *, DtSetDataRequest * > > | myQueuedSetMessages |
| std::list< std::pair < DtLocalObject *, DtSimTask * > > | myQueuedTaskMessages |
| DtCgf * | myCgf |
| int | myDelayTaskingTickCount |
Private Member Functions | |
| DtMultipleEntityCreationManager (const DtMultipleEntityCreationManager &orig) | |
| DtMultipleEntityCreationManager & | operator= (const DtMultipleEntityCreationManager &orig) |
|
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.