VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreBallisticGunJoyController Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtVreBallisticGunJoyController:
[legend]

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 DtVreBallisticGunJoyControlleroperator= (const DtVreBallisticGunJoyController &orig)
 

Additional Inherited Members

- Protected Attributes inherited from makVre::DtBallisticGunJoyController
bool myFiring
 
bool myFireButtonDown
 
DtConstrainedAnalogOutputPort * myElevationPort
 
DtBooleanOutputPort * myActiveJoystickPort
 

Constructor & Destructor Documentation

◆ DtVreBallisticGunJoyController() [1/3]

makVre::DtVreBallisticGunJoyController::DtVreBallisticGunJoyController ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc,
DtReaderWriterRegistry *const parentRegistry = 0 )

Constructor.

Parameters
nameThe name of this component
ownerThe local object that owns this component
simManagerThe simulation services manager
descComponent descriptor with configuration parameters
parentRegistryOptional parent registry for reader/writer functionality

Creates a new ballistic gun joy controller component with the specified parameters.

Referenced by DtVreBallisticGunJoyController(), and operator=().

◆ ~DtVreBallisticGunJoyController()

virtual makVre::DtVreBallisticGunJoyController::~DtVreBallisticGunJoyController ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the ballistic gun joy controller component.

◆ DtVreBallisticGunJoyController() [2/3]

makVre::DtVreBallisticGunJoyController::DtVreBallisticGunJoyController ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization.

◆ DtVreBallisticGunJoyController() [3/3]

makVre::DtVreBallisticGunJoyController::DtVreBallisticGunJoyController ( const DtVreBallisticGunJoyController & orig)
private

Copy constructor (not implemented)

Copy constructor is private and not implemented to prevent copy construction.

References DtVreBallisticGunJoyController().

Member Function Documentation

◆ type()

virtual const char * makVre::DtVreBallisticGunJoyController::type ( ) const
inlineoverridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreBallisticGunJoyControllerType)

Implements the DtSimComponent::type() method to return the type identifier for this component.

Reimplemented from makVre::DtBallisticGunJoyController.

References makVre::DtVreBallisticGunJoyControllerType.

◆ creator()

static DtSimComponent * makVre::DtVreBallisticGunJoyController::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
nameThe name for the new component
ownerThe local object that will own this component
simManagerThe simulation services manager
descOptional component descriptor
parentRegistryOptional 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.

◆ tick()

virtual void makVre::DtVreBallisticGunJoyController::tick ( )
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.

◆ operator=()

const DtVreBallisticGunJoyController & makVre::DtVreBallisticGunJoyController::operator= ( const DtVreBallisticGunJoyController & orig)
private

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreBallisticGunJoyController().


The documentation for this class was generated from the following file: