VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreSimComponent< ComponentBase > Class Template Reference

Detailed Description

template<typename ComponentBase>
class makVre::DtVreSimComponent< ComponentBase >
Template Parameters
ComponentBaseThe 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>

Inheritance diagram for makVre::DtVreSimComponent< ComponentBase >:
[legend]

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)
 
DtVreSimComponentoperator= (const DtVreSimComponent &other)
 

Constructor & Destructor Documentation

◆ DtVreSimComponent() [1/3]

template<typename ComponentBase>
makVre::DtVreSimComponent< ComponentBase >::DtVreSimComponent ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
inline

Constructor.

Parameters
nameThe name of this component
ownerThe local object that owns this component
simManagerThe simulation services manager
descComponent descriptor with configuration parameters
parentRegistryOptional 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=().

◆ ~DtVreSimComponent()

template<typename ComponentBase>
virtual makVre::DtVreSimComponent< ComponentBase >::~DtVreSimComponent ( )
inlinevirtual

Virtual destructor.

Cleans up resources used by the VR-Engage simulation component. Base component resources are cleaned up by the base class destructor.

◆ DtVreSimComponent() [2/3]

template<typename ComponentBase>
makVre::DtVreSimComponent< ComponentBase >::DtVreSimComponent ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization.

◆ DtVreSimComponent() [3/3]

template<typename ComponentBase>
makVre::DtVreSimComponent< ComponentBase >::DtVreSimComponent ( const DtVreSimComponent< ComponentBase > & other)
private

Copy constructor (not implemented)

Copy constructor is private and not implemented to prevent copy construction.

References DtVreSimComponent().

Member Function Documentation

◆ isPlayerControlled()

template<typename ComponentBase>
bool makVre::DtVreSimComponent< ComponentBase >::isPlayerControlled ( const std::string & role = "") const
inline

Checks if the entity is player controlled.

Parameters
roleOptional role name to check for (empty string to check for any role)
Returns
True if the entity has the specified role or any role if no specific role is provided

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-".

◆ entitySystemName()

template<typename ComponentBase>
DtString makVre::DtVreSimComponent< ComponentBase >::entitySystemName ( ) const
inline

Gets the entity's top-level system name.

Returns
String containing the top-level system name from the entity definition

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.

Note
This implementation uses string manipulation since DtComponentSystem does not provide a direct accessor for the top-level system name.

◆ operator=()

template<typename ComponentBase>
DtVreSimComponent & makVre::DtVreSimComponent< ComponentBase >::operator= ( const DtVreSimComponent< ComponentBase > & other)
private

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreSimComponent().


The documentation for this class was generated from the following file: