VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtIndirectFireWeaponController Class Reference

DtIndirectFireWeaponController is a controller that models firing an indirect fire weapon (e.g. a cannon).

Developer Description: Extends the DtBaseWeaponController with the additional ports needed to specify target location and maximum range.

Uses Descriptor Type: DtBaseWeaponControllerDescriptor

Inheritance diagram for DtIndirectFireWeaponController:
Inheritance graph
[legend]

Public Member Functions

 DtIndirectFireWeaponController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtIndirectFireWeaponController () override
 
virtual const chartype () const override
 
virtual bool init () override
 
virtual bool createMountingController () override
 
virtual void preFirstTickInit () override
 
virtual void tick () override
 
virtual bool createTargetPointPort ()
 
virtual DtVectorOutputPorttargetPointPort () const
 
virtual bool createMuzzleSpeedPort ()
 
virtual DtAnalogOutputPortmuzzleSpeedPort () const
 
virtual bool createAngleOfFirePort ()
 
virtual DtAnalogOutputPortangleOfFirePort () const
 
virtual bool createAlignedDirectlyPort ()
 
virtual DtBooleanOutputPortalignedDirectlyPort () const
 
virtual bool createMuzzleOffsetPort ()
 
virtual DtVectorInputPortmuzzleOffsetPort () const
 
virtual DtVrfIndirectFirePSRindirectFireProcessState ()
 
virtual const
DtVrfIndirectFirePSR
indirectFireProcessState () const
 
virtual bool haveAmmo (const DtEntityType &ammoName) const
 
virtual int ammoAmount (const DtEntityType &ammoName) const
 
virtual DtEntityType findDefaultAmmo () const
 
virtual void getMunitionFromResourceName (const DtEntityType &resourceName, DtSimMunition &munition) const
 
virtual const DtSimResourcelookupMunitionResource (const DtEntityType &resource) const
 
virtual void setMyFuzeToUse (DtDetonatorFuze fuzeToUse)
 
virtual DtDetonatorFuze fuzeToUse () const
 
virtual void setCurrentMuzzleSpeed (DtReal speed)
 
virtual DtReal currentMuzzleSpeed () const
 
virtual void addRangeItems ()
 
virtual bool initializeController (const DtEntityType &ammoType, DtReal heightAboveTerrain, const DtUUID &targetName, DtVector targetLocation, bool &waitingForTerrain, DtDetonatorFuze fuseType, bool generateKnownTargetPoint=false, const DtString &knownTargetPointName="")
 
- Public Member Functions inherited from DtBaseWeaponController
 DtBaseWeaponController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtBaseWeaponController () override
 
virtual bool postAddComponentsInit () override
 
virtual void fire ()
 
virtual bool waitingForFire ()
 
virtual void setWaitingForFire (bool waiting)
 
virtual bool createWeaponOutputPortGroup ()
 
virtual DtOutputPortGroupweaponOutputPortGroup ()
 
virtual bool createWeaponInputPortGroup ()
 
virtual DtInputPortGroupweaponInputPortGroup ()
 
virtual bool createTriggerPort ()
 
virtual DtBooleanOutputPorttriggerPort () const
 
virtual bool createLoadAmmunitionPort ()
 
virtual DtAmmunitionOutputPortloadAmmunitionPort () const
 
virtual bool createLoadedPort ()
 
virtual DtBooleanOutputPortloadedPort () const
 
virtual bool createArtPartTypePort ()
 
virtual DtIntegerInputPortartPartTypePort () const
 
virtual void setPreloadWeapon (bool doPreload)
 
virtual bool preloadWeapon () const
 
virtual void setLoadAmmoTime (DtTime loadAmmoTime)
 
virtual DtTime loadAmmoTime () const
 
virtual void setUnloadAmmoTime (DtTime unloadAmmoTime)
 
virtual DtTime unloadAmmoTime () const
 
virtual void setMaxVehicleSpeedToFire (DtReal maxVehicleSpeedToFire)
 
virtual DtReal maxVehicleSpeedToFire () const
 
virtual bool weaponCorrectlyOriented () const
 
virtual void initProcessSR ()
 
virtual DtBaseMountingControllermountingController ()
 
virtual void setCurrentMunitionType (const DtEntityType &currentMunitionName)
 
virtual const DtEntityType & currentMunitionType () const
 
virtual DtVrfWeaponPSRweaponProcessState ()
 
virtual const DtVrfWeaponPSRweaponProcessState () const
 
virtual void setMaxAzimuthAngleOffBoresight (DtReal maxAngle)
 
virtual DtReal maxAzimuthAngleOffBoresight () const
 
virtual void setMaxElevationAngleOffBoresight (DtReal maxAngle)
 
virtual DtReal maxElevationAngleOffBoresight () const
 
- Public Member Functions inherited from DtSingleTaskControllerComponent
 DtSingleTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtSingleTaskControllerComponent () override
 
virtual void postTick () override
 
virtual bool beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState) override
 
virtual void taskNotify (const DtSimTask &task) override
 
virtual void taskComplete (bool success=true)
 
virtual void suspendTask ()
 
virtual int sendSubtask (DtSimTask &task)
 
virtual void clearSubtask (int subtaskId)
 
virtual void addPendingSubtaskId (int subtaskId)
 
virtual bool findPendingSubtaskId (int subtaskId)
 
virtual bool isSubtasked () const
 
virtual void removePendingSubtaskId (int subtaskId)
 
virtual void removeAllPendingSubtaskIds ()
 
virtual std::vector< intcurrentPendingSubstaskIds () const
 
virtual DtSubtaskStatusEntrysubtaskStatus (int subtaskId)
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessagecurrentTaskMessage () const
 
virtual DtSimTaskStatePtr currentTaskState () const
 
virtual bool decideToGiveUpTask () const
 
virtual void giveUpTask ()
 
virtual bool taskActive (int taskId) const override
 
virtual bool clearTopLevelTasks () override
 
virtual void clearConflictingTopLevelTasks (const DtSimTaskMessageType &conflictType) override
 
virtual void clearTasksByType (const DtSimTaskMessageType &taskType) override
 
virtual void clearTaskById (int taskId) override
 
virtual DtSuspendedTaskInfosuspendTaskById (int taskId) override
 
virtual DtSuspendedTaskInfosuspendSubtaskById (int taskId, int subtaskId) override
 
virtual std::list
< DtTaskMessage * > 
currentTaskMessages () const override
 
virtual DtTaskWithTaskStateListPtr topLevelTasks () const override
 
virtual void updateImgui () override
 
virtual void initializeTaskInformationStateProperty (const DtSimTaskMessageType &taskType)
 
virtual void updateCurrentTaskInformationStatusProperty (const DtString &status)
 
virtual DtString taskInformationStatusPropertyValue (const DtSimTaskMessageType &taskType) const
 
virtual DtString currentTaskInformationStatusPropertyValue () const
 
virtual DtRwPropertiesStructuretaskInformationProperty (const DtSimTaskMessageType &taskType)
 
virtual DtRwPropertiesStructurecurrentTaskInformationProperty ()
 
- Public Member Functions inherited from DtTaskControllerComponent
 DtTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtTaskControllerComponent () override
 
virtual bool showCurrentTaskInGui () const
 
virtual void setRadio (DtSimRadio *radio) override
 
virtual void registerTaskMsgCallbacks ()
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void sendTaskCanceled (DtTaskMessage *taskMsg)
 
virtual bool taskVisualizationsActive () const override
 
virtual void setTasked (bool tasked)
 
virtual bool tasked () const
 
- Public Member Functions inherited from DtControllerComponent
 DtControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtControllerComponent () override
 
virtual DtSimRadioradio ()
 
virtual void enableTaskTypes ()
 
virtual void enableScriptedTask (const DtString &scriptId)
 
virtual void disableTaskTypes ()
 
- Public Member Functions inherited from DtSimComponent
 DtSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSimComponent () override
 
virtual void setParentSystem (DtComponentSystem *system)
 
DtComponentSystemparentSystem () const
 
virtual void timedTick ()
 
virtual void setMinTickPeriod (double minTickPeriod, double minTickPeriodVariance)
 
virtual void setupFirstTickTime ()
 
virtual void setEntity (DtLocalObject *entity)
 
virtual DtSimComponentnextComponent ()
 
virtual DtSimComponentprevComponent ()
 
virtual void setListItem (DtListItem *item)
 
virtual DtListItem * listItem ()
 
virtual void putData (std::string &fp, int indentLevel=0) override
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
 
virtual void addInputPort (DtInputPort *port)
 
virtual void removeInputPort (DtInputPort *port)
 
virtual DtInputPortlookupInputPort (const DtString &portName)
 
virtual DtList inputPortList () const
 
virtual void addOutputPort (DtOutputPort *port)
 
virtual void removeOutputPort (DtOutputPort *port)
 
virtual DtOutputPortlookupOutputPort (const DtString &portName)
 
virtual DtList outputPortList () const
 
virtual void addInputPortGroup (DtInputPortGroup *group)
 
virtual void removeInputPortGroup (DtInputPortGroup *group)
 
virtual DtInputPortGrouplookupInputPortGroup (const DtString &groupName)
 
virtual DtList inputPortGroupList () const
 
virtual void addOutputPortGroup (DtOutputPortGroup *group)
 
virtual void removeOutputPortGroup (DtOutputPortGroup *group)
 
virtual DtOutputPortGrouplookupOutputPortGroup (const DtString &groupName)
 
virtual DtList outputPortGroupList () const
 
virtual int priority () const
 
virtual void setPriority (int priority)
 
double dT () const
 
virtual void setDT (double deltaT)
 
virtual void setComponentDescriptor (DtComponentDescriptor *componentDescriptor)
 
virtual const
DtComponentDescriptor
componentDescriptor () const
 
virtual bool tickWhileDestroyed () const
 
DtVrfProcessStateRepositoryManagerpsrManager ()
 
virtual const DtSymbolStringcomponentFullName () const
 
DtPhysicalWorldphysicalWorld ()
 
const DtPhysicalWorldphysicalWorld () const
 
const DtAttachedTerrainterrainAttachedTo () const
 
DtLocalObjectentity ()
 
const DtLocalObjectentity () const
 
DtSimulationServicessimulationServices ()
 
const DtSimulationServicessimulationServices () const
 
const Coordinate_SystemcoordinateSystem () const
 
virtual void isClutterChanged ()
 
virtual bool taskVisualizationsEnabled () const
 
makVrf::DtTaskVisualizationMaptaskVisualizations ()
 
virtual bool debugActive () const
 
virtual bool isEnabled ()
 
virtual void setIsEnabled (bool yesNo)
 
virtual DtOutputStream & objectConsoleDebug (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleVerbose (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleInfo (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleWarn (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleError (const DtString &channel="") const
 
virtual int notifyLevel () const
 
virtual DtSimResourceManagerresourceManager ()
 
virtual const
DtSimResourceManager
resourceManager () const
 
VRF4API_METHOD const
DtSimulationServices
simManager () const
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs) const
 
virtual ~DtReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void postPutSelf ()
 
virtual void prePutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void postGetSelf ()
 
virtual void preGetSelf ()
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContaineraliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const charreaderWriterType () const
 
virtual const charxmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
- Static Public Member Functions inherited from DtBaseWeaponController
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
- Static Public Member Functions inherited from DtTaskControllerComponent
static void deprecatedTaskProcessorCallbackAdapter (DtSimMessage *msg, void *usr, DtSimTaskStatePtr taskState)
 
- Static Public Member Functions inherited from DtSimComponent
static DtSimComponentFactoryfactory ()
 
static void setFactory (DtSimComponentFactory *factory)
 
static DtSimComponentcreateComponent (const DtString &name, const DtString &type, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentSystem *parentSystem, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static void addSimComponentCreatorFcn (const DtString &type, DtSimComponentCreatorFcn fcn)
 
static VRF4API_METHOD
DtSimComponent
MarkThreadSafe (DtSimComponent *comp)
 
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Member Functions

virtual bool createPorts () override
 
virtual void lookupAndCacheProcessSR () override
 
virtual bool calculateTrajectory (const DtVector &shooterLoc, const DtVector &detonationLoc, const double maxRange)
 
virtual void calculateTrajectoryWithHeight (double horizontalDist, double verticalDist, double maxHeight, double &muzzleSpeed, double &launchAngle, double &flightTime)
 
virtual bool calculateElevationAngle (double lateralDist, double verticalDist, double muzzleSpeed, double &angle, double &flightTime, double &maxHeight) const
 
virtual bool checkMuzzleSpeedAndAngle (double lateralDist, double verticalDist, double speed, double angle, double &flightTime, double &maxHeight) const
 
virtual void getMunitionResources (std::list< DtEntityType > &resourceList)
 
virtual void updateResourceList ()
 
virtual void resetResourceList ()
 
virtual AcceptLevel acceptTask (const DtTaskMessage &task) override
 
virtual bool processFFEOnLocation (DtFireForEffectOnTargetTask *ffeTask)
 
virtual bool processFFEOnEnvironmental (DtFireForEffectOnTargetTask *ffeTask)
 
virtual void processFFETask (DtFireForEffectTask *task, const DtUUID &targetObj, const DtVector &targetLoc)
 
virtual DtVector computeLeadPosition (const DtVector &position, const DtVector &velocity)
 
virtual const DtVector & muzzleLocalPosition ()
 
virtual DtReaderWriterprocessProvideWeaponName ()
 
virtual double preferredAltitude () const
 
 DtIndirectFireWeaponController ()
 
 DtIndirectFireWeaponController (const DtIndirectFireWeaponController &orig)
 
const
DtIndirectFireWeaponController
operator= (const DtIndirectFireWeaponController &orig)
 
virtual void enable () override
 
virtual void disable () override
 
virtual void clearTask () override
 
virtual void restartTask ()
 
virtual void getOrientation (DtRwString *orientString, DtRwTaitBryan &orientation) const
 
virtual bool positionWithinTargetRegion (const DtVector &localPos)
 
virtual DtSimTaskcreateFireTask (const DtRwLocationReference &locRef)
 
virtual double maximumRange ()
 
virtual double minimumRange ()
 
virtual void parseWeaponParams (const DtRwString *weaponToUse, DtString &weapId, DtString &weapName, DtEntityType &ammoType)
 
virtual bool processFFEOnTargetTask (DtSimMessage *msg)
 
- Protected Member Functions inherited from DtBaseWeaponController
virtual bool createPortGroups () override
 
virtual DtString weaponId () const
 
virtual bool weaponStowable ()
 
virtual bool weaponStowed ()
 
virtual bool weaponInTransition ()
 
virtual void setWeaponStowed (bool v)
 
virtual void processSetStowWeapon (DtSimMessage *msg)
 
 DtBaseWeaponController ()
 
 DtBaseWeaponController (const DtBaseWeaponController &orig)
 
const DtBaseWeaponControlleroperator= (const DtBaseWeaponController &orig)
 
- Protected Member Functions inherited from DtSingleTaskControllerComponent
virtual void clearPendingSubtasks ()
 
virtual void clearSubtasksByType (const DtSimTaskMessageType &taskType)
 
virtual void cleanupInactiveSubtaskStatus ()
 
- Protected Member Functions inherited from DtTaskControllerComponent
virtual void suspendSubtasksOfTask (int taskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual void suspendSubtaskOfTask (int taskId, int subtaskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual DtSimTaskMessageType remapScriptId (const DtSimTaskMessageType &) const
 
- Protected Member Functions inherited from DtControllerComponent
 DtControllerComponent ()
 
 DtControllerComponent (const DtControllerComponent &orig)
 
const DtControllerComponentoperator= (const DtControllerComponent &orig)
 
virtual void onRestore () override
 
virtual void initializeTargetingControlTableFromDescriptor (const DtReaderWriter *)
 
virtual void sendCapableSetsAndTasks ()
 
- Protected Member Functions inherited from DtSimComponent
virtual void setupTimedTickLogic (double minTickPeriod, double minTickPeriodVariance)
 
virtual double computeCurrentTime ()
 
bool testInvariant () const
 
DtVrfProcessStateRepositorycreateComponentPsr (const DtString &defaultPsrType, const DtString &defaultPsrName, bool useDescriptorParams=true)
 
virtual void updateTaskVisualizations ()
 
virtual void destroyTaskVisualizations ()
 
virtual void destroyTaskVisualization (const DtString &name)
 
virtual
makVrf::DtPointTaskVisualizationPtr 
pointTaskVisualization (const DtString &name)
 
virtual
makVrf::DtLineTaskVisualizationPtr 
lineTaskVisualization (const DtString &name)
 
virtual
makVrf::DtAreaTaskVisualizationPtr 
areaTaskVisualization (const DtString &name)
 
virtual
makVrf::DtTextTaskVisualizationPtr 
textTaskVisualization (const DtString &name)
 
double calculateNextTaskVisTickTime () const
 
DtVrfObjectStateRepositorylocalStateRepository ()
 
const DtVrfObjectStateRepositorylocalStateRepository () const
 
DtPropertyInterfacecachedNextFrameStateProperty (DtPropertyInterface **prop, const DtString &propName)
 
template<typename ValType >
void setCachedNextFrameStatePropertyValue (DtPropertyInterface **prop, const DtString &propName, ValType value)
 
const DtPropertyInterfacecachedCurrentFrameStateProperty (const DtPropertyInterface **prop, const DtString &propName) const
 
template<typename ValType >
bool getCachedCurrentFrameStatePropertyValue (const DtPropertyInterface **prop, const DtString &propName, ValType &value) const
 
void addSimObjectPredicateCallback (DtSimObjectReference, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void removeSimObjectPredicateCallback (const DtSimObject *, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void invokeSimObjectPredicateCallbacks ()
 
virtual void clearPredicateCallbacks ()
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 

Static Protected Member Functions

static void FFEOnTargetCallback (DtSimMessage *msg, void *usr)
 
- Static Protected Member Functions inherited from DtBaseWeaponController
static void setStowWeaponCallback (DtSimMessage *msg, void *usrData)
 

Protected Attributes

DtIndirectWeaponComponentInterfacemyWeaponComponentInterface
 
DtDetonatorFuze myFuzeToUse
 
DtReal myCurrentMuzzleSpeed
 
DtReal myCurrentMunitionFlightTime
 
DtReal myCurrentElevationAngle
 
bool myWeaponIsAimed
 
DtSimMunition myMunitionToUse
 
DtIndirectFireControllerDescriptormyIndFireDescriptor
 
DtMountingControllermyMountingController
 
bool myIsDirectFire
 
DtGenericWeaponInfomyWeaponInfo
 
boost::signals2::connection myResourceChangedBySetConnection
 
Ports and Port Groups
DtVectorOutputPortmyTargetPointPort
 
DtAnalogOutputPortmyMuzzleSpeedPort
 
DtAnalogOutputPortmyAngleOfFirePort
 
DtBooleanOutputPortmyAlignedDirectlyPort
 
DtVectorInputPortmyMuzzleOffsetPort
 
- Protected Attributes inherited from DtBaseWeaponController
bool myDoWeaponPreload
 
bool myWaitingForFire
 
DtReal myFireMaxVehicleSpeed
 
DtReal myMaxAzimuthAngleOffBoresight
 
DtReal myMaxElevationAngleOffBoresight
 
const
DtBaseWeaponControllerDescriptor
myBaseWeaponCtlrDesc
 
DtBaseMountingControllermyBaseMountingController
 
DtVrfWeaponPSRmyWeaponProcessState
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
DtOutputPortGroupmyWeaponOutputPortGroup
 
DtAmmunitionOutputPortmyLoadAmmunitionPort
 
DtBooleanOutputPortmyTriggerPort
 
DtBooleanOutputPortmyLoadedPort
 
DtInputPortGroupmyWeaponInputPortGroup
 
DtIntegerInputPortmyArtPartTypePort
 
DtIntegerInputPortmyStowedStateInputPort
 
DtBooleanOutputPortmyStowCommandOutputPort
 
- Protected Attributes inherited from DtTaskControllerComponent
DtTaskCallbackMap myTaskCallbackMap
 
std::list
< DtTaskProcessorCallbackInfo * > 
myTaskProcessorCallbackInfoList
 
bool myTaskIsRunning
 
- Protected Attributes inherited from DtControllerComponent
DtSimRadiomyRadio
 
bool myTaskTypesEnabled
 
bool myInitialized
 
- Protected Attributes inherited from DtSimComponent
DtLocalObjectmyEntity
 
DtComponentSystemmySystem
 
DtListItem * myListItem
 
DtInputPortMap myInputPortList
 
DtOutputPortMap myOutputPortList
 
DtInputPortGroupMap myInputPortGroupList
 
DtOutputPortGroupMap myOutputPortGroupList
 
int myPriority
 
double myLastTickSimTime
 
std::unique_ptr< DtTimedTickLogicmyTimedTickLogic
 
double myDT
 
bool myIsEnabled
 
bool myFirstTick
 
const DtComponentDescriptormyComponentDescriptor
 
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 
makVrf::DtTaskVisualizationMap myTaskVisualizations
 
double myNextTaskVisTickTime
 
DtSymbolString myFullComponentName
 
DtSimulationServicesmySimServices
 
DtPredicateCallbackManagermyPredicateCallbackManager
 
boost::signals2::scoped_connection myIsClutterChangedConnection
 
bool myLocalDebug
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 
virtual void registerAttributeFunctions () override
 
static DtReaderWriterprovideWeaponName (void *controller)
 
virtual void processSetPreferredAltitude (DtSimMessage *msg)
 
static void setPreferredAltitudeCallback (DtSimMessage *msg, void *usrData)
 
virtual void processIndirectFireAtLocationTask (DtSimMessage *msg)
 
virtual void processIndirectFireAtTargetTask (DtSimMessage *msg)
 
static void indirectFireAtLocationTaskCallback (DtSimMessage *msg, void *usr)
 
static void indirectFireAtTargetTaskCallback (DtSimMessage *msg, void *usr)
 

Additional Inherited Members

- Public Types inherited from DtTaskControllerComponent
enum  AcceptLevel { AcceptLevel_Accept = 0, AcceptLevel_Partial = 1, AcceptLevel_Error = 2, AcceptLevel_NoAccept = 99 }
 
- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 
- Public Attributes inherited from DtSingleTaskControllerComponent
const DtString TaskStatusRunning = "TaskRunning"
 
const DtString TaskStatusNotActive = "TaskNotActive"
 
- Protected Types inherited from DtTaskControllerComponent
typedef std::pair
< DtTaskMessageCallbackFcn,
void * > 
DtTaskCallbackMapPair
 
typedef std::map
< DtSimTaskMessageType,
DtTaskCallbackMapPair
DtTaskCallbackMap
 
- Protected Types inherited from DtSimComponent
typedef std::map< DtString,
DtInputPort * > 
DtInputPortMap
 
typedef std::map< DtString,
DtOutputPort * > 
DtOutputPortMap
 
typedef std::map< DtString,
DtInputPortGroup * > 
DtInputPortGroupMap
 
typedef std::map< DtString,
DtOutputPortGroup * > 
DtOutputPortGroupMap
 
- Static Protected Attributes inherited from DtSimComponent
static DtSimComponentFactorymyFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Constructor & Destructor Documentation

DtIndirectFireWeaponController::DtIndirectFireWeaponController ( const DtString name,
DtLocalObject owner,
DtSimulationServices simManager,
DtComponentDescriptor desc = nullptr,
DtReaderWriterRegistry parentRegistry = nullptr 
)

Parameters
nameReader writer name of this component.
ownerThe DtLocalObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
virtual DtIndirectFireWeaponController::~DtIndirectFireWeaponController ( )
overridevirtual

destructor

DtIndirectFireWeaponController::DtIndirectFireWeaponController ( )
protected

default constructor; not implemented

DtIndirectFireWeaponController::DtIndirectFireWeaponController ( const DtIndirectFireWeaponController orig)
protected

copy constructor; not implemented

Member Function Documentation

virtual const char* DtIndirectFireWeaponController::type ( ) const
overridevirtual

Returns a string identifies the class type of component. Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key. Warning: this function should always return the same pointer and it should be valid forever. This means the data should be static.

Returns
DtIndirectFireWeaponControllerType

Reimplemented from DtBaseWeaponController.

virtual bool DtIndirectFireWeaponController::init ( )
overridevirtual

Overridden to initialize values obtained from the descriptor.

Reimplemented from DtBaseWeaponController.

virtual bool DtIndirectFireWeaponController::createMountingController ( )
overridevirtual

Overridden to create a DtMountingController.

Reimplemented from DtBaseWeaponController.

virtual void DtIndirectFireWeaponController::preFirstTickInit ( )
overridevirtual

Restores the checkpointed values of myCurrentMunition and myCurrentFuze from the the munition loader of the DtVrfBalGunPSR. Calls setDisplayName on myWeaponComponentInterface with the value from the PSR.

Reimplemented from DtBaseWeaponController.

virtual void DtIndirectFireWeaponController::tick ( )
overridevirtual

Sets the current dT on the base mounting controller and ticks it.

Reimplemented from DtBaseWeaponController.

virtual bool DtIndirectFireWeaponController::createTargetPointPort ( )
virtual

Creates a new DtVectorPort named "target-point-port".

virtual DtVectorOutputPort* DtIndirectFireWeaponController::targetPointPort ( ) const
virtual

Accessor for the target point port.

virtual bool DtIndirectFireWeaponController::createMuzzleSpeedPort ( )
virtual

Creates a new DtAnalogPort named "muzzle-speed-port".

virtual DtAnalogOutputPort* DtIndirectFireWeaponController::muzzleSpeedPort ( ) const
virtual

Accessor for the muzzle speed port.

virtual bool DtIndirectFireWeaponController::createAngleOfFirePort ( )
virtual

Creates a new DtAnalogPort named "angle-of-fire-port".

virtual DtAnalogOutputPort* DtIndirectFireWeaponController::angleOfFirePort ( ) const
virtual

Accessor for the muzzle speed port.

virtual bool DtIndirectFireWeaponController::createAlignedDirectlyPort ( )
virtual

Creates a new DtBooleanPort named "aligned-directly-port".

virtual DtBooleanOutputPort* DtIndirectFireWeaponController::alignedDirectlyPort ( ) const
virtual

Accessor for the max range port.

virtual bool DtIndirectFireWeaponController::createMuzzleOffsetPort ( )
virtual

Creates a new DtVectorInputPort named "muzzle-offset-port".

virtual DtVectorInputPort* DtIndirectFireWeaponController::muzzleOffsetPort ( ) const
virtual

Accessor for the muzzle offset port.

static DtSimComponent* DtIndirectFireWeaponController::creator ( const DtString name,
DtLocalObject owner,
DtSimulationServices simManager,
DtComponentDescriptor desc = nullptr,
DtReaderWriterRegistry parentRegistry = nullptr 
)
static

Parameters
nameReader writer name of this component.
ownerThe DtLocalObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
Returns
New instance of this class.
virtual DtVrfIndirectFirePSR* DtIndirectFireWeaponController::indirectFireProcessState ( )
virtual
virtual const DtVrfIndirectFirePSR* DtIndirectFireWeaponController::indirectFireProcessState ( ) const
virtual
virtual void DtIndirectFireWeaponController::registerAttributeFunctions ( )
overridevirtual

Attribute functions:Overrides the simComponent version to register the functions below.

Reimplemented from DtSimComponent.

static DtReaderWriter* DtIndirectFireWeaponController::provideWeaponName ( void *  controller)
static

Function to be registered as a provider with the parent component system for the weapon-name attribute. This name is used in indirect fire tasks (along with an optional munition name) to identify the entity weapon to fire. This distinction is needed when there are multiple weapons, e.g. ship turrets. Calls processProvideWeaponName.

virtual bool DtIndirectFireWeaponController::haveAmmo ( const DtEntityType &  ammoName) const
virtual

Returns true if lookupMunitionResource() can locate a resource with the given ammoName && the resource is not empty.

virtual int DtIndirectFireWeaponController::ammoAmount ( const DtEntityType &  ammoName) const
virtual

Returns the ammount of a given munition resource. Returns 0 if lookupMunitionResource() can not locate a resource with the given ammoName or the resource is empty.

virtual DtEntityType DtIndirectFireWeaponController::findDefaultAmmo ( ) const
virtual

Goes through the ammo list in myIndFireDescriptor and returns the first ammo type for which haveAmmo() returns true.

virtual void DtIndirectFireWeaponController::getMunitionFromResourceName ( const DtEntityType &  resourceName,
DtSimMunition munition 
) const
virtual

If lookupMunitionResource is able to locate the given resourceName, the given munition parameter will be assigned it's munitionType().

virtual const DtSimResource* DtIndirectFireWeaponController::lookupMunitionResource ( const DtEntityType &  resource) const
virtual

Attempts to locate the given resource in the entity's state repository, and if it is a DtMunitionResource, it will be returned.

virtual void DtIndirectFireWeaponController::setMyFuzeToUse ( DtDetonatorFuze  fuzeToUse)
virtual

mutator for myFuzeToUse

virtual DtDetonatorFuze DtIndirectFireWeaponController::fuzeToUse ( ) const
virtual

accessor for myFuzeToUse

virtual void DtIndirectFireWeaponController::setCurrentMuzzleSpeed ( DtReal  speed)
virtual

Set the current muzzle speed.

virtual DtReal DtIndirectFireWeaponController::currentMuzzleSpeed ( ) const
virtual

Get the current muzzle speed.

virtual void DtIndirectFireWeaponController::addRangeItems ( )
virtual
virtual bool DtIndirectFireWeaponController::initializeController ( const DtEntityType &  ammoType,
DtReal  heightAboveTerrain,
const DtUUID targetName,
DtVector  targetLocation,
bool waitingForTerrain,
DtDetonatorFuze  fuseType,
bool  generateKnownTargetPoint = false,
const DtString knownTargetPointName = "" 
)
virtual

Sets up the controller with the given parameters. Called in preFirstTickInit to restore the controller if the task is being restored from a scenario load, and by tick() in response to a new fire task as signaled by weaponInterface->initializeWeapon.

virtual bool DtIndirectFireWeaponController::createPorts ( )
overrideprotectedvirtual

Overridden to call createTargetPointPort and createMaxRangePort.

Reimplemented from DtBaseWeaponController.

virtual void DtIndirectFireWeaponController::lookupAndCacheProcessSR ( )
overrideprotectedvirtual

This function looks up a process state repository in the process state repository manager by name, and caches a pointer to it in myWeaponProcessState. The name (if it exists) is given in the component descriptor (DtComponentDescriptor::processStateRepositoryName). If the name does not exist, it uses the appropriate default name defined in psrTypes.h. Another component is responsible for creating and destroying the process state repository. Overridden from DtBaseWeaponController to print a warning if it can't be cast to the derived type of process state repository, DtVrfIndirectFirePSR.

Reimplemented from DtBaseWeaponController.

virtual bool DtIndirectFireWeaponController::calculateTrajectory ( const DtVector &  shooterLoc,
const DtVector &  detonationLoc,
const double  maxRange 
)
protectedvirtual

Calculates a trajectory for the munition in order to reach a specified detonation location from a specified shooter location, in local coordinates. Returns true if successful. Populates myCurrentMuzzleSpeed, myCurrentMunitionFlightTime, and myCurrentElevationAngle with the calculated values. Also calls setDesiredElevation on the mounting controller. If there is not a set list of muzzle speeds( i.e. various range trajectories) which is the case for grenades, will need to use range passed in to ensure say within max range capability of human throwing.

virtual void DtIndirectFireWeaponController::calculateTrajectoryWithHeight ( double  horizontalDist,
double  verticalDist,
double  maxHeight,
double muzzleSpeed,
double launchAngle,
double flightTime 
)
protectedvirtual

Calculates a trajectory for the munition in order to reach a target at the given horizontal and vertical distance from the shooter, with the peak of the arc happening at the specified height above the shooter.

virtual bool DtIndirectFireWeaponController::calculateElevationAngle ( double  lateralDist,
double  verticalDist,
double  muzzleSpeed,
double angle,
double flightTime,
double maxHeight 
) const
protectedvirtual

Calculates the gun elevation angle needed to hit a point at the given distance with the given muzzle speed. Fills in the flightTime and maxHeight of the trajectory. Returns false if no valid angle could be found.

virtual bool DtIndirectFireWeaponController::checkMuzzleSpeedAndAngle ( double  lateralDist,
double  verticalDist,
double  speed,
double  angle,
double flightTime,
double maxHeight 
) const
protectedvirtual

Determines the acceptability of a shot with the given muzzle speed and elevation angle for a target at the given lateral and vertical distance. If shot is acceptable, fills in flightTime with the expected munition flight time and maxHeight with the height at the peak of the trajectory.

virtual void DtIndirectFireWeaponController::getMunitionResources ( std::list< DtEntityType > &  resourceList)
protectedvirtual

Called when setting up the weapon component interface. Gets all resources in the component that have amounts > 0.

virtual void DtIndirectFireWeaponController::updateResourceList ( )
protectedvirtual

Go through the resource list and remove any with amounts = 0.

virtual void DtIndirectFireWeaponController::resetResourceList ( )
protectedvirtual

Resets resource list based on current resources.

static void DtIndirectFireWeaponController::setPreferredAltitudeCallback ( DtSimMessage msg,
void *  usrData 
)
staticprotected

Processes user commands to change the preferred altitude of the trajectory.

virtual void DtIndirectFireWeaponController::processSetPreferredAltitude ( DtSimMessage msg)
protectedvirtual

Processes user commands to change the preferred altitude of the trajectory.

virtual AcceptLevel DtIndirectFireWeaponController::acceptTask ( const DtTaskMessage task)
overrideprotectedvirtual

Called by the task manager when this controller is being considered to execute a task. Only tasks which already match types that this controller has registered for will be passed. This is used for the case where multiple task controllers have registered for the same task type. This gives the controller a chance to look at the parameters of the task and to reject the execution of the task based on parameters. Controllers can return any of the AcceptLevel levels. The task manager will choose a controller with the lowest AcceptLevel to execute, but will not choose any controller that returns AcceptLevel_NoAccept. Default implementation returns AcceptLevel_Accept. Override this to check parameters and conditionally return a different AccpetLevel.

Reimplemented from DtTaskControllerComponent.

static void DtIndirectFireWeaponController::FFEOnTargetCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Process scripted task versions of FFE tasks. Variables allowed for definition For Fire For Effect on Location: location - Geocentric point . This is the location to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be.

For Fire For Effect on Target: target - object to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be Registered by registerTaskMsgCallbacks, calls processFFEOnTargetTask

virtual bool DtIndirectFireWeaponController::processFFEOnTargetTask ( DtSimMessage msg)
protectedvirtual

Processes the given FFE task. Returns true if the message is processed, even if the processing is unsuccessful. Returns false if the processing cannot be immediately completed due to the required terrain not having yet been paged in. In that case the task will be stored in the PSR and the tick() function will keep re-trying the task until it returns true.

virtual bool DtIndirectFireWeaponController::processFFEOnLocation ( DtFireForEffectOnTargetTask ffeTask)
protectedvirtual
virtual bool DtIndirectFireWeaponController::processFFEOnEnvironmental ( DtFireForEffectOnTargetTask ffeTask)
protectedvirtual
static void DtIndirectFireWeaponController::indirectFireAtLocationTaskCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Process scripted task versions of FFE tasks. Variables allowed for definition For Fire For Effect on Location: location - Geocentric point . This is the location to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be.

For Fire For Effect on Target: target - object to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be

virtual void DtIndirectFireWeaponController::processIndirectFireAtLocationTask ( DtSimMessage msg)
protectedvirtual

Process scripted task versions of FFE tasks. Variables allowed for definition For Fire For Effect on Location: location - Geocentric point . This is the location to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be.

For Fire For Effect on Target: target - object to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be

static void DtIndirectFireWeaponController::indirectFireAtTargetTaskCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Process scripted task versions of FFE tasks. Variables allowed for definition For Fire For Effect on Location: location - Geocentric point . This is the location to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be.

For Fire For Effect on Target: target - object to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be

virtual void DtIndirectFireWeaponController::processIndirectFireAtTargetTask ( DtSimMessage msg)
protectedvirtual

Process scripted task versions of FFE tasks. Variables allowed for definition For Fire For Effect on Location: location - Geocentric point . This is the location to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be.

For Fire For Effect on Target: target - object to fire upon muntition - This is a string that contains both the weapon name and the name of the particular munition to fire numRnds - Number of rounds to fire heightAboveTerrain - If an airburst is desired, define how high above the terrain it should be

virtual void DtIndirectFireWeaponController::processFFETask ( DtFireForEffectTask task,
const DtUUID targetObj,
const DtVector &  targetLoc 
)
protectedvirtual

Called by each of the processFFE methods to process the arguments in the base class of each of the FFE types, DtFireForEffectTask.

virtual DtVector DtIndirectFireWeaponController::computeLeadPosition ( const DtVector &  position,
const DtVector &  velocity 
)
protectedvirtual

Computes a position in front of a moving target that the gun should hit given the flight time of the shell.

virtual const DtVector& DtIndirectFireWeaponController::muzzleLocalPosition ( )
protectedvirtual

Computes the current local muzzle position based on the data on the myMuzzleOffsetPort and the current position of the articulated part referenced on the myArtPartTypePort.

virtual DtReaderWriter* DtIndirectFireWeaponController::processProvideWeaponName ( )
protectedvirtual

Provides the display name (a new DtRwString) of the weapon component interface for this weapon.

virtual double DtIndirectFireWeaponController::preferredAltitude ( ) const
protectedvirtual

Returns the preferred altitude above shooter and target that the munition's trajectory should reach at its peak.

const DtIndirectFireWeaponController& DtIndirectFireWeaponController::operator= ( const DtIndirectFireWeaponController orig)
protected

assignment operator; not implemented

virtual void DtIndirectFireWeaponController::enable ( )
overrideprotectedvirtual

Overridden to call registerTaskMsgCallbacks().

Reimplemented from DtTaskControllerComponent.

virtual void DtIndirectFireWeaponController::disable ( )
overrideprotectedvirtual

Overridden to allow tasks controllers that can be disabled to call task complete.

Reimplemented from DtSingleTaskControllerComponent.

virtual void DtIndirectFireWeaponController::clearTask ( )
overrideprotectedvirtual

If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false, and calls clearCurrentTaskMesage() to clear out the current task message.

Reimplemented from DtSingleTaskControllerComponent.

virtual void DtIndirectFireWeaponController::restartTask ( )
protectedvirtual

Gets the currentTaskMessage and calls the appropriate process function as if it is just receiving the task.

virtual void DtIndirectFireWeaponController::getOrientation ( DtRwString orientString,
DtRwTaitBryan orientation 
) const
protectedvirtual

Used by Fire for effect scripted tasks that have an orientation defined in them.

virtual bool DtIndirectFireWeaponController::positionWithinTargetRegion ( const DtVector &  localPos)
protectedvirtual
virtual DtSimTask* DtIndirectFireWeaponController::createFireTask ( const DtRwLocationReference locRef)
protectedvirtual
virtual double DtIndirectFireWeaponController::maximumRange ( )
protectedvirtual
virtual double DtIndirectFireWeaponController::minimumRange ( )
protectedvirtual
virtual void DtIndirectFireWeaponController::parseWeaponParams ( const DtRwString weaponToUse,
DtString weapId,
DtString weapName,
DtEntityType &  ammoType 
)
protectedvirtual

Member Data Documentation

DtIndirectWeaponComponentInterface* DtIndirectFireWeaponController::myWeaponComponentInterface
protected

Interface between this weapon controller and the entity's DtIndirectFireController.

DtDetonatorFuze DtIndirectFireWeaponController::myFuzeToUse
protected

Set based on height above terrain value.

DtReal DtIndirectFireWeaponController::myCurrentMuzzleSpeed
protected

The muzzle speed selected for the next shot.

DtReal DtIndirectFireWeaponController::myCurrentMunitionFlightTime
protected

The expected flight time for the next shot.

DtReal DtIndirectFireWeaponController::myCurrentElevationAngle
protected

The elevation angle selected for the next shot.

bool DtIndirectFireWeaponController::myWeaponIsAimed
protected

Whether the weapon is fully aimed at the target, or if adjustments still need to be made.

DtSimMunition DtIndirectFireWeaponController::myMunitionToUse
protected

This could just be a stack variable in tick, but since these are expensive to construct, we create on and reuse it.

DtIndirectFireControllerDescriptor* DtIndirectFireWeaponController::myIndFireDescriptor
protected
DtVectorOutputPort* DtIndirectFireWeaponController::myTargetPointPort
protected

Output Port Name: target-point-port
Output Port Description: Local position to fire at.
Output Port Range:
Output Port Default Value:
Output Group Parent:

DtAnalogOutputPort* DtIndirectFireWeaponController::myMuzzleSpeedPort
protected

Output Port Name: muzzle-speed-port
Output Port Description: Muzzle speed in m/s.
Output Port Range:
Output Port Default Value:
Output Group Parent:

DtAnalogOutputPort* DtIndirectFireWeaponController::myAngleOfFirePort
protected

Output Port Name: angle-of-fire-port
Output Port Description: The elevation angle of fire, in radians.
Output Port Range:
Output Port Default Value:
Output Group Parent:

DtBooleanOutputPort* DtIndirectFireWeaponController::myAlignedDirectlyPort
protected

Output Port Name: aligned-directly-port
Output Port Description: If the target is close enough for the gun to align directly with the target and the gun is capable of doing so let the actuator know so the fly out will come out straight not arched
Output Port Range:
Output Port Default Value: false
Output Group Parent:

DtVectorInputPort* DtIndirectFireWeaponController::myMuzzleOffsetPort
protected

Input Port Name: muzzle-offset-port
Input Port Description: The entity's muzzle offset location.
Input Port Range:
Input Port Default Value:
Input Group Parent:

DtMountingController* DtIndirectFireWeaponController::myMountingController
protected
bool DtIndirectFireWeaponController::myIsDirectFire
protected

If weapon is capable of directly firing on a target like a naval gun then check if the target is within the gun's minimum range and the first range entry. If so set this to true and the gun will not elevate for a parabolic artillery shot but will line up directly with the target.

DtGenericWeaponInfo* DtIndirectFireWeaponController::myWeaponInfo
protected
boost::signals2::connection DtIndirectFireWeaponController::myResourceChangedBySetConnection
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)