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

Detailed Description

DtVreDiGuyController extends the base DiGuy controller with VRE-specific logic to better support player control and animation states. It provides overrides for certain behaviors to fix logic errors in the base implementation and to ensure proper animation selection based on various entity states.

#include <vreDiGuyController.h>

Inheritance diagram for makVre::DtVreDiGuyController:
[legend]

Public Member Functions

 DtVreDiGuyController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreDiGuyController () override
 
virtual const char * type () const override
 
virtual void tick () override
 
void DtDiGuyController_tick ()
 
virtual void preFirstTickInit () override
 
- Public Member Functions inherited from makVre::DtVreSimComponent< DtDiGuyController >
 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

 DtVreDiGuyController ()
 
 DtVreDiGuyController (const DtVreDiGuyController &orig)
 
const DtVreDiGuyControlleroperator= (const DtVreDiGuyController &orig)
 

Constructor & Destructor Documentation

◆ DtVreDiGuyController() [1/3]

makVre::DtVreDiGuyController::DtVreDiGuyController ( 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 DiGuy controller component with the specified parameters.

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

◆ ~DtVreDiGuyController()

virtual makVre::DtVreDiGuyController::~DtVreDiGuyController ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the DiGuy controller component.

◆ DtVreDiGuyController() [2/3]

makVre::DtVreDiGuyController::DtVreDiGuyController ( )
private

VRE override to handle ordered animations (currently commented out)

This would override the base class method to obey ordered animation regardless of posture, fixing issue VRE-3299. However, it's currently disabled because it would prevent injured animations from showing when embarked in vehicles. Future improvement needed: posture should not override ordered animation, but injured or dead state should still take precedence.

Default constructor (not implemented)

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

◆ DtVreDiGuyController() [3/3]

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

Copy constructor (not implemented)

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

References DtVreDiGuyController().

Member Function Documentation

◆ type()

virtual const char * makVre::DtVreDiGuyController::type ( ) const
overridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreDIGuyControllerType)

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

◆ creator()

static DtSimComponent * makVre::DtVreDiGuyController::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.

◆ tick()

virtual void makVre::DtVreDiGuyController::tick ( )
overridevirtual

Updates the controller state each simulation frame.

Overridden to give up animation control when the entity is player-controlled. This allows player inputs to directly control animation states rather than having the AI controller determine animations.

◆ DtDiGuyController_tick()

void makVre::DtVreDiGuyController::DtDiGuyController_tick ( )

◆ preFirstTickInit()

virtual void makVre::DtVreDiGuyController::preFirstTickInit ( )
overridevirtual

Performs initialization before the first simulation tick.

Sets up initial states and configurations before the simulation begins. This initialization is performed once before the first tick of the simulation.

◆ operator=()

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

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreDiGuyController().


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