10 #include <vlutil/vlString.h>
11 #include <matrix/vlVector.h>
54 std::vector<DtVector> myWorldPositions;
66 : DtFrameStateInterface(storage)
87 const double& width()
const;
88 void setWidth(
const double&);
90 const double& height()
const;
91 void setHeight(
const double&);
93 const std::vector<DtVector> worldPositions()
const;
94 void setWorldPositions(
const std::vector<DtVector>&);
96 const double& windSpeed()
const;
97 void setWindSpeed(
const double&);
99 const int& priority()
const;
100 void setPriority(
const int&);
102 virtual void updateWindCorridorData();
110 virtual void completeSetup();
128 const double& width()
const;
129 const double& height()
const;
130 const std::vector<DtVector> worldPositions()
const;
131 const double& windSpeed()
const;
132 const int& priority()
const;
136 void completeSetup();
139 void updateVrfStateComponentParameters();
141 void updateWindCorridorData();
167 virtual void completeSetup()
override;
171 if (myNextFrameState.isWritable())
173 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
176 myCurrentFrameState.emitComponentUpdated();
181 myCurrentFrameState.updateStateData(sd);
182 myNextFrameState.updateStateData(sd);
188 myCurrentFrameState.aboutToBeDeleted();
189 myNextFrameState.aboutToBeDeleted();
DtWindCorridorStateComponentData()
Definition: windCorridorStateComponent.h:17
std::vector< DtVector > myWorldPositions
Definition: windCorridorStateComponent.h:54
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: windCorridorStateComponent.h:169
const DtWindCorridorStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: windCorridorStateComponent.h:126
virtual void makeReadOnly()
Override to make component read-only.
Definition: windCorridorStateComponent.h:108
Definition: stateComponent.h:266
double myWindSpeed
Definition: windCorridorStateComponent.h:51
DtWindCorridorStateComponentNextFrame myNextFrameState
Definition: windCorridorStateComponent.h:194
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: windCorridorStateComponent.h:179
double myHeight
Definition: windCorridorStateComponent.h:53
2) Define the next frame class. This will be used for write access.
Definition: windCorridorStateComponent.h:78
DtStateData * myStateData
Definition: windCorridorStateComponent.h:114
DtWindCorridorStateComponentData myData
Definition: windCorridorStateComponent.h:115
DtWindCorridorStateComponentCurrentFrame myCurrentFrameState
Definition: windCorridorStateComponent.h:193
DtWindCorridorStateComponentData & frameState()
Definition: windCorridorStateComponent.h:85
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
boost::signals2::scoped_connection myVrfStateComponentChangedConnection
Definition: windCorridorStateComponent.h:150
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:228
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:379
virtual const DtFrameStateInterface * nextFrameState() const
Definition: windCorridorStateComponent.h:165
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: windCorridorStateComponent.h:60
Definition: stateComponent.h:92
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
virtual DtFrameStateInterface * nextFrameState()
Definition: windCorridorStateComponent.h:164
virtual void aboutToBeDeleted()
bool isDoubleBuffered()
Definition: windCorridorStateComponent.h:162
Definition: windCorridorStateComponent.h:15
DtWindCorridorStateComponentData(const DtWindCorridorStateComponentData &orig)
Definition: windCorridorStateComponent.h:24
const DtWindCorridorStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: windCorridorStateComponent.h:84
DtStateComponentCreator< DtWindCorridorStateComponentImplementation > DtWindCorridorStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: windCorridorStateComponent.h:199
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
DtWindCorridorStateComponentData myData
Definition: windCorridorStateComponent.h:152
DtStateData * myStateData
Definition: windCorridorStateComponent.h:151
const DtFrameStateInterface * currentFrameState() const
Definition: windCorridorStateComponent.h:163
void advanceFrame(const DtWindCorridorStateComponentData &data)
Definition: windCorridorStateComponent.h:144
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
3) Define the current frame class. This will be used for read access.
Definition: windCorridorStateComponent.h:119
int myPriority
Definition: windCorridorStateComponent.h:55
virtual void aboutToBeDeleted() override
Definition: windCorridorStateComponent.h:185
virtual void makeWritable()
Override to make component writable.
Definition: windCorridorStateComponent.h:105
DtWindCorridorStateComponentData & operator=(const DtWindCorridorStateComponentData &orig)
Definition: windCorridorStateComponent.h:33
Contains the DtStateComponent class declaration.
double myWidth
Definition: windCorridorStateComponent.h:52
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: windCorridorStateComponent.h:157
boost::signals2::scoped_connection myVrfStateComponentChangedConnection
Definition: windCorridorStateComponent.h:113