opensurgsim
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 <Location.h>

Public Types

enum  Type { TRIANGLE, ELEMENT }
 

Public Member Functions

 Location ()
 Default constructor.
 
 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::OctreePath > octreeNodePath
 
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:

Constructor & Destructor Documentation

§ Location() [1/5]

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

Copy constructor.

Parameters
otherThe location to be copied while constructing.

§ Location() [2/5]

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() [3/5]

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() [4/5]

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

Constructor for an index.

Parameters
valThe index to set this location to

§ Location() [5/5]

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

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