VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtVrfObjectGeometry Class Reference

Class Description: DtVrfObjectGeometry adds a vertex list maintained in the local database coordinate system. More...

Inheritance diagram for DtVrfObjectGeometry:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtVrfObjectGeometry (DtSimObjectStateRepository *sr, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 Constructor for readable/writable object.
 DtVrfObjectGeometry (const DtVrfObjectGeometry &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 Copy Constructor.
const DtVrfObjectGeometry & operator= (DtVrfObjectGeometry &orig)
 Assignment Operator.
virtual ~DtVrfObjectGeometry ()
 Destructor.
virtual DtVrfObjectGeometry * clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const
 Clone.
virtual const
DtSimBoundingGeometry & 
boundingGeometry () const
 Set / Get Bounding Geometry.
virtual DtSimBoundingGeometry & boundingGeometry ()
virtual void setBoundingGeometry (const DtSimBoundingGeometry &bounds)
virtual bool closedFigure () const
 Set / Get closed figure flag.
virtual void setClosedFigure (bool closed)
virtual bool projection () const
 Set / Get projection flag.
virtual void setProjection (bool projection)
virtual void removeAllObjectVertices ()
 Removes all vertices in the object's geometry.
virtual const
DtLocalVectorIterator & 
objectVertexIterator () const
const DtVertexList & oldWorld () const
virtual bool worldPointInsideBoundingGeometry (const DtVector &worldPoint, const DtVector &objectWorldLocation, const DtTaitBryan &objectWorldOrientation) const
 Returns true if the point, in world coordinates, is inside the object's bounding geometry.
virtual double worldDistSquaredTo (const DtVector &point) const
 Returns the squared distance from a given point in world coordinates, to the object.
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.
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.
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.
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.
virtual void removeVertex (int iIndex)
virtual bool calculateBoundingVolume (const DtVertexList &vertices, DtSimBoundingGeometry &boundingGeometry)
 Calculates the bounding volume of the object.
virtual const
DtSimBoundingGeometry & 
localBoundingGeometry () const
 These first 3 forms are useful if you: don't need the new location back and heading is 0.
virtual DtSimBoundingGeometry & localBoundingGeometry ()
virtual void setLocalBoundingGeometry (const DtSimBoundingGeometry &bounds)
virtual double distSquaredTo (const DtVector &testPoint) const
virtual void setObjectVertices (const DtLocalVertexList &vertices)
 Set / Get vertex list.
virtual void setObjectVertices (const DtList &vertices)
 Set / Get vertex list.
virtual const DtLocalVertexList & objectVertices () const
 Set / Get vertex list.
virtual DtLocalVertexList & objectVertices ()
 Set / Get vertex list.
virtual const
DtSimBoundingGeometry & 
worldBoundingGeometry () const
virtual DtSimBoundingGeometry & worldBoundingGeometry ()
virtual void setWorldBoundingGeometry (const DtSimBoundingGeometry &bounds)

Protected Member Functions

virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 Override to read old world and local vertices.
void removeAllOldWorldVertices ()
 Non-virtual -- it is called by the destructor.

Protected Attributes

DtLocalVertexList myObjectVertices
DtSimBoundingGeometry myBoundingGeometry
DtRwBoolean myClosedFigure
DtRwBoolean myProjection
DtVertexList myOldWorld
 modelVertices -- note, these are no longer used.
DtSimObjectStateRepository * myStateRep

Private Member Functions

 DtVrfObjectGeometry ()
 Default constructor. Do not use.

Detailed Description

Class Description: DtVrfObjectGeometry adds a vertex list maintained in the local database coordinate system.


Constructor & Destructor Documentation

Default constructor. Do not use.

DtVrfObjectGeometry::DtVrfObjectGeometry ( DtSimObjectStateRepository *  sr,
const DtString &  rwName = DtString::nullString(),
DtReaderWriterRegistry *  parentRegistry = 0 
)

Constructor for readable/writable object.

DtVrfObjectGeometry::DtVrfObjectGeometry ( const DtVrfObjectGeometry &  orig,
const DtString &  rwName = DtString::nullString(),
DtReaderWriterRegistry *  parentRegistry = 0 
)

Copy Constructor.

Destructor.


Member Function Documentation

const DtVrfObjectGeometry& DtVrfObjectGeometry::operator= ( DtVrfObjectGeometry &  orig)

Assignment Operator.

virtual DtVrfObjectGeometry* DtVrfObjectGeometry::clone ( const DtString &  rwName = DtString::nullString(),
DtReaderWriterRegistry *  parentRegistry = 0 
) const [virtual]

Clone.

Set / Get Bounding Geometry.

virtual void DtVrfObjectGeometry::setBoundingGeometry ( const DtSimBoundingGeometry &  bounds) [virtual]
virtual bool DtVrfObjectGeometry::closedFigure ( ) const [virtual]

Set / Get closed figure flag.

If true, then the last vertex connects back to the first, forming a closed figure.

virtual void DtVrfObjectGeometry::setClosedFigure ( bool  closed) [virtual]
virtual bool DtVrfObjectGeometry::projection ( ) const [virtual]

Set / Get projection flag.

If true, then the Z values in the vertices should be ignored.

virtual void DtVrfObjectGeometry::setProjection ( bool  projection) [virtual]

Removes all vertices in the object's geometry.

virtual void DtVrfObjectGeometry::setObjectVertices ( const DtLocalVertexList &  vertices) [virtual]

Set / Get vertex list.

Note that this represents the body coordinates stored in myObjectVertices, and not the vertices stored in the kinematic state which determine the network representation.

virtual void DtVrfObjectGeometry::setObjectVertices ( const DtList &  vertices) [virtual]

Set / Get vertex list.

Note that this represents the body coordinates stored in myObjectVertices, and not the vertices stored in the kinematic state which determine the network representation.

virtual const DtLocalVertexList& DtVrfObjectGeometry::objectVertices ( ) const [virtual]

Set / Get vertex list.

Note that this represents the body coordinates stored in myObjectVertices, and not the vertices stored in the kinematic state which determine the network representation.

Set / Get vertex list.

Note that this represents the body coordinates stored in myObjectVertices, and not the vertices stored in the kinematic state which determine the network representation.

const DtVertexList & DtVrfObjectGeometry::oldWorld ( ) const [inline]

References myOldWorld.

virtual bool DtVrfObjectGeometry::worldPointInsideBoundingGeometry ( const DtVector &  worldPoint,
const DtVector &  objectWorldLocation,
const DtTaitBryan &  objectWorldOrientation 
) const [virtual]

Returns true if the point, in world coordinates, is inside the object's bounding geometry.

virtual double DtVrfObjectGeometry::worldDistSquaredTo ( const DtVector &  point) const [virtual]

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.

virtual bool DtVrfObjectGeometry::worldGetClosestVertex ( const DtVector &  point,
DtVector &  vertex 
) const [virtual]

Determines the closest vertex in the object’s geometry to a given point, in world coordinates.

virtual bool DtVrfObjectGeometry::localGetClosestVertex ( const DtVector &  point,
DtVector &  vertex 
) const [virtual]

Determines the closest vertex in the object’s geometry to a given point, in local coordinates.

virtual bool DtVrfObjectGeometry::worldGetClosestLine ( const DtVector &  point,
DtVector &  linePt1,
DtVector &  linePt2 
) const [virtual]

Determines the closest line segment in the object’s geometry to a given *point, in world coordinates.

Sets linePt1 and linePt2 to be the vertices of the line closest to the point in this object's geometry.

virtual bool DtVrfObjectGeometry::localGetClosestLine ( const DtVector &  point,
DtVector &  linePt1,
DtVector &  linePt2 
) const [virtual]

Determines the closest line segment in the object’s geometry to a given *point, in local coordinates.

Sets linePt1 and linePt2 to be the vertices of the line closest to the point in this object's geometry.

Deprecated:
To be removed after VR-Forces 3.11.

These 3 functions are here for backward compatibility. There is now just "boundingGeometry"; not a world vs. local version.

Deprecated:
To be removed after VR-Forces 3.11.

These 3 functions are here for backward compatibility. There is now just "boundingGeometry"; not a world vs. local version.

virtual void DtVrfObjectGeometry::setWorldBoundingGeometry ( const DtSimBoundingGeometry &  bounds) [virtual]
Deprecated:
To be removed after VR-Forces 3.11.

These 3 functions are here for backward compatibility. There is now just "boundingGeometry"; not a world vs. local version.

virtual void DtVrfObjectGeometry::removeVertex ( int  iIndex) [virtual]
virtual bool DtVrfObjectGeometry::calculateBoundingVolume ( const DtVertexList &  vertices,
DtSimBoundingGeometry &  boundingGeometry 
) [virtual]

Calculates the bounding volume of the object.

Parameters:
verticesThe geocentric vertices of the object.
Note:
The bounding volume is calculated in geocentric coordinates.
Parameters:
boundingGeometryThe type of bounding geometry created. This parameter is set by this function, if it is able to calculate the bounding volume. If it is not, then this parameter is left unchanged.
Returns:
A boolean indicating success or failure in calculating the bounding volume.
Note:
The object must have more than one vertex to create a bounding volume.

These first 3 forms are useful if you: don't need the new location back and heading is 0.

Note though that calling them effectively changes the position of the object; usually you want to call the other forms (that return the new location) and call vrfKinematicState()->setLocalPosition() explicitly.

virtual void DtVrfObjectGeometry::setLocalBoundingGeometry ( const DtSimBoundingGeometry &  bounds) [virtual]
virtual double DtVrfObjectGeometry::distSquaredTo ( const DtVector &  testPoint) const [virtual]
virtual void DtVrfObjectGeometry::getSelf ( DtlObjPtr  args,
const DtFilename &  searchPath,
const DtVariableBindingsList &  variableBindings 
) [protected, virtual]

Override to read old world and local vertices.

Non-virtual -- it is called by the destructor.


Member Data Documentation

modelVertices -- note, these are no longer used.

This is only kept around to read in to use for restoring pre VR-Forces 3.8 order of battle files

Referenced by oldWorld().


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)