|
VR-Engage
2.2
|
DtVreHumanFollowController models the behavior of human entities when following other entities. During each simulation frame, the destination to which the entity moves is dynamically recalculated to be in the proper position with respect to the followed entity. This allows humans to maintain formation, follow leaders, or maintain specific offset positions relative to other entities.
Uses Descriptor Type: DtHumanFollowControllerDescriptor
#include <vreHumanFollowController.h>
Public Member Functions | |
| DtVreHumanFollowController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreHumanFollowController () override |
| virtual const char * | type () const override |
| virtual void | tick () override |
| virtual bool | createPorts () override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtHumanFollowController > | |
| 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) |
Protected Attributes | |
| DtStringOutputPort * | myFollowTargetOutputPort |
| int | myDisembarkSubtaskId |
Private Member Functions | |
| DtVreHumanFollowController (const DtVreHumanFollowController &orig) | |
| const DtVreHumanFollowController & | operator= (const DtVreHumanFollowController &orig) |
| makVre::DtVreHumanFollowController::DtVreHumanFollowController | ( | 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 follow controller component with the specified parameters.
Referenced by DtVreHumanFollowController(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the human follow controller component.
|
private |
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreHumanFollowController().
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
|
overridevirtual |
Updates the controller state each simulation frame.
Updates the output port with the current follow target from the PSR (Process State Repository). During each simulation frame, this method recalculates the destination position relative to the followed entity and updates the entity's movement accordingly.
|
overridevirtual |
Creates the input and output ports for the controller.
Creates additional port for the follow target point. This port is used to output the current target entity being followed, allowing other components to access this information.
|
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 DtVreHumanFollowController().
|
protected |
Output port for the current follow target entity name.
This port outputs the name of the entity currently being followed. Other components can connect to this port to receive updates when the follow target changes.
|
protected |
ID for the disembark subtask.
Stores the subtask ID used for disembarkation operations when a followed entity is being disembarked from another entity.