|
VR-Engage
2.2
|
| 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 |
| 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.
Referenced by DtVreSimComponent(), and operator=().
|
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.
References DtVreSimComponent().
|
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 checking for role assignments in the entity's extended data. If a specific role is provided, checks only for that role. If no role is specified, checks for any role assignment.
In VR-Engage, player control is indicated by the presence of role assignments stored as extended data entries with keys beginning with "role-".
|
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.
References DtVreSimComponent().