26 class DtArticulatedPartStateRepository;
51 virtual const char*
type()
const override;
62 virtual void tick()
override;
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtBallisticGunJoy extends the DtBallisticGun actuator class with the ability to be controlled from a ...
Definition: ballisticGunJoy.h:35
DtBooleanInputPort * myActiveJoystickPort
Input Port Name: joystick-active Input Port Description: Input Port Range: Input Port Default Value...
Definition: ballisticGunJoy.h:137
const char DtBallisticGunJoyActuatorType[]
Definition: ballisticGunJoy.h:29
Instances of DtTimer are used to maintain the information needed to represent some kind of scheduled ...
Definition: timer.h:38
virtual void tick() override
Fire and detonate. It detects if we need to use local or parent function depending on joystick enable...
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual ~DtBallisticGunJoy() override
destructor
Definition: fireEvent.h:16
DtBallisticGun provides a simple model of a ballistic gun.
Definition: ballisticGun.h:43
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
DtBallisticGunJoy()
Default constructor; should not be called. Here because the compiler will generate an unprotected one...
DtConstrainedAnalogInputPort * myElevationPort
Input Port Name: elevation Input Port Description: Input Port Range: -1. to 1. Input Port Default Va...
Definition: ballisticGunJoy.h:130
Definition: detonationEvent.h:20
virtual void setComponentDescriptor(DtComponentDescriptor *descriptor) override
Override so we can extract the values we want and set our pointer. Calls down to the base class's set...
DtBallisticGunDescriptor; a descriptor for the DtBallisticGun component.
Definition: ballisticGunDescriptor.h:36
virtual bool createPorts() override
Creates myElevationPort.
static void detonationCallback(DtTimer *timer)
Casts the user data portion of the DtTimer passed to it to a DtDetonationTimerData object...
const DtBallisticGunJoy & operator=(const DtBallisticGunJoy &orig)
assignment operator; see comments on copy constructor!
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
virtual DtUUID targetSelection(makVrf::DtArticulatedPartStateRepository *rotBody, DtReal &dist)
Casts a ray out from the gun to a point MAX_RANGE away, where MAX_RANGE is 4000m currently. Determines, using physicalWorld->getVrfObjectsAlongChord(), if there are any platforms, lifeforms, or cultural features on the ray. Returns the first one found, and the range. Parameter rotBody should be the SR of the gun articulated part, if there is one; otherwise, the entity SR.
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
VRF4API_METHOD const DtSimulationServices * simManager() const
This is the deprecated API that can be used as a reference to migrate 4.X code to 5...
Definition: simComponent.h:583
virtual DtReal setTarget(makVrf::DtArticulatedPartStateRepository *rotBody)
Uses targetSelection() to try to find an entity in the gun's line of fire; if it finds one...
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
bool myReportedNoArticulation
Definition: ballisticGunJoy.h:143
virtual makVrfEvents::DtDetonationEvent * manualDetonationInteraction(makVrf::DtArticulatedPartStateRepository *rotBody, DtReal &detTime, DtReal dist)
virtual makVrfEvents::DtFireEvent * manualFireInteraction(makVrf::DtArticulatedPartStateRepository *rotBody)
Creates a fire interaction. Uses the currentTarget in the PSR as the fire target, if present...
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
virtual DtReal distanceToTarget()
A locally simulated VRF object.
Definition: localObject.h:98