opensurgsim
Public Member Functions | Public Attributes | List of all members
SurgSim::DataStructures::IndexedLocalCoordinate Struct Reference

A generic (size_t index, Vector coordinate) pair. More...

#include <IndexedLocalCoordinate.h>

Public Member Functions

 IndexedLocalCoordinate ()
 Default constructor with no initialization.
 
 IndexedLocalCoordinate (size_t index, const SurgSim::Math::Vector &coordinate)
 Constructor with initialization. More...
 
bool isApprox (const IndexedLocalCoordinate &other, double precision=std::numeric_limits< double >::epsilon()) const
 Comparison method 'isApprox'. More...
 

Public Attributes

size_t index
 Numeric index to indicate the entity w.r.t which the barycentricCoordinate is defined.
 
SurgSim::Math::Vector coordinate
 Coordinates with respect to the entity identified by the index.
 

Detailed Description

A generic (size_t index, Vector coordinate) pair.

The coordinate is a dynamic size vector. E.g. This can be used to represent a barycentric coordinate within a simplex (identified by the index).

Constructor & Destructor Documentation

§ IndexedLocalCoordinate()

SurgSim::DataStructures::IndexedLocalCoordinate::IndexedLocalCoordinate ( size_t  index,
const SurgSim::Math::Vector coordinate 
)

Constructor with initialization.

Parameters
indexNumeric index.
coordinateCoordinates with respect to the entity identified by the index.
Note
Constructor does not throw when given malformed parameters.

Member Function Documentation

§ isApprox()

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

Comparison method 'isApprox'.

Parameters
otherThe other IndexedLocalCoordinate to compare it to
precisionThe precision with which to compare
Returns
True if the two IndexedLocalCoordinate are equal within precision, False otherwise

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