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

Detailed Description

DtVreHumanSetController extends the base set controller functionality for human entities. It handles altitude and speed control differently for player-controlled versus AI-controlled entities. The controller provides specialized handling for human-specific behaviors such as speed limitations, embarkation roles, and coordinated movement of human groups.

#include <vreHumanSetController.h>

Inheritance diagram for makVre::DtVreHumanSetController:
[legend]

Public Member Functions

 DtVreHumanSetController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreHumanSetController () override
 
virtual void processSetEngageEmbarkedRole (DtSimMessage *msg)
 
virtual void processSetSpeed (DtSimMessage *msg) override
 
virtual void updateAutonomousActions (bool enable)
 
- Public Member Functions inherited from makVre::DtVreSetController< DtHumanSetController >
 DtVreSetController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreSetController () override
 
virtual void processSetPlayerControlled (DtSimMessage *msg)
 
virtual void updatePlayerControlled (const SetVreControlledContent &change)
 
virtual void preFirstTickInit ()
 
virtual void tick ()
 
virtual void processSetAltitude (DtSimMessage *msg)
 
- Public Member Functions inherited from makVre::DtVreSimComponent< DtHumanSetController >
 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 void setEngageEmbarkedRoleCallback (DtSimMessage *msg, void *usrData)
 
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from makVre::DtVreSetController< DtHumanSetController >
static void setPlayerControlledCallback (DtSimMessage *msg, void *usrData)
 
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 

Protected Member Functions

virtual void setRadio (DtSimRadio *radio) override
 

Private Member Functions

 DtVreHumanSetController ()
 
 DtVreHumanSetController (const DtVreHumanSetController &orig)
 
const DtVreHumanSetControlleroperator= (const DtVreHumanSetController &orig)
 

Additional Inherited Members

- Protected Attributes inherited from makVre::DtVreSetController< DtHumanSetController >
bool myWarnedAboutResource
 
std::list< SetVreControlledContent > myPendingControlChanges
 

Constructor & Destructor Documentation

◆ DtVreHumanSetController() [1/3]

makVre::DtVreHumanSetController::DtVreHumanSetController ( 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 human set controller component with the specified parameters.

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

◆ ~DtVreHumanSetController()

virtual makVre::DtVreHumanSetController::~DtVreHumanSetController ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the human set controller component.

◆ DtVreHumanSetController() [2/3]

makVre::DtVreHumanSetController::DtVreHumanSetController ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization. Declared here because the compiler would otherwise generate an unprotected one.

◆ DtVreHumanSetController() [3/3]

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

Copy constructor (not implemented)

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

References DtVreHumanSetController().

Member Function Documentation

◆ setEngageEmbarkedRoleCallback()

static void makVre::DtVreHumanSetController::setEngageEmbarkedRoleCallback ( DtSimMessage * msg,
void * usrData )
static

Callback for embarkation role messages.

Parameters
msgThe message containing embarkation role information
usrDataUser data pointer, typically pointing to the instance of this class

Static callback function invoked when an entity's embarkation role changes. This forwards the message to the instance's processSetEngageEmbarkedRole method.

◆ processSetEngageEmbarkedRole()

virtual void makVre::DtVreHumanSetController::processSetEngageEmbarkedRole ( DtSimMessage * msg)
virtual

Processes embarkation role change messages.

Parameters
msgThe message containing embarkation role information

Handles messages that indicate a change in the embarkation role of an entity. This allows the controller to adjust its behavior based on whether entities are embarking on vehicles or disembarking from them.

◆ processSetSpeed()

virtual void makVre::DtVreHumanSetController::processSetSpeed ( DtSimMessage * msg)
overridevirtual

Processes speed setting messages.

Parameters
msgThe message containing speed parameters

Overridden to clamp ordered speed to the maximum speed for AI-controlled entities. While the VR-Engage human actuator allows speeds greater than the maximum speed for player-controlled entities to support short-term sprinting, CGF (Computer Generated Forces) entities are constrained to their maximum sustained speed to maintain realistic behavior.

◆ creator()

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

◆ updateAutonomousActions()

virtual void makVre::DtVreHumanSetController::updateAutonomousActions ( bool enable)
virtual

Enables or disables autonomous action processing for the associated entity.

Parameters
enableWhen true autonomous actions are allowed, when false they are suppressed

Invoked when the embarkation role for the human set changes so that the VR-Forces entity's frame state reflects the player's engagement status. When a player is embarked and actively engaged we suppress autonomous actions to avoid conflicts with player control; otherwise the default autonomous behaviors remain enabled.

◆ operator=()

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

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreHumanSetController().

◆ setRadio()

virtual void makVre::DtVreHumanSetController::setRadio ( DtSimRadio * radio)
overrideprotectedvirtual

Sets the radio receiver for simulation messages.

Parameters
radioPointer to the simulation radio for message communication

Overrides the base class implementation to register interest in specific message types related to human set control, such as embarkation role changes and speed commands. This allows the controller to react to these messages.

Reimplemented from makVre::DtVreSetController< DtHumanSetController >.


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