|
VR-Engage
2.2
|
DtVreBallisticGunJoyController extends the DtBallisticGunController class with the ability to be controlled from a joystick. It processes joystick inputs to control gun aiming, elevation adjustment, and firing operations. The controller responds to joystick events by updating the appropriate control parameters for the underlying ballistic gun.
Uses Descriptor Type: DtBallisticGunJoyControllerDescriptor
#include <vreBallisticGunJoyController.h>
Public Member Functions | |
| DtVreBallisticGunJoyController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *const parentRegistry=0) | |
| virtual | ~DtVreBallisticGunJoyController () override |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtBallisticGunJoyController > | |
| 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 |
Public Member Functions inherited from makVre::DtBallisticGunJoyController | |
| DtBallisticGunJoyController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *const parentRegistry=0) | |
| virtual | ~DtBallisticGunJoyController () override |
| virtual bool | createActiveJoystickPort () |
| virtual DtBooleanOutputPort * | activeJoystickPort () const |
| virtual bool | createElevationPort () |
| virtual DtConstrainedAnalogOutputPort * | elevationPort () const |
| virtual bool | chooseAmmo (const DtEntityType &name=DtEntityType::nullType()) |
| virtual bool | canFire () |
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::DtBallisticGunJoyController | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
Protected Member Functions | |
| virtual void | tick () override |
Protected Member Functions inherited from makVre::DtBallisticGunJoyController | |
| virtual void | calcAndSetPortValues (const DtString &functionGroup, const DtString &function, double value, bool repeat) override |
| virtual void | joystickConnected () override |
| virtual void | joystickDisconnected () override |
| virtual bool | createPorts () override |
Private Member Functions | |
| DtVreBallisticGunJoyController () | |
| DtVreBallisticGunJoyController (const DtVreBallisticGunJoyController &orig) | |
| const DtVreBallisticGunJoyController & | operator= (const DtVreBallisticGunJoyController &orig) |
Additional Inherited Members | |
Protected Attributes inherited from makVre::DtBallisticGunJoyController | |
| bool | myFiring |
| bool | myFireButtonDown |
| DtConstrainedAnalogOutputPort * | myElevationPort |
| DtBooleanOutputPort * | myActiveJoystickPort |
| makVre::DtVreBallisticGunJoyController::DtVreBallisticGunJoyController | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc, | ||
| DtReaderWriterRegistry *const | 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 ballistic gun joy controller component with the specified parameters.
Referenced by DtVreBallisticGunJoyController(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the ballistic gun joy controller 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 DtVreBallisticGunJoyController().
|
inlineoverridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
Reimplemented from makVre::DtBallisticGunJoyController.
References makVre::DtVreBallisticGunJoyControllerType.
|
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.
|
overrideprotectedvirtual |
Updates the controller state each simulation frame.
Processes joystick input and updates the gun's aiming and firing state. This method is called each simulation frame to maintain continuous control of the gun based on current joystick inputs.
Reimplemented from makVre::DtBallisticGunJoyController.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.
References DtVreBallisticGunJoyController().