18#include <vrfmodel/ballisticGun.h>
19#include <vrfMsgTransport/detonationEvent.h>
21class DtSimulationServices;
22class DtConstrainedAnalogInputPort;
23class DtBooleanInputPort;
24class DtBallisticGunDescriptor;
28class DtArticulatedPartStateRepository;
44 DtBallisticGunJoy(
const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
45 DtComponentDescriptor* desc, DtReaderWriterRegistry*
const parentRegistry = 0);
58 virtual const char*
type()
const override;
77 virtual void tick()
override;
85 virtual DtReal
setTarget(makVrf::DtArticulatedPartStateRepository* rotBody);
103 makVrf::DtArticulatedPartStateRepository* rotBody, DtReal& detTime, DtReal dist);
114 virtual DtUUID
targetSelection(makVrf::DtArticulatedPartStateRepository* rotBody, DtReal& dist);
142 static DtSimComponent*
creator(
const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
143 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
virtual DtReal distanceToTarget()
Calculates the distance to the current target.
virtual ~DtBallisticGunJoy() override
Virtual destructor.
bool myReportedNoArticulation
Flag to track missing articulation warning.
Definition ballisticGunJoy.h:188
virtual DtUUID targetSelection(makVrf::DtArticulatedPartStateRepository *rotBody, DtReal &dist)
Finds a target along the gun's firing direction.
virtual makVrfEvents::DtFireEvent * manualFireInteraction(makVrf::DtArticulatedPartStateRepository *rotBody)
Creates a fire interaction event.
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.
DtConstrainedAnalogInputPort * myElevationPort
Input Port Name: elevation Input Port Description: Input Port Range: -1. to 1. Input Port Default Va...
Definition ballisticGunJoy.h:173
virtual const char * type() const override
Gets the type identifier for this component.
virtual makVrfEvents::DtDetonationEvent * manualDetonationInteraction(makVrf::DtArticulatedPartStateRepository *rotBody, DtReal &detTime, DtReal dist)
Creates a detonation interaction event.
DtBallisticGunJoy(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *const parentRegistry=0)
static void detonationCallback(DtTimer *timer)
Timer callback for detonation events.
virtual DtReal setTarget(makVrf::DtArticulatedPartStateRepository *rotBody)
Sets the target for the gun.
virtual void setComponentDescriptor(DtComponentDescriptor *descriptor) override
Sets the component descriptor and extracts configuration values.
DtBooleanInputPort * myActiveJoystickPort
Input Port Name: joystick-active Input Port Description: Input Port Range: Input Port Default Value...
Definition ballisticGunJoy.h:180
const DtBallisticGunJoy & operator=(const DtBallisticGunJoy &orig)
Assignment operator (not implemented)
DtBallisticGunJoy()
Default constructor (not implemented)
DtBallisticGunJoy(const DtBallisticGunJoy &orig)
Copy constructor (not implemented)
virtual void tick() override
Updates the gun state each frame and handles firing.
virtual bool createPorts() override
Creates the input ports for the component.
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtBallisticGunJoyActuatorType[]
Definition ballisticGunJoy.h:33
Definition connectorAccessory.h:39