18#include <vrfmodel/ballisticGunController.h>
21class DtConstrainedAnalogOutputPort;
22class DtBooleanOutputPort;
23class DtOutputPortGroup;
24class DtJoyDeviceControllerDescriptor;
52 DtComponentDescriptor* desc, DtReaderWriterRegistry*
const parentRegistry = 0);
64 virtual const char*
type()
const override;
100 virtual bool chooseAmmo(
const DtEntityType& name = DtEntityType::nullType());
126 static DtSimComponent*
creator(
const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
127 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
145 const DtString& functionGroup,
const DtString& function,
double value,
bool repeat)
override;
const char DtBallisticGunJoyControllerType[]
Type identifier for the ballistic gun joy controller component.
Definition ballisticGunJoyController.h:27
virtual void joystickDisconnected() override
Handles joystick disconnection event.
virtual bool createElevationPort()
Creates the elevation control output port.
virtual ~DtBallisticGunJoyController() override
Virtual destructor.
DtBallisticGunJoyController(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *const parentRegistry=0)
Constructor.
const DtBallisticGunJoyController & operator=(const DtBallisticGunJoyController &orig)
Assignment operator (not implemented)
virtual bool canFire()
Checks if the weapon can currently fire.
virtual void tick() override
Updates the controller state each simulation frame.
DtBallisticGunJoyController()
Default constructor (not implemented)
DtConstrainedAnalogOutputPort * myElevationPort
Output Port Name: elevation Output Port Description: Output Port Range: -1. to 1....
Definition ballisticGunJoyController.h:192
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
bool myFireButtonDown
Flag indicating if the fire button is currently pressed.
Definition ballisticGunJoyController.h:208
virtual DtBooleanOutputPort * activeJoystickPort() const
Gets the joystick active state output port.
DtBooleanOutputPort * myActiveJoystickPort
Output Port Name: joystick-active Output Port Description: Indicates whether controller behavior is b...
Definition ballisticGunJoyController.h:200
bool myFiring
Flag indicating if the weapon is currently firing.
Definition ballisticGunJoyController.h:205
virtual void calcAndSetPortValues(const DtString &functionGroup, const DtString &function, double value, bool repeat) override
Processes joystick input and updates output ports.
int roundsAvailableForCurrentMunition() const
Queries the resource store for the current munition's round count.
DtBallisticGunJoyController(const DtBallisticGunJoyController &orig)
Copy constructor (not implemented)
virtual void joystickConnected() override
Handles joystick connection event.
virtual bool createActiveJoystickPort()
Creates the joystick active state output port.
virtual bool createPorts() override
Creates all required output ports for this controller.
virtual DtConstrainedAnalogOutputPort * elevationPort() const
Gets the elevation control output port.
virtual const char * type() const override
Gets the type identifier for this component.
virtual void preFirstTickInit() override
Calls base first-tick initialization and restores incoming joystick state.
virtual bool chooseAmmo(const DtEntityType &name=DtEntityType::nullType())
Selects ammunition type for the weapon.
DtVreJoystickControllerInterface(DtSimComponent *component, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc)
Constructs an interface alongside an existing component base.
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
!
Definition glsVreMessageUtil.h:50
Internal-state persistence for VRE joystick controllers.