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(); };
99 virtual bool localGetClosestLine(
const DtVector& point, DtVector& linePt1, DtVector& linePt2)
const {
throw DtUnimplementedMethod(
"bool localGetClosestLine(const DtVector& point, DtVector& linePt1, DtVector& linePt2) const is unimplemented."); };
114 virtual bool worldGetClosestLine(
const DtVector& point, DtVector& linePt1, DtVector& linePt2)
const {
throw DtUnimplementedMethod(
"bool localGetClosestLine(const DtVector& point, DtVector& linePt1, DtVector& linePt2) const is unimplemented."); };
116 virtual void setLocalVertices(
const DtList& vertices, DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool setLocalVertices(const DtList& vertices, DtVector& newGeometricCenter) is unimplemented."); };
117 virtual void setLocalVertices(
const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool setLocalVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
120 virtual void setWorldVertices(
const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool setWorldVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
122 virtual void setWorldVertices(
const DtList& vertices, DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool setWorldVertices(const DtList& vertices, DtVector& newGeometricCenter) is unimplemented."); };
124 virtual void setObjectVertices(
const std::vector<DtVector>& vertices) {
throw DtUnimplementedMethod(
"bool setObjectVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
128 virtual void addLocalVertex(
const DtVector& vertex, DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool addLocalVertex(const DtVector& vertex, DtVector& newGeometricCenter) is unimplemented."); };
129 virtual void addWorldVertex(
const DtVector& vertex, DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool addWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter) is unimplemented."); };
132 mutable boost::signals2::signal<void (const DtFrameStateInterface*)> signal_objectVerticesChanged{};
148 virtual const DtVertexList& worldVertices()
const override;
154 virtual const Dt3dBoundingVolume& boundingVolume()
const override;
156 virtual const bool closedFigure()
const override;
157 virtual const bool ellipsoid()
const override;
158 virtual const bool projection()
const override ;
159 virtual void setClosedFigure(
const bool& b)
override;
160 virtual void setEllipsoid(
const bool& b)
override;
161 virtual void setProjection(
const bool& b)
override;
162 virtual void setBoundingVolume(
const Dt3dBoundingVolume& b)
override;
163 virtual void setHalfLengthWidthHeight(
double l,
double w,
double h)
override;
165 virtual void updateVertices()
override;
168 bool calculateWorldVertices(
DtVertexList& newList)
const;
169 virtual void removeVertex(
int)
override;
170 virtual const bool& objectVerticesChanged()
const override;
171 virtual void setObjectVerticesChanged(
const bool&)
override;
172 virtual const bool& worldVerticesChanged()
const override;
173 virtual void setWorldVerticesChanged(
const bool&)
override;
174 virtual double distSquaredTo(
const DtVector& testPoint)
const override;
175 virtual bool localGetClosestVertex(
const DtVector& point, DtVector& vertex)
const override;
176 virtual bool localGetClosestLine(
const DtVector& point, DtVector& linePt1, DtVector& linePt2)
const override;
177 virtual double worldDistSquaredTo(
const DtVector& testPoint)
const override;
178 virtual bool worldGetClosestVertex(
const DtVector& point, DtVector& vertex)
const override;
179 virtual bool worldGetClosestLine(
const DtVector& point, DtVector& linePt1, DtVector& linePt2)
const override;
183 virtual void setEngineeringArea(
const DtVector&)
override;
185 virtual void setLocalVertices(
const std::vector<DtVector>& vertices, DtVector& newGeometricCenter)
override;
186 virtual void setLocalVertices(
const DtList& vertices, DtVector& newGeometricCenter)
override;
187 virtual void setLocalVertices(
const DtLocalVertexList& vertices, DtVector& newGeometricCenter)
override;
189 virtual void setWorldVertices(
const std::vector<DtVector>& vertices, DtVector& newGeometricCenter)
override;
190 virtual void setWorldVertices(
const DtVertexList& vertices, DtVector& newGeometricCenter)
override;
191 virtual void setWorldVertices(
const DtList& vertices, DtVector& newGeometricCenter)
override;
193 virtual void setObjectVertices(
const std::vector<DtVector>& vertices)
override;
194 virtual void setObjectVertices(
const DtList& vertices)
override;
196 virtual void addLocalVertex(
const DtVector& vertex)
override;
197 virtual void addLocalVertex(
const DtVector& vertex, DtVector& newGeometricCenter)
override;
198 virtual void addWorldVertex(
const DtVector& vertex, DtVector& newGeometricCenter)
override;
208 return myNeedsUpdateVertices;
213 myNeedsUpdateVertices = b;
218 virtual void setPointRecordsIntoEnvironmental();
238 virtual const Dt3dBoundingVolume& boundingVolume()
const override;
240 virtual const DtVertexList& worldVertices()
const override;
242 virtual const bool closedFigure()
const override;
243 virtual const bool ellipsoid()
const override;
244 virtual const bool projection()
const override;
245 virtual void updateVertices()
override;
246 virtual double distSquaredTo(
const DtVector& testPoint)
const override;
247 virtual bool localGetClosestVertex(
const DtVector& point, DtVector& vertex)
const override;
248 virtual bool localGetClosestLine(
const DtVector& point, DtVector& linePt1, DtVector& linePt2)
const override;
249 virtual double worldDistSquaredTo(
const DtVector& testPoint)
const override;
250 virtual bool worldGetClosestVertex(
const DtVector& point, DtVector& vertex)
const override;
251 virtual bool worldGetClosestLine(
const DtVector& point, DtVector& linePt1, DtVector& linePt2)
const override;
256 virtual void setObjectVerticesChanged(
const bool&)
override;
257 virtual const bool& objectVerticesChanged()
const override;
259 virtual void setWorldVerticesChanged(
const bool&)
override;
260 virtual const bool& worldVerticesChanged()
const override;
263 virtual void handleDataUpdated();
266 bool calculateWorldVertices(
DtVertexList& newList)
const;
270 void watchEnvironmentalChanges();
299 virtual void updateDataStorage()
override;
302 virtual bool forceAdvance()
override;
309 myCurrentFrameState.aboutToBeDeleted();
310 myNextFrameState.aboutToBeDeleted();
315 myCurrentFrameState.updateStateData(sd);
316 myNextFrameState.updateStateData(sd);
319 virtual void advanceFrame()
override;
326 bool myFirstAdvance =
true;
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:64
Definition: stateDataTypes.h:23
const DtVrfGeometryStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: vrfGeometryStateComponent.h:236
virtual const DtSimBoundingGeometry & worldBoundingGeometry() const
Definition: vrfGeometryStateComponent.h:83
#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 void setObjectVertices(const std::vector< DtVector > &vertices)
Definition: vrfGeometryStateComponent.h:124
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 makeWritable() override
Override to make component writable.
Definition: vrfGeometryStateComponent.h:201
virtual void setLocalVertices(const DtLocalVertexList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:118
virtual void setObjectVertices(const DtList &vertices)
Definition: vrfGeometryStateComponent.h:125
bool myWorldVerticesChanged
Definition: vrfGeometryStateComponent.h:222
Definition: stateComponent.h:269
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:128
3) Define the current frame class. This will be used for read access.
Definition: vrfGeometryStateComponent.h:229
DtVrfGeometryStateComponentData & frameState()
Definition: vrfGeometryStateComponent.h:143
DtVector myParentLocation
Definition: vrfGeometryStateComponent.h:325
virtual void setWorldVertices(const DtList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:122
virtual DtFrameStateInterface * nextFrameState() override
Definition: vrfGeometryStateComponent.h:296
unsigned int myCallbackHandle
Definition: vrfGeometryStateComponent.h:279
bool isDoubleBuffered()
Definition: vrfGeometryStateComponent.h:294
#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:277
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:142
unsigned long long UInt64
Definition: stateDataTypes.h:17
#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 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:223
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:323
virtual void setLocalVertices(const std::vector< DtVector > &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:117
DtVrfGeometryStateComponentData & operator=(const DtVrfGeometryStateComponentData &rhs)
Definition: vrfGeometryStateComponent.h:32
bool needsUpdateVertices() const
Definition: vrfGeometryStateComponent.h:206
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: vrfGeometryStateComponent.h:289
const DtLocationStateComponent * myLocationStateComponent
Definition: vrfGeometryStateComponent.h:324
virtual void setWorldVertices(const DtVertexList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:121
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: vrfGeometryStateComponent.h:297
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
DtVrfGeometryStateComponentCurrentFrame myCurrentFrameState
Definition: vrfGeometryStateComponent.h:322
void advanceFrame(const DtVrfGeometryStateComponentData &data)
Definition: vrfGeometryStateComponent.h:271
UInt64 myEnvironmentInstanceHandle
Definition: vrfGeometryStateComponent.h:280
class DtVertexList:
Definition: vertexList.h:22
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
DtStateComponentCreator< DtVrfGeometryStateComponentImplementation > DtVrfGeometryStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: vrfGeometryStateComponent.h:331
void setNeedsUpdateVertices(bool b)
Definition: vrfGeometryStateComponent.h:211
virtual void addLocalVertex(const DtVector &vertex)
Definition: vrfGeometryStateComponent.h:127
#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:78
bool myWorldVerticesChanged
Definition: vrfGeometryStateComponent.h:278
DtSimBoundingGeometryType
Definition: simBoundingGeometry.h:61
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: vrfGeometryStateComponent.h:295
This class maintains a rectangular bounding volume and an ordered list of vertices describing the phy...
Definition: vrfObjectGeometry.h:39
virtual void makeReadOnly() override
Override to make component read-only.
Definition: vrfGeometryStateComponent.h:204
UInt64 myLastRecordAdd
Definition: vrfGeometryStateComponent.h:224
virtual void aboutToBeDeleted() override
Definition: vrfGeometryStateComponent.h:306
#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 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
boost::signals2::scoped_connection myCompleteSetupConnection
Definition: vrfGeometryStateComponent.h:281
virtual void setLocalVertices(const DtList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:116
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: vrfGeometryStateComponent.h:313
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:284
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
virtual void addWorldVertex(const DtVector &vertex, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:129
class DtLocalVertexList:
Definition: localVertexList.h:20
DtVrfGeometryStateComponentData myData
Definition: vrfGeometryStateComponent.h:225
Contains the DtStateComponent class declaration.
virtual void setWorldVertices(const std::vector< DtVector > &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:120
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
2) Define the next frame class. This will be used for write access.
Definition: vrfGeometryStateComponent.h:136
bool myObjectVerticesChanged
Definition: vrfGeometryStateComponent.h:221