Public Types | Public Member Functions | Public Attributes | List of all members
SurgSim::DataStructures::Location Struct Reference

A Location defines a local position w.r.t. More...

#include <SurgSim/DataStructures/Location.h>

Public Types

enum  Type { TRIANGLE, ELEMENT }
 

Public Member Functions

 Location ()
 Default constructor. More...
 
 Location (const Location &other)
 Copy constructor. More...
 
 Location (const SurgSim::Math::Vector3d &localPosition)
 Constructor for rigid local position. More...
 
 Location (const SurgSim::DataStructures::OctreePath &nodePath)
 Constructor for octree node path. More...
 
 Location (const size_t val)
 Constructor for an index. More...
 
 Location (const SurgSim::DataStructures::IndexedLocalCoordinate &localCoordinate, Type meshType)
 Constructor for mesh-based location. More...
 
const SurgSim::DataStructures::OptionalValue< SurgSim::DataStructures::IndexedLocalCoordinate > & get (Type meshType)
 Gives access to the coordinates via enum rather than '. More...
 
bool isApprox (const Location &other, double precision=std::numeric_limits< double >::epsilon()) const
 

Public Attributes

SurgSim::DataStructures::OptionalValue< SurgSim::Math::Vector3drigidLocalPosition
 
SurgSim::DataStructures::OptionalValue< SurgSim::DataStructures::OctreePathoctreeNodePath
 
SurgSim::DataStructures::OptionalValue< size_t > index
 
SurgSim::DataStructures::OptionalValue< SurgSim::DataStructures::IndexedLocalCoordinatetriangleMeshLocalCoordinate
 
SurgSim::DataStructures::OptionalValue< SurgSim::DataStructures::IndexedLocalCoordinateelementMeshLocalCoordinate
 

Detailed Description

A Location defines a local position w.r.t.

any shape. Depending on the type of shape, different data is needed to specify a location on it. This structure supports:

Member Enumeration Documentation

§ Type

Enumerator
TRIANGLE 
ELEMENT 

Constructor & Destructor Documentation

§ Location() [1/6]

SurgSim::DataStructures::Location::Location ( )
inline

Default constructor.

§ Location() [2/6]

SurgSim::DataStructures::Location::Location ( const Location other)
inline

Copy constructor.

Parameters
otherThe location to be copied while constructing.

§ Location() [3/6]

SurgSim::DataStructures::Location::Location ( const SurgSim::Math::Vector3d localPosition)
inlineexplicit

Constructor for rigid local position.

Parameters
localPositionThe 3D local position to set this location to

§ Location() [4/6]

SurgSim::DataStructures::Location::Location ( const SurgSim::DataStructures::OctreePath nodePath)
inlineexplicit

Constructor for octree node path.

Parameters
nodePathThe octree node path to set this location to

§ Location() [5/6]

SurgSim::DataStructures::Location::Location ( const size_t  val)
inlineexplicit

Constructor for an index.

Parameters
valThe index to set this location to

§ Location() [6/6]

SurgSim::DataStructures::Location::Location ( const SurgSim::DataStructures::IndexedLocalCoordinate localCoordinate,
Type  meshType 
)
inline

Constructor for mesh-based location.

Parameters
localCoordinateindex-based local coordinate
meshTypethe type of location (a node, a triangle or an element)

Member Function Documentation

§ get()

const SurgSim::DataStructures::OptionalValue<SurgSim::DataStructures::IndexedLocalCoordinate>& SurgSim::DataStructures::Location::get ( Type  meshType)
inline

Gives access to the coordinates via enum rather than '.

' public member access, this can reduce complexity in the calling code

Parameters
meshType(TRIANGLE or ELEMENT)
Returns
the appropriate coordinate for the type of mesh

§ isApprox()

bool SurgSim::DataStructures::Location::isApprox ( const Location other,
double  precision = std::numeric_limits<double>::epsilon() 
) const
inline

Member Data Documentation

§ elementMeshLocalCoordinate

SurgSim::DataStructures::OptionalValue<SurgSim::DataStructures::IndexedLocalCoordinate> SurgSim::DataStructures::Location::elementMeshLocalCoordinate

§ index

SurgSim::DataStructures::OptionalValue<size_t> SurgSim::DataStructures::Location::index

§ octreeNodePath

SurgSim::DataStructures::OptionalValue<SurgSim::DataStructures::OctreePath> SurgSim::DataStructures::Location::octreeNodePath

§ rigidLocalPosition

SurgSim::DataStructures::OptionalValue<SurgSim::Math::Vector3d> SurgSim::DataStructures::Location::rigidLocalPosition

§ triangleMeshLocalCoordinate

SurgSim::DataStructures::OptionalValue<SurgSim::DataStructures::IndexedLocalCoordinate> SurgSim::DataStructures::Location::triangleMeshLocalCoordinate

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