|
VR-Engage
2.3
|
| ComponentBase | The base component class to extend with VR-Engage functionality |
DtVreSimComponent is a template class that serves as the base for VR-Engage simulation components. It extends VR-Forces base component classes with VR-Engage specific functionality such as player control detection and entity system name retrieval. All VR-Engage components should derive from this template class.
#include <vreSimComponent.h>
Public Member Functions | |
| DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreSimComponent () |
| bool | isPlayerControlled (const std::string &role="") const |
| std::vector< std::string > | controllingStations (const std::string &role) const |
| std::vector< std::string > | engagedRoles () const |
| DtString | entitySystemName () const |
Private Member Functions | |
| DtVreSimComponent () | |
| DtVreSimComponent (const DtVreSimComponent &other) | |
| DtVreSimComponent & | operator= (const DtVreSimComponent &other) |
|
inline |
Constructor.
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new VR-Engage simulation component with the specified parameters. Forwards all parameters to the base component class constructor.
|
inlinevirtual |
Virtual destructor.
Cleans up resources used by the VR-Engage simulation component. Base component resources are cleaned up by the base class destructor.
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
|
private |
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
|
inline |
Checks if the entity is player controlled.
| role | Optional role name to check for (empty string to check for any role) |
Determines whether the entity is under player control by inspecting the published "Roles" state-property map. If a specific role is provided, returns true when that role's station-entry list is non-empty. If no role is provided, returns true when any role is occupied by at least one station.
|
inline |
Returns the identifiers of the stations controlling a given role.
| role | The role name to query |
Reads the published "Roles" state-property map and returns the station identifiers from the structured station list associated with role.
|
inline |
Returns the names of all roles occupied by at least one station.
Reads the published "Roles" state-property map and returns each role name (map key) that currently has one or more controlling stations.
|
inline |
Gets the entity's top-level system name.
Retrieves the name of the top-level system (direct child of base-system) defined in the entity file. This is extracted from the full parent system name by removing the "base-system." prefix and any suffixes after the first period.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.