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."); };
123 virtual void setObjectVertices(
const std::vector<DtVector>& vertices) {
throw DtUnimplementedMethod(
"bool setObjectVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
128 virtual void addWorldVertex(
const DtVector& vertex,
DtVector& newGeometricCenter) {
throw DtUnimplementedMethod(
"bool addWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter) is unimplemented."); };
131 mutable boost::signals2::signal<void (const DtFrameStateInterface*)> signal_objectVerticesChanged;
153 const Dt3dBoundingVolume& boundingVolume()
const;
155 const bool closedFigure()
const;
156 const bool ellipsoid()
const;
157 const bool projection()
const ;
158 void setClosedFigure(
const bool& b);
159 void setEllipsoid(
const bool& b);
160 void setProjection(
const bool& b);
161 void setBoundingVolume(
const Dt3dBoundingVolume& b);
162 void setHalfLengthWidthHeight(
double l,
double w,
double h);
164 void updateVertices();
167 bool calculateWorldVertices(
DtVertexList& newList)
const;
168 void removeVertex(
int);
169 const bool& objectVerticesChanged()
const;
170 void setObjectVerticesChanged(
const bool&);
171 const bool& worldVerticesChanged()
const;
172 void setWorldVerticesChanged(
const bool&);
173 double distSquaredTo(
const DtVector& testPoint)
const;
176 double worldDistSquaredTo(
const DtVector& testPoint)
const;
182 void setEngineeringArea(
const DtVector&);
184 virtual void setLocalVertices(
const DtList& vertices,
DtVector& newGeometricCenter);
187 virtual void setWorldVertices(
const std::vector<DtVector>& vertices,
DtVector& newGeometricCenter);
189 virtual void setWorldVertices(
const DtList& vertices,
DtVector& newGeometricCenter);
191 virtual void setObjectVertices(
const std::vector<DtVector>& vertices);
192 virtual void setObjectVertices(
const DtList& vertices);
194 virtual void addLocalVertex(
const DtVector& vertex);
195 virtual void addLocalVertex(
const DtVector& vertex,
DtVector& newGeometricCenter);
196 virtual void addWorldVertex(
const DtVector& vertex,
DtVector& newGeometricCenter);
206 return myNeedsUpdateVertices;
211 myNeedsUpdateVertices = b;
216 virtual void setPointRecordsIntoEnvironmental();
237 const Dt3dBoundingVolume& boundingVolume()
const;
241 const bool closedFigure()
const;
242 const bool ellipsoid()
const;
243 const bool projection()
const;
244 void updateVertices();
245 double distSquaredTo(
const DtVector& testPoint)
const;
248 double worldDistSquaredTo(
const DtVector& testPoint)
const;
255 void setObjectVerticesChanged(
const bool&);
256 const bool& objectVerticesChanged()
const;
258 void setWorldVerticesChanged(
const bool&);
259 const bool& worldVerticesChanged()
const;
262 virtual void handleDataUpdated();
265 bool calculateWorldVertices(
DtVertexList& newList)
const;
269 void watchEnvironmentalChanges();
299 void updateDataStorage();
302 virtual bool forceAdvance();
309 myCurrentFrameState.aboutToBeDeleted();
310 myNextFrameState.aboutToBeDeleted();
315 myCurrentFrameState.updateStateData(sd);
316 myNextFrameState.updateStateData(sd);
319 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:295
Definition: stateDataTypes.h:23
const DtVrfGeometryStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: vrfGeometryStateComponent.h:235
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:313
#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:123
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
virtual void setObjectVertices(const DtList &vertices)
Definition: vrfGeometryStateComponent.h:124
bool myWorldVerticesChanged
Definition: vrfGeometryStateComponent.h:221
Definition: stateComponent.h:266
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:127
3) Define the current frame class. This will be used for read access.
Definition: vrfGeometryStateComponent.h:228
DtVrfGeometryStateComponentData & frameState()
Definition: vrfGeometryStateComponent.h:142
DtVector myParentLocation
Definition: vrfGeometryStateComponent.h:325
virtual void setWorldVertices(const DtList &vertices, DtVector &newGeometricCenter)
Definition: vrfGeometryStateComponent.h:121
unsigned int myCallbackHandle
Definition: vrfGeometryStateComponent.h:278
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:276
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:141
#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:202
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:222
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
DtVrfGeometryStateComponentData & operator=(const DtVrfGeometryStateComponentData &rhs)
Definition: vrfGeometryStateComponent.h:32
bool needsUpdateVertices() const
Definition: vrfGeometryStateComponent.h:204
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:120
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:228
DtVrfGeometryStateComponentCurrentFrame myCurrentFrameState
Definition: vrfGeometryStateComponent.h:322
void advanceFrame(const DtVrfGeometryStateComponentData &data)
Definition: vrfGeometryStateComponent.h:270
virtual DtFrameStateInterface * nextFrameState()
Definition: vrfGeometryStateComponent.h:296
UInt64 myEnvironmentInstanceHandle
Definition: vrfGeometryStateComponent.h:279
class DtVertexList:
Definition: vertexList.h:22
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:379
DtStateComponentCreator< DtVrfGeometryStateComponentImplementation > DtVrfGeometryStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: vrfGeometryStateComponent.h:330
void setNeedsUpdateVertices(bool b)
Definition: vrfGeometryStateComponent.h:209
virtual void addLocalVertex(const DtVector &vertex)
Definition: vrfGeometryStateComponent.h:126
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
#define UNDEFINED_RETURNREF_CONST_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:37
unsigned long long UInt64
Definition: stateDataTypes.h:17
virtual void aboutToBeDeleted()
Definition: stateComponent.h:75
bool myWorldVerticesChanged
Definition: vrfGeometryStateComponent.h:277
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:223
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 void makeWritable()
Override to make component writable.
Definition: vrfGeometryStateComponent.h:199
DtStateData * myStateData
Definition: vrfGeometryStateComponent.h:219
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:297
boost::signals2::scoped_connection myCompleteSetupConnection
Definition: vrfGeometryStateComponent.h:280
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: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
class DtLocalVertexList:
Definition: localVertexList.h:20
DtVrfGeometryStateComponentData myData
Definition: vrfGeometryStateComponent.h:224
Contains the DtStateComponent class declaration.
DtStateData * myStateData
Definition: vrfGeometryStateComponent.h:283
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:291
2) Define the next frame class. This will be used for write access.
Definition: vrfGeometryStateComponent.h:135
bool myObjectVerticesChanged
Definition: vrfGeometryStateComponent.h:220