15 class DtLocationStateComponent;
20 : myLocalVertices(
"local")
21 , myWorldVertices(
"world")
26 : myObjectGeometry(orig.myObjectGeometry)
48 DtLocalVertexList myLocalVertices;
49 DtVertexList myWorldVertices;
60 : DtFrameStateInterface(storage)
82 virtual const DtSimBoundingGeometry& localBoundingGeometry()
const {
return boundingGeometry(); };
119 virtual void setWorldVertices(
const std::vector<DtVector>& vertices,
DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool setWorldVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
125 virtual void addWorldVertex(
const DtVector& vertex,
DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool addWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter) is unimplemented."); };
128 mutable boost::signals2::signal<void (const DtFrameStateInterface*)> signal_objectVerticesChanged;
150 const Dt3dBoundingVolume& boundingVolume()
const;
152 const bool closedFigure()
const;
153 const bool ellipsoid()
const;
154 const bool projection()
const ;
155 void setClosedFigure(
const bool& b);
156 void setEllipsoid(
const bool& b);
157 void setProjection(
const bool& b);
158 void setBoundingVolume(
const Dt3dBoundingVolume& b);
159 void setHalfLengthWidthHeight(
double l,
double w,
double h);
161 void updateVertices();
164 bool calculateWorldVertices(
DtVertexList& newList)
const;
165 void removeVertex(
int);
166 const bool& objectVerticesChanged()
const;
167 void setObjectVerticesChanged(
const bool&);
168 const bool& worldVerticesChanged()
const;
169 void setWorldVerticesChanged(
const bool&);
170 double distSquaredTo(
const DtVector& testPoint)
const;
173 double worldDistSquaredTo(
const DtVector& testPoint)
const;
179 void setEngineeringArea(
const DtVector&);
181 virtual void setLocalVertices(
const DtList& vertices,
DtVector& newGeometricCenter);
184 virtual void setWorldVertices(
const std::vector<DtVector>& vertices,
DtVector& newGeometricCenter);
186 virtual void setWorldVertices(
const DtList& vertices,
DtVector& newGeometricCenter);
188 virtual void addLocalVertex(
const DtVector& vertex);
189 virtual void addLocalVertex(
const DtVector& vertex,
DtVector& newGeometricCenter);
190 virtual void addWorldVertex(
const DtVector& vertex,
DtVector& newGeometricCenter);
200 return myNeedsUpdateVertices;
205 myNeedsUpdateVertices = b;
210 virtual void setPointRecordsIntoEnvironmental();
231 const Dt3dBoundingVolume& boundingVolume()
const;
235 const bool closedFigure()
const;
236 const bool ellipsoid()
const;
237 const bool projection()
const;
238 void updateVertices();
239 double distSquaredTo(
const DtVector& testPoint)
const;
242 double worldDistSquaredTo(
const DtVector& testPoint)
const;
249 void setObjectVerticesChanged(
const bool&);
250 const bool& objectVerticesChanged()
const;
252 void setWorldVerticesChanged(
const bool&);
253 const bool& worldVerticesChanged()
const;
256 virtual void handleDataUpdated();
259 bool calculateWorldVertices(
DtVertexList& newList)
const;
263 void watchEnvironmentalChanges();
293 void updateDataStorage();
296 virtual bool forceAdvance();
303 myCurrentFrameState.aboutToBeDeleted();
304 myNextFrameState.aboutToBeDeleted();
309 myCurrentFrameState.updateStateData(sd);
310 myNextFrameState.updateStateData(sd);
313 virtual void advanceFrame();
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:63
const DtFrameStateInterface * currentFrameState() const
Definition: vrfGeometryStateComponent.h:289
Definition: stateDataTypes.h:23
const DtVrfGeometryStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: vrfGeometryStateComponent.h:229
virtual const DtSimBoundingGeometry & worldBoundingGeometry() const
Definition: vrfGeometryStateComponent.h:83
virtual void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: vrfGeometryStateComponent.h:307
#define UNDEFINED_METHOD(Type, Method,...)
Definition: doubleBufferedDataStorage.h:68
virtual void setToObjectGeometry(DtVrfObjectGeometry &) const
Definition: vrfGeometryStateComponent.h:84
DtVrfGeometryStateComponentData(const DtVrfGeometryStateComponentData &orig)
Definition: vrfGeometryStateComponent.h:25
virtual bool localGetClosestVertex(const DtVector &point, DtVector &vertex) const
Determines the closest vertex in the object’s geometry to a given point, in local coordinates.
Definition: vrfGeometryStateComponent.h:93
DtLocalVertexList myLocalVertices
Definition: vrfGeometryStateComponent.h:48
The DtLocationStateComponent interface contains the interface that all DtLocationStateComponents can ...
Definition: locationStateComponent.h:25
Class Description: DtSimBoundingGeometry describes on objects bounding volume or bounding area (or no...
Definition: simBoundingGeometry.h:57
virtual void setLocalVertices(const DtLocalVertexList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:117
bool myWorldVerticesChanged
Definition: vrfGeometryStateComponent.h:215
Definition: stateComponent.h:257
virtual bool worldGetClosestLine(const DtVector &point, DtVector &linePt1, DtVector &linePt2) const
Determines the closest line segment in the object’s geometry to a given point, in world coordinates...
Definition: vrfGeometryStateComponent.h:114
virtual void addLocalVertex(const DtVector &vertex, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:124
3) Define the current frame class. This will be used for read access.
Definition: vrfGeometryStateComponent.h:222
DtVrfGeometryStateComponentData & frameState()
Definition: vrfGeometryStateComponent.h:139
DtVector myParentLocation
Definition: vrfGeometryStateComponent.h:319
virtual void setWorldVertices(const DtList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:121
unsigned int myCallbackHandle
Definition: vrfGeometryStateComponent.h:272
bool isDoubleBuffered()
Definition: vrfGeometryStateComponent.h:288
#define UNDEFINED_MUTATOR_WITH_ARGS(Set,...)
Definition: doubleBufferedDataStorage.h:47
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:40
Definition: vrfGeometryStateComponent.h:17
bool myObjectVerticesChanged
Definition: vrfGeometryStateComponent.h:270
const DtVrfGeometryStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: vrfGeometryStateComponent.h:138
#define UNDEFINED_RETURNREF_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:34
virtual double worldDistSquaredTo(const DtVector &testPoint) const
Returns the squared distance from a given point in world coordinates, to the object. If the object has more than two vertices (that is, more than one line segment), it acts on the closest line segment.
Definition: vrfGeometryStateComponent.h:104
virtual void makeReadOnly()
Override to make component read-only.
Definition: vrfGeometryStateComponent.h:196
virtual bool localGetClosestLine(const DtVector &point, DtVector &linePt1, DtVector &linePt2) const
Determines the closest line segment in the object’s geometry to a given point, in local coordinates...
Definition: vrfGeometryStateComponent.h:99
bool myNeedsUpdateVertices
Definition: vrfGeometryStateComponent.h:216
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: vrfGeometryStateComponent.h:54
DtVrfGeometryStateComponentNextFrame myNextFrameState
Definition: vrfGeometryStateComponent.h:317
DtVrfGeometryStateComponentData & operator=(const DtVrfGeometryStateComponentData &rhs)
Definition: vrfGeometryStateComponent.h:32
bool needsUpdateVertices() const
Definition: vrfGeometryStateComponent.h:198
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: vrfGeometryStateComponent.h:283
const DtLocationStateComponent * myLocationStateComponent
Definition: vrfGeometryStateComponent.h:318
virtual void setWorldVertices(const DtVertexList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:120
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:219
DtVrfGeometryStateComponentCurrentFrame myCurrentFrameState
Definition: vrfGeometryStateComponent.h:316
void advanceFrame(const DtVrfGeometryStateComponentData &data)
Definition: vrfGeometryStateComponent.h:264
virtual DtFrameStateInterface * nextFrameState()
Definition: vrfGeometryStateComponent.h:290
UInt64 myEnvironmentInstanceHandle
Definition: vrfGeometryStateComponent.h:273
class DtVertexList:
Definition: vertexList.h:22
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:370
DtStateComponentCreator< DtVrfGeometryStateComponentImplementation > DtVrfGeometryStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: vrfGeometryStateComponent.h:324
void setNeedsUpdateVertices(bool b)
Definition: vrfGeometryStateComponent.h:203
virtual void addLocalVertex(const DtVector &vertex)
Definition: vrfGeometryStateComponent.h:123
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
#define UNDEFINED_RETURNREF_CONST_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:37
virtual void aboutToBeDeleted()
Definition: stateComponent.h:73
bool myWorldVerticesChanged
Definition: vrfGeometryStateComponent.h:271
DtSimBoundingGeometryType
Definition: simBoundingGeometry.h:61
This class maintains a rectangular bounding volume and an ordered list of vertices describing the phy...
Definition: vrfObjectGeometry.h:39
UInt64 myLastRecordAdd
Definition: vrfGeometryStateComponent.h:217
virtual void aboutToBeDeleted() override
Definition: vrfGeometryStateComponent.h:300
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
#define DEFINE_REF_ACCESSORS(ReturnType, Method, Member)
Definition: doubleBufferedDataStorage.h:13
DtVrfObjectGeometry myObjectGeometry
Definition: vrfGeometryStateComponent.h:47
DtVertexList myWorldVertices
Definition: vrfGeometryStateComponent.h:49
virtual void makeWritable()
Override to make component writable.
Definition: vrfGeometryStateComponent.h:193
DtStateData * myStateData
Definition: vrfGeometryStateComponent.h:213
virtual double distSquaredTo(const DtVector &testPoint) const
Returns the squared distance from a given point in local coordinates, to the object. If the object has more than two vertices (that is, more than one line segment), it acts on the closest line segment.
Definition: vrfGeometryStateComponent.h:89
virtual const DtFrameStateInterface * nextFrameState() const
Definition: vrfGeometryStateComponent.h:291
boost::signals2::scoped_connection myCompleteSetupConnection
Definition: vrfGeometryStateComponent.h:274
virtual void setLocalVertices(const DtList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:116
DtVrfGeometryStateComponentData()
Definition: vrfGeometryStateComponent.h:19
#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
DtVrfGeometryStateComponentData myData
Definition: vrfGeometryStateComponent.h:278
virtual bool worldGetClosestVertex(const DtVector &point, DtVector &vertex) const
Determines the closest vertex in the object’s geometry to a given point, in world coordinates.
Definition: vrfGeometryStateComponent.h:108
class DtLocalVertexList:
Definition: localVertexList.h:20
DtVrfGeometryStateComponentData myData
Definition: vrfGeometryStateComponent.h:218
Contains the DtStateComponent class declaration.
DtStateData * myStateData
Definition: vrfGeometryStateComponent.h:277
virtual void setWorldVertices(const std::vector< DtVector > &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:119
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:282
2) Define the next frame class. This will be used for write access.
Definition: vrfGeometryStateComponent.h:132
bool myObjectVerticesChanged
Definition: vrfGeometryStateComponent.h:214