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>
|
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| |
◆ DtVreParachuteController() [1/3]
| makVre::DtVreParachuteController::DtVreParachuteController |
( |
const DtString & | name, |
|
|
DtLocalObject * | owner, |
|
|
DtSimulationServices * | simManager, |
|
|
DtComponentDescriptor * | desc = 0, |
|
|
DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
- Parameters
-
| 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=().
◆ ~DtVreParachuteController()
| virtual makVre::DtVreParachuteController::~DtVreParachuteController |
( |
| ) |
|
|
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.
◆ DtVreParachuteController() [2/3]
| makVre::DtVreParachuteController::DtVreParachuteController |
( |
| ) |
|
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
◆ DtVreParachuteController() [3/3]
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreParachuteController().
◆ tick()
| virtual void makVre::DtVreParachuteController::tick |
( |
| ) |
|
|
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.
◆ type()
| virtual const char * makVre::DtVreParachuteController::type |
( |
| ) |
const |
|
overridevirtual |
Gets the type identifier for this component.
- Returns
- String identifying the component type (DtVreParachuteControllerType)
Implements the DtSimComponent::type() method to return the type identifier for this component.
◆ creator()
| static DtSimComponent * makVre::DtVreParachuteController::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
-
| 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 |
- Returns
- Pointer to the newly created component
Static factory method used by the component creation system to instantiate new instances of this component type.
◆ projectLandingLocation()
| virtual DtVector makVre::DtVreParachuteController::projectLandingLocation |
( |
DtSimObjectReference | entity | ) |
|
|
protectedvirtual |
Projects the expected landing location of an entity.
- Parameters
-
| entity | Reference to the entity to project landing location for |
- Returns
- The projected landing location as a 3D vector
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.
◆ calcAndSetPortValues()
| virtual void makVre::DtVreParachuteController::calcAndSetPortValues |
( |
const DtString & | functionGroup, |
|
|
const DtString & | function, |
|
|
double | value, |
|
|
bool | repeat ) |
|
overrideprotectedvirtual |
Processes joystick input and sets corresponding port values.
- Parameters
-
| 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.
◆ joystickConnected()
| virtual void makVre::DtVreParachuteController::joystickConnected |
( |
| ) |
|
|
overrideprotectedvirtual |
Handles joystick connection events.
Required by the DtJoystickControllerInterface, but currently a no-op. Called when a joystick is connected to the system.
◆ joystickDisconnected()
| virtual void makVre::DtVreParachuteController::joystickDisconnected |
( |
| ) |
|
|
overrideprotectedvirtual |
Handles joystick disconnection events.
Required by the DtJoystickControllerInterface, but currently a no-op. Called when a joystick is disconnected from the system.
◆ processParachuteTolocationTask()
| virtual void makVre::DtVreParachuteController::processParachuteTolocationTask |
( |
DtSimMessage * | msg | ) |
|
|
overrideprotectedvirtual |
Processes parachute-to-location task messages.
- Parameters
-
| msg | The simulation message containing task parameters |
Overridden to fix a task parameter name mismatch. The incorrect capitalization in the method name ("Tolocation" instead of "ToLocation") is maintained to match the base class implementation for compatibility purposes.
◆ operator=()
Assignment operator (not implemented)
- Returns
- Reference to this object
Assignment operator is private and not implemented to prevent assignment.
References DtVreParachuteController().
The documentation for this class was generated from the following file: