VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
suppressionActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 
12 #pragma once
13 
15 
17 
22 class DtSimRadio;
24 
35 
38 {
39 
40 public:
41 
44  DtSuppressionActuator(const DtString& name,
45  DtLocalObject* owner,
46  DtSimulationServices* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
52  virtual ~DtSuppressionActuator();
53 
60  virtual bool init();
61 
64  virtual bool createPSR();
65 
71  static bool processDetonationCallback(const DtDetonationContext& detonationContext, void* usr);
72 
84  virtual bool processDetonationInsult(const DtDetonationContext& detonationContext);
85 
88  virtual const char* type() const;
89 
91  virtual void tick();
92 
94  static void setDestroyedCallback(DtSimMessage* msg, void* usrData);
95 
97  static void setRestoredCallback(DtSimMessage* msg, void* usrData);
98 
102  static DtSimComponent * creator(const DtString& name,
103  DtLocalObject* owner,
104  DtSimulationServices* simManager,
105  DtComponentDescriptor* desc = 0,
106  DtReaderWriterRegistry* parentRegistry = 0);
107 
108 protected:
112  virtual void setDestroyed();
113 
116  virtual void setRestored();
117 
122  virtual bool registerForDetonations();
123 
127  virtual bool unregisterForDetonations();
128 
130  virtual void setRadio(DtSimRadio* radio);
131 
133  virtual bool isRegisteredForDetonations() const;
134  virtual void setIsRegisteredForDetonations(const bool r);
135 
141  virtual double computeRecoveryRate();
142 
148  virtual double suppressionFromInsult(const double insult);
149 
155  virtual double computeInsultToSuppressionFactor();
156 
161  virtual double decaySuppressionValue(const double oldValue,
162  const double dT);
163 
169  virtual DtVrfMovingObjectStateRepository::suppressionLevels updateSuppressionLevel(
170  const DtVrfMovingObjectStateRepository::suppressionLevels oldLevel, const double newValue);
171 
178  virtual int suppressionValueBin(const double suppressionValue);
179 
184  virtual double detonationInsult(const double maxEffect,
185  const double maxRange, const double range);
186 
192  virtual double rangeToTrajectory(const DtDetonationContext& context,
193  const double rangeToDetonation);
194 
195 protected:
197 
199 
201 
204 
205 private:
208 
211 
214 };
215 
216 
Holds data and provides accessors pertinent to Suppression adjudication. E.g. time destroyed...
Definition: suppressionActuatorPSR.h:17
DtSuppressionActuatorDescriptor * mySuppressionActuatorDescriptor
Definition: suppressionActuator.h:196
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
bool myIsRegisteredForDetonations
Definition: suppressionActuator.h:198
Contains the DtVrfMovingObjectStateRepository class declaration.
double myRecoveryRate
Definition: suppressionActuator.h:203
suppressionLevels
The current suppression level. An enumeration with 4 values. Determined from suppression value in the...
Definition: vrfObjectStateRepository.h:495
Definition: simRadio.h:30
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
virtual bool init()
Overridden to cache a pointer to the entity's radio in this class.
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtSuppressionActuatorDescriptor; descriptor for the DtDamageAdjudicationActuator component.
Definition: suppressionActuatorDescriptor.h:21
virtual void setRadio(DtSimRadio *radio)
Definition: readerWriterRegistry.h:39
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
File: simMsg.h.
Definition: simMessage.h:35
double myInsultFactor
Definition: suppressionActuator.h:202
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
The DtDetonationContext contains all the information necessary for processing a Detonation Interactio...
Definition: detonationContext.h:23
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtSuppressionActuatorPSR * myProcessState
Definition: suppressionActuator.h:200
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
class DtPrbValueList;
Definition: suppressionActuator.h:37

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)