10 #include <vlutil/vlString.h>
11 #include <matrix/vlVector.h>
54 std::vector<DtVector> myWorldPositions{};
87 virtual const double& width()
const override;
88 virtual void setWidth(
const double&)
override;
90 virtual const double& height()
const override;
91 virtual void setHeight(
const double&)
override;
93 virtual const std::vector<DtVector> worldPositions()
const override;
94 virtual void setWorldPositions(
const std::vector<DtVector>&)
override;
96 virtual const double& windSpeed()
const override;
97 virtual void setWindSpeed(
const double&)
override;
99 virtual const int& priority()
const override;
100 virtual void setPriority(
const int&)
override;
102 virtual void updateWindCorridorData();
110 virtual void completeSetup();
127 virtual const double& width()
const override;
128 virtual const double& height()
const override;
129 virtual const std::vector<DtVector> worldPositions()
const override;
130 virtual const double& windSpeed()
const override;
131 virtual const int& priority()
const override;
135 void completeSetup();
138 void updateVrfStateComponentParameters();
140 void updateWindCorridorData();
165 virtual void completeSetup()
override;
169 if (myNextFrameState.isWritable())
171 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
174 myCurrentFrameState.emitComponentUpdated();
179 myCurrentFrameState.updateStateData(sd);
180 myNextFrameState.updateStateData(sd);
186 myCurrentFrameState.aboutToBeDeleted();
187 myNextFrameState.aboutToBeDeleted();
DtWindCorridorStateComponentData()
Definition: windCorridorStateComponent.h:17
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: windCorridorStateComponent.h:163
std::vector< DtVector > myWorldPositions
Definition: windCorridorStateComponent.h:54
virtual void makeWritable() override
Override to make component writable.
Definition: windCorridorStateComponent.h:105
const DtWindCorridorStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: windCorridorStateComponent.h:125
Definition: stateComponent.h:269
double myWindSpeed
Definition: windCorridorStateComponent.h:51
DtWindCorridorStateComponentNextFrame myNextFrameState
Definition: windCorridorStateComponent.h:192
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: windCorridorStateComponent.h:161
double myHeight
Definition: windCorridorStateComponent.h:53
2) Define the next frame class. This will be used for write access.
Definition: windCorridorStateComponent.h:78
DtWindCorridorStateComponentData myData
Definition: windCorridorStateComponent.h:114
DtWindCorridorStateComponentCurrentFrame myCurrentFrameState
Definition: windCorridorStateComponent.h:191
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:398
boost::signals2::scoped_connection myVrfStateComponentChangedConnection
Definition: windCorridorStateComponent.h:149
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
virtual DtFrameStateInterface * nextFrameState() override
Definition: windCorridorStateComponent.h:162
virtual void makeReadOnly() override
Override to make component read-only.
Definition: windCorridorStateComponent.h:108
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:95
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: windCorridorStateComponent.h:177
virtual void aboutToBeDeleted()
bool isDoubleBuffered()
Definition: windCorridorStateComponent.h:160
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:197
#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:150
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: windCorridorStateComponent.h:167
void advanceFrame(const DtWindCorridorStateComponentData &data)
Definition: windCorridorStateComponent.h:143
#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:118
int myPriority
Definition: windCorridorStateComponent.h:55
virtual void aboutToBeDeleted() override
Definition: windCorridorStateComponent.h:183
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:294
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: windCorridorStateComponent.h:155
boost::signals2::scoped_connection myVrfStateComponentChangedConnection
Definition: windCorridorStateComponent.h:113