|
VR-Engage
2.2
|
DtControlSurfacesActuator manages the articulated parts for fixed wing flight control surfaces such as rudder, ailerons, elevators, and flaps. It receives control inputs through input ports and applies the appropriate deflection values to the corresponding articulated parts.
Uses Descriptor Type: DtActuatorComponentDescriptor
#include <controlSurfacesActuator.h>
Classes | |
| struct | PortData |
Public Member Functions | |
| DtControlSurfacesActuator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtControlSurfacesActuator () override |
| virtual const char * | type () const override |
| virtual bool | postAddComponentsInit () override |
| virtual void | tick () override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtActuatorComponent > | |
| 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 Member Functions | |
| virtual bool | createPorts () override |
| virtual bool | createPortGroups () override |
Protected Attributes | |
| std::map< std::string, PortData > | myPorts |
| DtInputPortGroup * | myControlSurfacesInputGroup |
| bool | myPlayerControlled |
Private Member Functions | |
| DtControlSurfacesActuator () | |
| DtControlSurfacesActuator (const DtControlSurfacesActuator &orig) | |
| const DtControlSurfacesActuator & | operator= (const DtControlSurfacesActuator &orig) |
| makVre::DtControlSurfacesActuator::DtControlSurfacesActuator | ( | 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 | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new control surfaces actuator component with the specified parameters.
Referenced by DtControlSurfacesActuator(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the control surfaces actuator component.
|
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 DtControlSurfacesActuator().
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
|
overridevirtual |
Performs post-component-addition initialization.
Gets and caches references to the articulated part repositories for each control surface after all components have been added.
|
overridevirtual |
Updates control surface positions each simulation frame.
Reads current input port values and applies the appropriate deflection to each control surface articulated part. When player control is lost, it will run one additional tick to reset surfaces to neutral positions.
|
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 DtControlSurfacesActuator().
|
overrideprotectedvirtual |
Creates input ports for control surfaces.
Creates the input ports for each defined control surface and adds them to the control surfaces port group.
|
overrideprotectedvirtual |
Creates port groups for organizing input ports.
Creates a port group called "control-surfaces" to organize all control surface input ports.
|
protected |
Map of control surface names to their port and articulated part data.
Maps each control surface name (e.g., "rudder", "aileron") to its corresponding PortData structure containing input port and art part references.
|
protected |
Port group for control surface inputs.
Groups all control surface input ports under the "control-surfaces" group for easier organization and access.
|
protected |
Flag indicating if this entity is currently player-controlled.
Tracks whether the entity is currently under player control. When control is lost, this allows the actuator to tick one more time to reset control surfaces to neutral positions.