|
VR-Engage
2.2
|
The DtEchelonLogic tracks hierarchical relationships between entities in a command structure. It queries the DtElementIDHierarchyState to determine an entity's superior (commanding entity) and its peer subordinates (other entities sharing the same superior), then publishes this information as state attributes for use by other components.
The component maintains the following state attributes:
#include <echelonLogic.h>
Public Member Functions | |
| DtEchelonLogic () | |
| virtual | ~DtEchelonLogic () override |
| virtual bool | initialize (DtPlayerStation *player, DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Member Functions | |
| virtual void | initializeStateAttributes () override |
| virtual makVrv::DtElementID | lookupSuperior (makVrv::DtDe &de, makVrv::DtElementID id) const |
| virtual const makVrv::DtElementIDHierarchyState::ElementIDVector | lookupSubordinates (makVrv::DtDe &de, makVrv::DtElementID id) const |
| virtual const makVrv::DtElementIDHierarchyStateAttribute * | findHierarchyItem (makVrv::DtDe &de, makVrv::DtElementID id) const |
Additional Inherited Members | |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| makVre::DtEchelonLogic::DtEchelonLogic | ( | ) |
Constructor for DtEchelonLogic.
Initializes the component with the name "DtEchelonLogic".
|
overridevirtual |
Virtual destructor for DtEchelonLogic.
|
overridevirtual |
Initializes the component with configuration from Lua.
Performs basic initialization using the parent class implementation.
| player | Pointer to the player station this component belongs to |
| config | Configuration table containing initialization parameters |
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates the component state.
Called each frame to update the command hierarchy information. This method:
| dt | Delta time in seconds since the last tick |
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Shuts down the component.
Performs cleanup by calling the parent class shutdown method.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the component type identifier.
Implements makVre::DtPlayerComponent.
|
overrideprotectedvirtual |
Initializes state attributes.
This method is reserved for initializing state attributes in the future. Currently, it has an empty implementation with commented-out code.
Reimplemented from makVre::DtPlayerComponent.
|
protectedvirtual |
Looks up the superior (commanding entity) for a given entity.
Queries the DtElementIDHierarchyState to find the parent entity ID for the specified entity.
| de | Reference to the dynamic environment |
| id | Element ID of the entity to find the superior for |
References de().
|
protectedvirtual |
Looks up subordinate entities for a given entity.
Queries the DtElementIDHierarchyState to find all child entities for the specified entity.
| de | Reference to the dynamic environment |
| id | Element ID of the entity to find subordinates for |
References de().
|
protectedvirtual |
Finds the hierarchy state attribute for a given entity.
Locates the DtElementIDHierarchyStateAttribute for the specified entity by looking it up in the data bank.
| de | Reference to the dynamic environment |
| id | Element ID of the entity to find the hierarchy item for |
References de().