![]() |
VR-Forces 4.3.1 Class Documentation
|
The Object Manager creates entities with the DtVrfObjectManager::createAndInitVrfObject() member function.
An Object Manager may create an entity under the following circumstances:
If you want to create a local entity from within an application, call DtVrfObjectManager::createAndInitVrfObject(). The createAndInitVrfObject() member function creates and initializes the new DtVrfObject, and adds it to the Object Manager. Call the form of createAndInitVrfObject() that takes a single position as an argument. This form is suitable for creating entities that have simple geometry defined by a single vertex. For example, to create a new M1A2 tank, do the following:
The echelon ID is not immediately available when a new organized entity is created. It may take one or more simulation ticks before the echelon ID gets assigned to the new entity. To get notified when the echelon ID is assigned or changed, you can register a callback function with the object. For example:
In the callback function echelonChangedCb(), you can examine the echelon ID, for example:
[<< Components and The Component Manager] [Home] [Top of Page] [Managing Local and Remote Entities >>]