20 : myPuffDataList(
"puff-list")
21 , myDeadReckoningThresholds(
"thresholds")
22 , myDeadReckoningDensityThreshold(1.0)
23 , myDeadReckoningSigmaThreshold(1.0)
30 : myPuffDataList(orig.myPuffDataList)
31 , myDeadReckoningThresholds(orig.myDeadReckoningThresholds)
32 , myDeadReckoningDensityThreshold(orig.myDeadReckoningDensityThreshold)
33 , myDeadReckoningSigmaThreshold(orig.myDeadReckoningSigmaThreshold)
53 myPuffDataList.removeAndDeleteAll();
65 DtRwDeadReckonThresholds myDeadReckoningThresholds;
67 double myDeadReckoningDensityThreshold;
69 double myDeadReckoningSigmaThreshold;
82 : DtFrameStateInterface(storage)
115 virtual const double& deadReckoningDensityThreshold()
const override;
118 virtual void setDeadReckoningDensityThreshold(
const double&)
override;
121 virtual const double& deadReckoningSigmaThreshold()
const override;
124 virtual void setDeadReckoningSigmaThreshold(
const double&)
override;
130 virtual void makeReadOnly()
override {};
153 virtual const double& deadReckoningDensityThreshold()
const override;
155 virtual const double& deadReckoningSigmaThreshold()
const override;
192 if (myNextFrameState.isWritable())
194 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
197 myCurrentFrameState.emitComponentUpdated();
204 myNextFrameState.updateStateData(sd);
205 myCurrentFrameState.updateStateData(sd);
216 myCurrentFrameState.aboutToBeDeleted();
217 myNextFrameState.aboutToBeDeleted();
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:64
virtual void updateDataStorage() override
Copies next-frame data to the current frame if the next frame is writable, then emits a component-upd...
Definition: tacticalSmokeStateComponent.h:190
double myDeadReckoningSigmaThreshold
Threshold for dead-reckoning based on Gaussian sigma changes.
Definition: tacticalSmokeStateComponent.h:69
bool isDoubleBuffered()
Definition: tacticalSmokeStateComponent.h:181
virtual DtFrameStateInterface * nextFrameState() override
Definition: tacticalSmokeStateComponent.h:185
const DtTacticalSmokeStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: tacticalSmokeStateComponent.h:101
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: tacticalSmokeStateComponent.h:173
virtual void makeWritable() override
Override to make component writable.
Definition: tacticalSmokeStateComponent.h:127
DtGaussianPuffDataList myPuffDataList
List of Gaussian puff data representing smoke cloud positions and properties.
Definition: tacticalSmokeStateComponent.h:63
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: tacticalSmokeStateComponent.h:183
DtTacticalSmokeStateComponentData myData
Read-only snapshot of the tactical smoke state data for the current frame.
Definition: tacticalSmokeStateComponent.h:168
DtTacticalSmokeStateComponentData(const DtTacticalSmokeStateComponentData &orig)
Copy constructor.
Definition: tacticalSmokeStateComponent.h:29
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Defines both const and non-const virtual reference accessors that throw DtUnimplementedMethod, requiring overrides in a derived class.
Definition: doubleBufferedDataStorage.h:74
3) Define the current frame class. This will be used for read access.
Definition: tacticalSmokeStateComponent.h:138
const DtTacticalSmokeStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: tacticalSmokeStateComponent.h:146
void advanceFrame(const DtTacticalSmokeStateComponentData &data)
Advances the current frame by copying the provided data snapshot.
Definition: tacticalSmokeStateComponent.h:161
2) Define the next frame class. This will be used for write access.
Definition: tacticalSmokeStateComponent.h:93
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: tacticalSmokeStateComponent.h:187
virtual void updateStateData(DtStateData *sd) override
Updates the state data pointer on both current and next frame state views.
Definition: tacticalSmokeStateComponent.h:202
Definition: rwDeadReckonThresholds.h:23
DtTacticalSmokeStateComponentCurrentFrame myCurrentFrameState
Current frame state view, used for thread-safe read access.
Definition: tacticalSmokeStateComponent.h:222
Data container for tactical smoke state, holding Gaussian puff data and dead-reckoning thresholds...
Definition: tacticalSmokeStateComponent.h:16
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Macro to define all required static and virtual state component type methods. Place in the public sec...
Definition: stateComponent.h:272
virtual ~DtTacticalSmokeStateComponentData()
Destructor. Removes and deletes all puff data entries.
Definition: tacticalSmokeStateComponent.h:51
DtStateComponentCreator< DtTacticalSmokeStateComponentImplementation > DtTacticalSmokeStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: tacticalSmokeStateComponent.h:229
DtRwDeadReckonThresholds myDeadReckoningThresholds
Dead-reckoning thresholds for position and orientation updates.
Definition: tacticalSmokeStateComponent.h:65
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
DtTacticalSmokeStateComponentData()
Default constructor. Initializes puff data list and dead-reckoning thresholds with default values...
Definition: tacticalSmokeStateComponent.h:19
Definition: stateComponent.h:92
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
DtTacticalSmokeStateComponentData & operator=(const DtTacticalSmokeStateComponentData &rhs)
Assignment operator.
Definition: tacticalSmokeStateComponent.h:40
virtual void aboutToBeDeleted() override
Notifies the current and next frame states that the component is about to be deleted.
Definition: tacticalSmokeStateComponent.h:213
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual const-reference accessor and an undefined virtual setter, both throwing DtUnimplementedMethod and requiring overrides in a derived class.
Definition: doubleBufferedDataStorage.h:112
#define DEFINE_REF_ACCESSORS(ReturnType, Method, Member)
Defines const and non-const reference accessors for a member variable.
Definition: doubleBufferedDataStorage.h:17
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29
DtTacticalSmokeStateComponentData & frameState()
Definition: tacticalSmokeStateComponent.h:102
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: tacticalSmokeStateComponent.h:74
Contains the DtStateComponent class declaration.
double myDeadReckoningDensityThreshold
Threshold for dead-reckoning based on smoke density changes.
Definition: tacticalSmokeStateComponent.h:67
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
DtTacticalSmokeStateComponentNextFrame myNextFrameState
Next frame state view, used for single-threaded write access.
Definition: tacticalSmokeStateComponent.h:224