29 #define DEBUG_MUZZLE_POSITION 0
68 virtual void initPendingDetonations();
72 virtual const char*
type()
const;
89 virtual void fire(
int roundsToFire,
bool computePHit);
102 virtual bool checkHitProbability(
const DtEntityType& type, DtReal
103 range,
int burstSize = 1);
107 virtual double hitProbabilityModifier(
const DtEntityType& type,
108 DtReal range,
int burstSize = 1);
113 virtual double targetMotionHitModifier(
const DtEntityType& type, DtReal
118 virtual double selfMotionHitModifier(
const DtEntityType& type, DtReal
123 virtual double skillLevelModifier(
const double range);
128 virtual double lifeformPostureModifier();
133 virtual double burstSizeModifier(
int burstSize);
166 DtTime& detTime,
bool& isHit,
167 bool assureMiss =
false);
177 virtual void getMissLocation(
DtVector gunPosition,
178 const DtSimObject *intendedTarget,
double muzzleSpeed,
180 DtDetonationResult& detonationResult,
200 virtual DtString probabilityString()
const;
203 virtual DtVector calculateMuzzlePosition()
const;
205 virtual DtVector calculateGunOffset()
const;
222 virtual double maxGunRange()
const;
224 #if DEBUG_MUZZLE_POSITION
237 static void detonationCallback(
DtTimer * timer);
243 static void setTracerUseCallback(
DtSimMessage * msg,
void *component);
272 virtual bool createPSR();
281 virtual void addRangeItems();
286 virtual bool aimGun();
293 virtual DtEntityType munitionType(
DtSimMunition& munitionEntry);
295 #if DEBUG_MUZZLE_POSITION
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAnalogInputPort * myAimElevationInputPort
Input Port Name: aim-elevation Input Port Description: Elevation at which to aim, in radians...
Definition: ballisticGun.h:380
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: ballisticGun.h:384
Instances of DtTimer are used to maintain the information needed to represent some kind of scheduled ...
Definition: timer.h:38
virtual bool taskVisualizationsActive() const
Returns true if task visualizations are currently active for this component. Default behavior is to r...
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
DtReal myMuzzleSpeed
Definition: ballisticGun.h:318
DtVector myMuzzleOffset
Definition: ballisticGun.h:319
Definition: fireEvent.h:16
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
DtVrfBalGunPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: ballisticGun.h:332
virtual bool init()
Overridden to cache a pointer to the entity's radio in this class.
DtBallisticGun provides a simple model of a ballistic gun.
Definition: ballisticGun.h:43
DtReal myMaxGunRange
This max gun range is determined by the P(hit) tables. It is computed once at init time and saved for...
Definition: ballisticGun.h:316
DtString myCurrentEventId
Definition: ballisticGun.h:328
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Definition: readerWriter.h:85
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
DtBooleanInputPort * myLoadedPort
Input Port Name: loaded Input Port Description: Must be True for gun to fire. Input Port Range: Inpu...
Definition: ballisticGun.h:364
This file contains the class declaration for the.
Definition: detonationEvent.h:20
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtObjectType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
Definition: actuatorComponent.h:47
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: ballisticGun.h:387
DtBallisticGunDescriptor; a descriptor for the DtBallisticGun component.
Definition: ballisticGunDescriptor.h:36
DtArtPartType myGunArtPart
Definition: ballisticGun.h:327
DtMovementSimObjectFacade myCurrentTargetSimObjectFacade
Definition: ballisticGun.h:388
DtIntegerInputPort * myQuantityInputPort
Input Port Name: quantity Input Port Description: Indicates the number of rounds to be fired with a s...
Definition: ballisticGun.h:357
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:436
class DtDetonationDescriptor:
Definition: detonationDescriptor.h:32
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtList myTimerList
Definition: ballisticGun.h:326
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
DtInputPortGroup * myBalGunControlPortGroup
Input Port Group Name: gun-control Input Port Group Description:
Definition: ballisticGun.h:339
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
DtReal myCurrentRange
Definition: ballisticGun.h:324
DtBallisticGunDescriptor * myBalGunDescriptor
Definition: ballisticGun.h:311
DtSimObjectReference myCurrentTarget
These are set by createFireInteraction and used by createDetonationInteraction.
Definition: ballisticGun.h:323
DtBooleanInputPort * myTriggerPort
Input Port Name: trigger Input Port Description: Edge-triggered input which fires a round whenever a ...
Definition: ballisticGun.h:347
DtSimMunition class.
Definition: simMunition.h:31
Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic g...
Definition: vrfBalGunPSR.h:38
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
DtIntegerInputPort * myLosPort
Input Port Name: line-of-sight Input Port Description: Indicates the result of a line of sight calcul...
Definition: ballisticGun.h:374