VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfGeometryStateComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
12 #include <vrfutil/vertexList.h>
13 namespace makVrf
14 {
15  class DtLocationStateComponent;
16 
20  {
23  : myLocalVertices("local")
24  , myWorldVertices("world")
25  {
26  }
27 
31  : myObjectGeometry(orig.myObjectGeometry)
32  {
33  myLocalVertices = orig.myLocalVertices;
34  myWorldVertices = orig.myWorldVertices;
35  }
36 
41  {
42  myObjectGeometry = rhs.myObjectGeometry;
43  myLocalVertices = rhs.myLocalVertices;
44  myWorldVertices = rhs.myWorldVertices;
45 
46  return *this;
47  }
48 
49 
50  DEFINE_REF_ACCESSORS(DtVrfObjectGeometry, objectGeometry, ObjectGeometry)
51  DEFINE_REF_ACCESSORS(DtLocalVertexList, localVertices, LocalVertices)
52  DEFINE_REF_ACCESSORS(DtVertexList, worldVertices, WorldVertices)
53 
54  protected:
56  DtVrfObjectGeometry myObjectGeometry;
58  DtLocalVertexList myLocalVertices;
60  DtVertexList myWorldVertices;
61  };
62 
66  {
67  public:
69 
70 
73  : DtFrameStateInterface(storage)
74  {
75  }
76 
77  UNDEFINED_RETURNREF_ACCESSORS(DtLocalVertexList, localVertices)
78  UNDEFINED_RETURNREF_ACCESSORS(DtVertexList, worldVertices)
79  UNDEFINED_RETURNREF_ACCESSORS(DtLocalVertexList, objectVertices)
82  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, closedFigure, ClosedFigure)
83  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, ellipsoid, Ellipsoid)
84  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, projection, Projection)
85  UNDEFINED_RETURNREF_CONST_ACCESSOR(Dt3dBoundingVolume, boundingVolume)
86  UNDEFINED_MUTATOR_WITH_ARGS(BoundingVolume, const Dt3dBoundingVolume& b)
87  UNDEFINED_MUTATOR_WITH_ARGS(HalfLengthWidthHeight, double l, double w, double h)
89  UNDEFINED_MUTATOR_WITH_ARGS(EngineeringArea, const DtVector&)
90  UNDEFINED_METHOD(void, updateVertices)
91  UNDEFINED_METHOD(void, removeVertex, int)
92  UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(bool, objectVerticesChanged, ObjectVerticesChanged)
93  UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(bool, worldVerticesChanged, WorldVerticesChanged)
94  UNDEFINED_METHOD(void, setObjectGeometry, const DtVrfObjectGeometry&)
97  virtual const DtSimBoundingGeometry& localBoundingGeometry() const { return boundingGeometry(); };
100  virtual const DtSimBoundingGeometry& worldBoundingGeometry() const { return boundingGeometry(); };
103  virtual void setToObjectGeometry(DtVrfObjectGeometry&) const { throw DtUnimplementedMethod("void setToObjectGeometry(DtVrfObjectGeometry&) const is unimplemented."); };
104 
108  virtual double distSquaredTo(const DtVector& testPoint) const { throw DtUnimplementedMethod("double distSquaredTo(const DtVector& testPoint) const is unimplemented."); };
109 
112  virtual bool localGetClosestVertex(const DtVector& point, DtVector& vertex) const { throw DtUnimplementedMethod("bool localGetClosestVertex(const DtVector& point, DtVector& vertex) const is unimplemented."); };
113 
118  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."); };
119 
123  virtual double worldDistSquaredTo(const DtVector& testPoint) const { throw DtUnimplementedMethod("double distSquaredTo(const DtVector& testPoint) const is unimplemented."); };
124 
127  virtual bool worldGetClosestVertex(const DtVector& point, DtVector& vertex) const { throw DtUnimplementedMethod("bool localGetClosestVertex(const DtVector& point, DtVector& vertex) const is unimplemented."); };
128 
133  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."); };
134 
138  virtual void setLocalVertices(const DtList& vertices, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool setLocalVertices(const DtList& vertices, DtVector& newGeometricCenter) is unimplemented."); };
142  virtual void setLocalVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool setLocalVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
146  virtual void setLocalVertices(const DtLocalVertexList& vertices, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool setLocalVertices(const DtVertexList& vertices, DtVector& newGeometricCenter) is unimplemented."); };
147 
151  virtual void setWorldVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool setWorldVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
155  virtual void setWorldVertices(const DtVertexList& vertices, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool setWorldVertices(const DtVertexList& vertices, DtVector& newGeometricCenter) is unimplemented."); };
159  virtual void setWorldVertices(const DtList& vertices, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool setWorldVertices(const DtList& vertices, DtVector& newGeometricCenter) is unimplemented."); };
160 
163  virtual void setObjectVertices(const std::vector<DtVector>& vertices) { throw DtUnimplementedMethod("bool setObjectVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) is unimplemented."); };
166  virtual void setObjectVertices(const DtList& vertices) { throw DtUnimplementedMethod("bool setObjectVertices(const DtList& vertices, DtVector& newGeometricCenter) is unimplemented."); };
167 
170  virtual void addLocalVertex(const DtVector& vertex) { throw DtUnimplementedMethod("bool addLocalVertex(const DtVector& vertex) is unimplemented."); };
174  virtual void addLocalVertex(const DtVector& vertex, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool addLocalVertex(const DtVector& vertex, DtVector& newGeometricCenter) is unimplemented."); };
178  virtual void addWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter) { throw DtUnimplementedMethod("bool addWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter) is unimplemented."); };
179 
181  mutable boost::signals2::signal<void (const DtFrameStateInterface*)> signal_objectVerticesChanged{};
182 
185  virtual const DtString& markingText() const;
186 
190  virtual void setMaximumVertices(unsigned maxVertices) { throw DtUnimplementedMethod("void setMaximumVertices(unsigned maxVertices) is unimplemented."); };
191  };
192 
195  {
196  public:
200 
202  const DtVrfGeometryStateComponentData& frameState() const { return myData; };
204 
205  virtual const DtLocalVertexList& localVertices() const override;
206  virtual DtLocalVertexList& localVertices() override;
207 
208  virtual const DtVertexList& worldVertices() const override;
209  virtual DtVertexList& worldVertices() override;
210 
211  virtual const DtLocalVertexList& objectVertices() const override;
212  virtual DtLocalVertexList& objectVertices() override;
213 
214  virtual const Dt3dBoundingVolume& boundingVolume() const override;
215  virtual const DtVrfObjectGeometry& objectGeometry() const override;
216  virtual const bool closedFigure() const override;
217  virtual const bool ellipsoid() const override;
218  virtual const bool projection() const override ;
219  virtual void setClosedFigure(const bool& b) override;
220  virtual void setEllipsoid(const bool& b) override;
221  virtual void setProjection(const bool& b) override;
222  virtual void setBoundingVolume(const Dt3dBoundingVolume& b) override;
223  virtual void setHalfLengthWidthHeight(double l, double w, double h) override;
224  virtual void setBoundingGeometryType(DtSimBoundingGeometry::DtSimBoundingGeometryType type) override;
225  virtual void updateVertices() override;
229  bool calculateBodyCoordinates(DtLocalVertexList& newList) const;
232  void calculateLocalVertices(DtLocalVertexList& newList) const;
236  bool calculateWorldVertices(DtVertexList& newList) const;
237  virtual void removeVertex(int) override;
238  virtual const bool& objectVerticesChanged() const override;
239  virtual void setObjectVerticesChanged(const bool&) override;
240  virtual const bool& worldVerticesChanged() const override;
241  virtual void setWorldVerticesChanged(const bool&) override;
242  virtual double distSquaredTo(const DtVector& testPoint) const override;
243  virtual bool localGetClosestVertex(const DtVector& point, DtVector& vertex) const override;
244  virtual bool localGetClosestLine(const DtVector& point, DtVector& linePt1, DtVector& linePt2) const override;
245  virtual double worldDistSquaredTo(const DtVector& testPoint) const override;
246  virtual bool worldGetClosestVertex(const DtVector& point, DtVector& vertex) const override;
247  virtual bool worldGetClosestLine(const DtVector& point, DtVector& linePt1, DtVector& linePt2) const override;
248  virtual const DtSimBoundingGeometry& boundingGeometry() const override;
249  virtual void setObjectGeometry(const DtVrfObjectGeometry&) override;
250  virtual void setToObjectGeometry(DtVrfObjectGeometry&) const override;
251  virtual void setEngineeringArea(const DtVector&) override;
252 
253  virtual void setLocalVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) override;
254  virtual void setLocalVertices(const DtList& vertices, DtVector& newGeometricCenter) override;
255  virtual void setLocalVertices(const DtLocalVertexList& vertices, DtVector& newGeometricCenter) override;
256 
257  virtual void setWorldVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter) override;
258  virtual void setWorldVertices(const DtVertexList& vertices, DtVector& newGeometricCenter) override;
259  virtual void setWorldVertices(const DtList& vertices, DtVector& newGeometricCenter) override;
260 
261  virtual void setObjectVertices(const std::vector<DtVector>& vertices) override;
262  virtual void setObjectVertices(const DtList& vertices) override;
263 
264  virtual void addLocalVertex(const DtVector& vertex) override;
265  virtual void addLocalVertex(const DtVector& vertex, DtVector& newGeometricCenter) override;
266  virtual void addWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter) override;
267 
268  virtual void setMaximumVertices(unsigned maxVertices);
269 
271  virtual void makeWritable() override {};
272 
274  virtual void makeReadOnly() override {};
275 
278  bool needsUpdateVertices() const
279  {
280  return myNeedsUpdateVertices;
281  }
282 
286  {
287  myNeedsUpdateVertices = b;
288  }
289 
290  protected:
293  virtual void setPointRecordsIntoEnvironmental();
294 
295  protected:
303  unsigned myMaxVertices;
308  };
309 
312  {
313  public:
318  virtual ~DtVrfGeometryStateComponentCurrentFrame() override;
319 
321  const DtVrfGeometryStateComponentData& frameState() const { return myData; };
322 
323  virtual const Dt3dBoundingVolume& boundingVolume() const override;
324  virtual const DtLocalVertexList& localVertices() const override;
325  virtual const DtVertexList& worldVertices() const override;
326  virtual const DtLocalVertexList& objectVertices() const override;
327  virtual const bool closedFigure() const override;
328  virtual const bool ellipsoid() const override;
329  virtual const bool projection() const override;
330  virtual void updateVertices() override;
331  virtual double distSquaredTo(const DtVector& testPoint) const override;
332  virtual bool localGetClosestVertex(const DtVector& point, DtVector& vertex) const override;
333  virtual bool localGetClosestLine(const DtVector& point, DtVector& linePt1, DtVector& linePt2) const override;
334  virtual double worldDistSquaredTo(const DtVector& testPoint) const override;
335  virtual bool worldGetClosestVertex(const DtVector& point, DtVector& vertex) const override;
336  virtual bool worldGetClosestLine(const DtVector& point, DtVector& linePt1, DtVector& linePt2) const override;
337  virtual const DtSimBoundingGeometry& boundingGeometry() const override;
338  virtual const DtVrfObjectGeometry& objectGeometry() const override;
339  virtual void setToObjectGeometry(DtVrfObjectGeometry&) const override;
340 
341  virtual void setObjectVerticesChanged(const bool&) override;
342  virtual const bool& objectVerticesChanged() const override;
343 
344  virtual void setWorldVerticesChanged(const bool&) override;
345  virtual const bool& worldVerticesChanged() const override;
346 
347  protected:
349  virtual void handleDataUpdated();
353  bool calculateBodyCoordinates(DtLocalVertexList& newList) const;
356  void calculateLocalVertices(DtLocalVertexList& newList) const;
360  bool calculateWorldVertices(DtVertexList& newList) const;
361 
362  protected:
366  void watchEnvironmentalChanges();
370  {
371  myData = data;
372  }
373 
374  protected:
380  unsigned int myCallbackHandle;
384  boost::signals2::scoped_connection myCompleteSetupConnection;
385 
386  private:
388  };
389 
393  {
394  public:
398 
400  bool isDoubleBuffered() { return true; };
402  virtual const DtFrameStateInterface* currentFrameState() const override { return &myCurrentFrameState; }
404  virtual DtFrameStateInterface* nextFrameState() override { return &myNextFrameState; };
406  virtual const DtFrameStateInterface* nextFrameState() const override { return &myNextFrameState; };
407 
409  virtual void updateDataStorage() override;
410 
412  virtual bool forceAdvance() override;
413 
416  virtual void initializeFromParameters(const DtVrfObjectParameters* params) override;
417 
419  virtual void aboutToBeDeleted() override
420  {
422  myCurrentFrameState.aboutToBeDeleted();
423  myNextFrameState.aboutToBeDeleted();
424  }
425 
428  virtual void updateStateData(DtStateData* sd) override
429  {
430  myCurrentFrameState.updateStateData(sd);
431  myNextFrameState.updateStateData(sd);
432  }
433 
435  virtual void advanceFrame() override;
436 
437  protected:
447  bool myFirstAdvance = true;
448  };
449 
453 }
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:64
Exception thrown when a required method has not been implemented.
Definition: stateDataTypes.h:30
const DtVrfGeometryStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: vrfGeometryStateComponent.h:321
virtual const DtSimBoundingGeometry & worldBoundingGeometry() const
Returns the bounding geometry of this object in world coordinates.
Definition: vrfGeometryStateComponent.h:100
#define UNDEFINED_METHOD(Type, Method,...)
Defines a virtual non-const method with variadic parameters that throws DtUnimplementedMethod, requiring an override in a derived class.
Definition: doubleBufferedDataStorage.h:138
virtual void setToObjectGeometry(DtVrfObjectGeometry &) const
Copies this component&#39;s object geometry into the provided geometry object.
Definition: vrfGeometryStateComponent.h:103
DtVrfGeometryStateComponentData(const DtVrfGeometryStateComponentData &orig)
Copy constructor.
Definition: vrfGeometryStateComponent.h:30
virtual void setObjectVertices(const std::vector< DtVector > &vertices)
Sets the object-relative reference vertices from a vector.
Definition: vrfGeometryStateComponent.h:163
virtual bool localGetClosestVertex(const DtVector &point, DtVector &vertex) const
Determines the closest vertex in the object&#39;s geometry to a given point, in local coordinates...
Definition: vrfGeometryStateComponent.h:112
DtLocalVertexList myLocalVertices
Vertex list in local (body-frame) coordinates.
Definition: vrfGeometryStateComponent.h:58
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:271
virtual void setLocalVertices(const DtLocalVertexList &vertices, DtVector &newGeometricCenter)
Sets the local-coordinate vertices from a DtLocalVertexList and returns the updated geometric center...
Definition: vrfGeometryStateComponent.h:146
virtual void setObjectVertices(const DtList &vertices)
Sets the object-relative reference vertices from a DtList.
Definition: vrfGeometryStateComponent.h:166
bool myWorldVerticesChanged
True if world-coordinate vertices changed since the last frame advance.
Definition: vrfGeometryStateComponent.h:299
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
virtual bool worldGetClosestLine(const DtVector &point, DtVector &linePt1, DtVector &linePt2) const
Determines the closest line segment in the object&#39;s geometry to a given point, in world coordinates...
Definition: vrfGeometryStateComponent.h:133
virtual void addLocalVertex(const DtVector &vertex, DtVector &newGeometricCenter)
Appends a vertex in local coordinates and updates the geometric center.
Definition: vrfGeometryStateComponent.h:174
3) Define the current frame class. This will be used for read access.
Definition: vrfGeometryStateComponent.h:311
DtVrfGeometryStateComponentData & frameState()
Definition: vrfGeometryStateComponent.h:203
DtVector myParentLocation
Cached world position of the parent entity from the last frame advance.
Definition: vrfGeometryStateComponent.h:445
virtual void setWorldVertices(const DtList &vertices, DtVector &newGeometricCenter)
Sets the world-coordinate vertices from a DtList and returns the updated geometric center...
Definition: vrfGeometryStateComponent.h:159
virtual DtFrameStateInterface * nextFrameState() override
Returns the writable next frame state interface.
Definition: vrfGeometryStateComponent.h:404
virtual void setMaximumVertices(unsigned maxVertices)
Sets the maximum number of vertices allowed for this geometry component. If an attempt is made to set...
Definition: vrfGeometryStateComponent.h:190
unsigned int myCallbackHandle
Handle returned when registering the environmental instance update callback.
Definition: vrfGeometryStateComponent.h:380
bool isDoubleBuffered()
Returns true since this component uses double-buffered frame data storage.
Definition: vrfGeometryStateComponent.h:400
#define UNDEFINED_MUTATOR_WITH_ARGS(Set,...)
Defines a virtual setter accepting variadic arguments that throws DtUnimplementedMethod, requiring an override in a derived class.
Definition: doubleBufferedDataStorage.h:88
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Defines both const and non-const virtual reference accessors that throw DtUnimplementedMethod, requiring overrides in a derived class.
Definition: doubleBufferedDataStorage.h:74
Plain data holder for the geometry state component, storing the object geometry, local-coordinate ver...
Definition: vrfGeometryStateComponent.h:19
bool myObjectVerticesChanged
True if object-space vertices changed in the current frame.
Definition: vrfGeometryStateComponent.h:376
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:202
unsigned long long UInt64
64-bit unsigned integer type.
Definition: stateDataTypes.h:19
#define UNDEFINED_RETURNREF_ACCESSOR(ReturnType, Member)
Defines a virtual const reference accessor that throws DtUnimplementedMethod, marking the method as r...
Definition: doubleBufferedDataStorage.h:60
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:123
virtual bool localGetClosestLine(const DtVector &point, DtVector &linePt1, DtVector &linePt2) const
Determines the closest line segment in the object&#39;s geometry to a given point, in local coordinates...
Definition: vrfGeometryStateComponent.h:118
bool myNeedsUpdateVertices
True if vertex positions must be recalculated before the next advance.
Definition: vrfGeometryStateComponent.h:301
1) Define the interface class that will be used to represent the next and current frames...
Definition: vrfGeometryStateComponent.h:65
DtVrfGeometryStateComponentNextFrame myNextFrameState
The next-frame (writable) geometry state component.
Definition: vrfGeometryStateComponent.h:441
virtual void setLocalVertices(const std::vector< DtVector > &vertices, DtVector &newGeometricCenter)
Sets the local-coordinate vertices from a vector and returns the updated geometric center...
Definition: vrfGeometryStateComponent.h:142
DtVrfGeometryStateComponentData & operator=(const DtVrfGeometryStateComponentData &rhs)
Assignment operator.
Definition: vrfGeometryStateComponent.h:40
bool needsUpdateVertices() const
Returns whether vertices are marked dirty and need to be recalculated.
Definition: vrfGeometryStateComponent.h:278
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: vrfGeometryStateComponent.h:392
const DtLocationStateComponent * myLocationStateComponent
Cached pointer to the location state component, used to detect parent position changes.
Definition: vrfGeometryStateComponent.h:443
virtual void setWorldVertices(const DtVertexList &vertices, DtVector &newGeometricCenter)
Sets the world-coordinate vertices from a DtVertexList and returns the updated geometric center...
Definition: vrfGeometryStateComponent.h:155
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
virtual const DtFrameStateInterface * nextFrameState() const override
Returns the read-only next frame state interface.
Definition: vrfGeometryStateComponent.h:406
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Macro to define all required static and virtual state component type methods. Place in the public sec...
Definition: stateComponent.h:272
DtVrfGeometryStateComponentCurrentFrame myCurrentFrameState
The current-frame (read-only) geometry state component.
Definition: vrfGeometryStateComponent.h:439
void advanceFrame(const DtVrfGeometryStateComponentData &data)
Copies the provided next-frame data into the current-frame buffer.
Definition: vrfGeometryStateComponent.h:369
UInt64 myEnvironmentInstanceHandle
Legion instance handle of the associated environmental state component.
Definition: vrfGeometryStateComponent.h:382
class DtVertexList:
Definition: vertexList.h:22
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
DtStateComponentCreator< DtVrfGeometryStateComponentImplementation > DtVrfGeometryStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: vrfGeometryStateComponent.h:452
void setNeedsUpdateVertices(bool b)
Sets whether vertices need to be recalculated on the next updateVertices() call.
Definition: vrfGeometryStateComponent.h:285
virtual void addLocalVertex(const DtVector &vertex)
Appends a vertex in local coordinates without updating the geometric center.
Definition: vrfGeometryStateComponent.h:170
unsigned myMaxVertices
The maximum number of vertices allowed for this geometry component.
Definition: vrfGeometryStateComponent.h:303
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual by-value accessor and an undefined virtual setter, both throwing DtUnimp...
Definition: doubleBufferedDataStorage.h:103
#define UNDEFINED_RETURNREF_CONST_ACCESSOR(ReturnType, Member)
Defines a virtual const reference accessor that throws DtUnimplementedMethod. Equivalent to UNDEFINED...
Definition: doubleBufferedDataStorage.h:67
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
bool myWorldVerticesChanged
True if world-coordinate vertices changed in the current frame.
Definition: vrfGeometryStateComponent.h:378
DtSimBoundingGeometryType
Definition: simBoundingGeometry.h:61
virtual const DtFrameStateInterface * currentFrameState() const override
Returns the read-only current frame state interface.
Definition: vrfGeometryStateComponent.h:402
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:274
UInt64 myLastRecordAdd
Instance handle of the last Legion point record added for environmental sync.
Definition: vrfGeometryStateComponent.h:305
virtual void aboutToBeDeleted() override
Notifies both frame states that this component is about to be removed from the simulation.
Definition: vrfGeometryStateComponent.h:419
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual const-reference accessor and an undefined virtual setter, both throwing DtUnimplementedMethod and requiring overrides in a derived class.
Definition: doubleBufferedDataStorage.h:112
#define DEFINE_REF_ACCESSORS(ReturnType, Method, Member)
Defines const and non-const reference accessors for a member variable.
Definition: doubleBufferedDataStorage.h:17
DtVrfObjectGeometry myObjectGeometry
The object&#39;s geometry definition including bounding geometry.
Definition: vrfGeometryStateComponent.h:56
DtVertexList myWorldVertices
Vertex list in world (geocentric) coordinates.
Definition: vrfGeometryStateComponent.h:60
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:108
boost::signals2::scoped_connection myCompleteSetupConnection
Connection to defer watchEnvironmentalChanges() until after the first frame advance.
Definition: vrfGeometryStateComponent.h:384
virtual void setLocalVertices(const DtList &vertices, DtVector &newGeometricCenter)
Sets the local-coordinate vertices from a DtList and returns the updated geometric center...
Definition: vrfGeometryStateComponent.h:138
virtual void updateStateData(DtStateData *sd) override
Updates both frame states to use the provided state data storage.
Definition: vrfGeometryStateComponent.h:428
DtVrfGeometryStateComponentData()
Constructs a default geometry state component data with empty vertex lists.
Definition: vrfGeometryStateComponent.h:22
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29
DtVrfGeometryStateComponentData myData
Definition: vrfGeometryStateComponent.h:387
virtual bool worldGetClosestVertex(const DtVector &point, DtVector &vertex) const
Determines the closest vertex in the object&#39;s geometry to a given point, in world coordinates...
Definition: vrfGeometryStateComponent.h:127
virtual void addWorldVertex(const DtVector &vertex, DtVector &newGeometricCenter)
Appends a vertex in world coordinates and updates the geometric center.
Definition: vrfGeometryStateComponent.h:178
class DtLocalVertexList:
Definition: localVertexList.h:20
DtVrfGeometryStateComponentData myData
The writable geometry data for the next simulation frame.
Definition: vrfGeometryStateComponent.h:307
Contains the DtStateComponent class declaration.
virtual void setWorldVertices(const std::vector< DtVector > &vertices, DtVector &newGeometricCenter)
Sets the world-coordinate vertices from a vector and returns the updated geometric center...
Definition: vrfGeometryStateComponent.h:151
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
2) Define the next frame class. This will be used for write access.
Definition: vrfGeometryStateComponent.h:194
bool myObjectVerticesChanged
True if object-space vertices changed since the last frame advance.
Definition: vrfGeometryStateComponent.h:297

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)