|
VR-Engage
2.2
|
DtVreTurretActuator extends the base turret actuator to provide player control awareness. When a player is controlling the entity's turret, this component suppresses its normal tick functionality, allowing the player's inputs to control the turret through other mechanisms (typically a separate player-specific actuator).
This component gracefully switches between AI-controlled behavior (using the base turret actuator functionality) and player-controlled behavior (deferring to player input systems) based on the entity's control state.
Uses Descriptor Type: DtHumanGunActuatorDescriptor
#include <vreTurretActuator.h>
Public Member Functions | |
| DtVreTurretActuator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreTurretActuator () override |
| virtual const char * | type () const override |
| virtual void | tick () override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtTurretActuatorComponent > | |
| 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 |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
Private Member Functions | |
| DtVreTurretActuator () | |
| DtVreTurretActuator (const DtVreTurretActuator &orig) | |
| const DtVreTurretActuator & | operator= (const DtVreTurretActuator &orig) |
| makVre::DtVreTurretActuator::DtVreTurretActuator | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = 0, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
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 turret actuator component with the specified parameters. Initializes the component to track player control state and manage turret movements.
Referenced by DtVreTurretActuator(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the turret actuator component.
|
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 DtVreTurretActuator().
|
inlineoverridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
References makVre::DtVreTurretActuatorType.
|
overridevirtual |
Updates the turret state each simulation frame.
Checks if a player is acting in the gunner role for this entity. If so, the method returns immediately without making changes, allowing player control mechanisms to handle turret movement. Otherwise, it calls the base class tick method to function normally under CGF (Computer Generated Forces) control, updating turret position based on AI commands.
|
static |
Factory method to create a new instance of this component.
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
Static factory method used by the component creation system to instantiate new instances of this component type.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.
References DtVreTurretActuator().