|
VR-Engage
2.2
|
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>
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 DtVreHumanSetController & | operator= (const DtVreHumanSetController &orig) |
Additional Inherited Members | |
Protected Attributes inherited from makVre::DtVreSetController< DtHumanSetController > | |
| bool | myWarnedAboutResource |
| std::list< SetVreControlledContent > | myPendingControlChanges |
| makVre::DtVreHumanSetController::DtVreHumanSetController | ( | 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 human set controller component with the specified parameters.
Referenced by DtVreHumanSetController(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the human set controller component.
|
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.
|
private |
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreHumanSetController().
|
static |
Callback for embarkation role messages.
| msg | The message containing embarkation role information |
| usrData | User 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.
|
virtual |
Processes embarkation role change messages.
| msg | The 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.
|
overridevirtual |
Processes speed setting messages.
| msg | The 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.
|
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.
|
virtual |
Enables or disables autonomous action processing for the associated entity.
| enable | When 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.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.
References DtVreHumanSetController().
|
overrideprotectedvirtual |
Sets the radio receiver for simulation messages.
| radio | Pointer 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 >.