VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreTurretActuator Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtVreTurretActuator:
[legend]

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 DtVreTurretActuatoroperator= (const DtVreTurretActuator &orig)
 

Constructor & Destructor Documentation

◆ DtVreTurretActuator() [1/3]

makVre::DtVreTurretActuator::DtVreTurretActuator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

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 turret actuator component with the specified parameters. Initializes the component to track player control state and manage turret movements.

Referenced by DtVreTurretActuator(), and operator=().

◆ ~DtVreTurretActuator()

virtual makVre::DtVreTurretActuator::~DtVreTurretActuator ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the turret actuator component.

◆ DtVreTurretActuator() [2/3]

makVre::DtVreTurretActuator::DtVreTurretActuator ( )
private

Default constructor (not implemented)

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

◆ DtVreTurretActuator() [3/3]

makVre::DtVreTurretActuator::DtVreTurretActuator ( const DtVreTurretActuator & orig)
private

Copy constructor (not implemented)

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

References DtVreTurretActuator().

Member Function Documentation

◆ type()

virtual const char * makVre::DtVreTurretActuator::type ( ) const
inlineoverridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreTurretActuatorType)

Implements the DtSimComponent::type() method to return the type identifier for this component.

References makVre::DtVreTurretActuatorType.

◆ tick()

virtual void makVre::DtVreTurretActuator::tick ( )
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.

◆ creator()

static DtSimComponent * makVre::DtVreTurretActuator::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
static

Factory method to create a new instance of this component.

Parameters
nameThe name for the new component
ownerThe local object that will own this component
simManagerThe simulation services manager
descOptional component descriptor
parentRegistryOptional parent registry for reader/writer functionality
Returns
Pointer to the newly created component

Static factory method used by the component creation system to instantiate new instances of this component type.

◆ operator=()

const DtVreTurretActuator & makVre::DtVreTurretActuator::operator= ( const DtVreTurretActuator & orig)
private

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreTurretActuator().


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