|
VR-Engage
2.3
|
DtVreParachuteController extends the base parachute controller to add joystick control capabilities. This allows direct user control of parachute steering and deployment through joystick inputs. The controller also provides automated guidance for CGF entities to navigate to designated landing locations.
Uses Descriptor Type: DtParachuteControllerDescriptor
#include <vreParachuteController.h>
Public Member Functions | |
| DtVreParachuteController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreParachuteController () override |
| virtual void | tick () override |
| virtual const char * | type () const override |
| virtual void | preFirstTickInit () override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtParachuteController > | |
| DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreSimComponent () |
| bool | isPlayerControlled (const std::string &role="") const |
| std::vector< std::string > | controllingStations (const std::string &role) const |
| std::vector< std::string > | engagedRoles () const |
| DtString | entitySystemName () const |
Public Member Functions inherited from makVre::DtVreJoystickControllerInterface | |
| DtVreJoystickControllerInterface (DtSimComponent *component, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc) | |
| virtual | ~DtVreJoystickControllerInterface () override |
| DtVreJoystickControllerInterface (const DtVreJoystickControllerInterface &)=delete | |
| DtVreJoystickControllerInterface & | operator= (const DtVreJoystickControllerInterface &)=delete |
| DtVreJoystickControllerInterface (DtVreJoystickControllerInterface &&)=delete | |
| DtVreJoystickControllerInterface & | operator= (DtVreJoystickControllerInterface &&)=delete |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
Static Public Member Functions inherited from makVre::DtVreJoystickControllerInterface | |
| static void | updateJoystickState (DtSimComponent &component, DtLocalObject &owner, bool enabled, int requestCount) |
| static bool | restoreJoystickState (DtSimComponent &component, DtLocalObject &owner, bool incomingTransfer, bool &enabled, int &requestCount, bool hasDescriptor) |
Protected Member Functions | |
| virtual DtVector | projectLandingLocation (DtSimObjectReference entity) |
| virtual void | calcAndSetPortValues (const DtString &functionGroup, const DtString &function, double value, bool repeat) override |
| virtual void | joystickConnected () override |
| virtual void | joystickDisconnected () override |
Protected Member Functions inherited from makVre::DtVreJoystickControllerInterface | |
| void | updateJoystickState () |
| void | restoreJoystickState () |
| virtual void | processJoyDeviceRequest (DtSimMessage *msg) override |
Private Member Functions | |
| DtVreParachuteController () | |
| DtVreParachuteController (const DtVreParachuteController &orig) | |
| const DtVreParachuteController & | operator= (const DtVreParachuteController &orig) |
| makVre::DtVreParachuteController::DtVreParachuteController | ( | 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 parachute controller component with the specified parameters.
Referenced by DtVreParachuteController(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the parachute controller component. This is mostly a no-op as the component doesn't maintain many resources.
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
|
private |
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreParachuteController().
|
overridevirtual |
Updates the controller state each simulation frame.
Handles CGF (Computer Generated Forces) control of steering and parachute deployment. For non-player entities, calculates the appropriate steering inputs to guide the entity toward its designated landing location.
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
|
overridevirtual |
Calls base first-tick initialization and restores incoming joystick state.
|
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.
|
protectedvirtual |
Projects the expected landing location of an entity.
| entity | Reference to the entity to project landing location for |
Calculates the expected landing location of a parachuting entity based on its current position, velocity, and environmental factors such as wind. This is used for both visualization and to guide autonomous entities toward their intended landing zones.
|
overrideprotectedvirtual |
Processes joystick input and sets corresponding port values.
| functionGroup | The function group identifier for the input |
| function | The specific function name for the input |
| value | The input value (typically in range [-1.0, 1.0]) |
| repeat | Flag indicating whether the function should repeat |
Handles joystick input by translating joystick function calls into appropriate parachute control values. Maps joystick axes and buttons to steering and deployment controls for the parachute.
|
overrideprotectedvirtual |
Handles joystick connection events.
Required by the DtJoystickControllerInterface, but currently a no-op. Called when a joystick is connected to the system.
|
overrideprotectedvirtual |
Handles joystick disconnection events.
Required by the DtJoystickControllerInterface, but currently a no-op. Called when a joystick is disconnected from the system.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.
References DtVreParachuteController().