opensurgsim
Public Types | Public Member Functions | List of all members
SurgSim::Math::LinearMotionND< T, 3 > Class Template Reference

LinearMotionND<T, 3> specializes the LinearMotionND<T, N> class for 3 dimensions. More...

#include <LinearMotionArithmetic.h>

Public Types

typedef Eigen::Matrix< T, 3, 1 > Vector3
 Typedef for a vector 3 return.
 

Public Member Functions

 LinearMotionND ()
 Constructor.
 
 LinearMotionND (const std::array< LinearMotion< T >, 3 > &x)
 Constructor. More...
 
 LinearMotionND (const LinearMotion< T > &a, const LinearMotion< T > &b, const LinearMotion< T > &c)
 Constructor. More...
 
 LinearMotionND (const LinearMotionND< T, 3 > &motion)
 Copy constructor. More...
 
 LinearMotionND (LinearMotionND< T, 3 > &&motion)
 Move constructor. More...
 
 LinearMotionND (const std::array< T, 3 > &start, const std::array< T, 3 > &end)
 Constructor. More...
 
 LinearMotionND (const Vector3 &start, const Vector3 &end)
 Constructor. More...
 
LinearMotionND< T, 3 > & operator= (const LinearMotionND< T, 3 > &motion)
 Assignment operator. More...
 
LinearMotionND< T, 3 > & operator= (LinearMotionND< T, 3 > &&motion)
 Move assignment operator. More...
 
IntervalND< T, 3 > toInterval () const
 Convert from LinearMotion to an Interval. More...
 
bool isApprox (const LinearMotionND< T, 3 > &motion, const T &epsilon) const
 
bool operator== (const LinearMotionND< T, 3 > &motion) const
 
bool operator!= (const LinearMotionND< T, 3 > &motion) const
 
IntervalND< T, 3 > operator* (const LinearMotionND< T, 3 > &m) const
 Standard arithmetic operators extended to interval groups. More...
 
IntervalND< T, 3 > operator/ (const LinearMotionND< T, 3 > &m) const
 Standard arithmetic operators extended to interval groups. More...
 
Interval< T > dotProduct (const LinearMotionND< T, 3 > &motion, const Interval< T > &range) const
 
IntervalND< T, 3 > crossProduct (const LinearMotionND< T, 3 > &motion, const Interval< T > &range) const
 
Interval< T > magnitudeSquared (const Interval< T > &range) const
 
Interval< T > magnitude (const Interval< T > &range) const
 
const LinearMotion< T > & getAxis (int i) const
 
void getStart (std::array< T, 3 > *start) const
 
void getEnd (std::array< T, 3 > *end) const
 
Vector3 getStart () const
 
Vector3 getEnd () const
 
Vector3 atTime (const T &t) const
 
LinearMotionND< T, 3 > firstHalf () const
 
LinearMotionND< T, 3 > secondHalf () const
 
LinearMotionND< T, 3 > operator+ (const LinearMotionND< T, 3 > &m) const
 
LinearMotionND< T, 3 > & operator+= (const LinearMotionND< T, 3 > &m)
 
LinearMotionND< T, 3 > operator- (const LinearMotionND< T, 3 > &m) const
 
LinearMotionND< T, 3 > & operator-= (const LinearMotionND< T, 3 > &m)
 

Detailed Description

template<class T>
class SurgSim::Math::LinearMotionND< T, 3 >

LinearMotionND<T, 3> specializes the LinearMotionND<T, N> class for 3 dimensions.

See also
LinearMotion<T>, LinearMotionND<T, N> and IntervalArthmetic<T, 3>

Constructor & Destructor Documentation

§ LinearMotionND() [1/6]

template<typename T >
SurgSim::Math::LinearMotionND< T, 3 >::LinearMotionND ( const std::array< LinearMotion< T >, 3 > &  x)
explicit

Constructor.

Parameters
xarray of 3 linear motions to be copied into the group

§ LinearMotionND() [2/6]

template<typename T >
SurgSim::Math::LinearMotionND< T, 3 >::LinearMotionND ( const LinearMotion< T > &  a,
const LinearMotion< T > &  b,
const LinearMotion< T > &  c 
)

Constructor.

Parameters
afirst linear motion to be added to the 3 group
bsecond linear motion to be added to the 3 group
cthird linear motion to be added to the 3 group

§ LinearMotionND() [3/6]

template<typename T >
SurgSim::Math::LinearMotionND< T, 3 >::LinearMotionND ( const LinearMotionND< T, 3 > &  motion)

Copy constructor.

Parameters
motionlinear motion 3 group to be copied

§ LinearMotionND() [4/6]

template<typename T >
SurgSim::Math::LinearMotionND< T, 3 >::LinearMotionND ( LinearMotionND< T, 3 > &&  motion)

Move constructor.

Parameters
motionLinear motion to be copied

§ LinearMotionND() [5/6]

template<typename T >
SurgSim::Math::LinearMotionND< T, 3 >::LinearMotionND ( const std::array< T, 3 > &  start,
const std::array< T, 3 > &  end 
)

Constructor.

Parameters
startarray of 3 values to be used as the respective starts for the linear motion entries.
endarray of 3 values to be used as the respective ends for the linear motion entries.

§ LinearMotionND() [6/6]

template<typename T >
SurgSim::Math::LinearMotionND< T, 3 >::LinearMotionND ( const Vector3 start,
const Vector3 end 
)

Constructor.

Parameters
startarray of 3 values to be used as the respective starts for the linear motion entries.
endarray of 3 values to be used as the respective ends for the linear motion entries.

Member Function Documentation

§ atTime()

template<typename T >
LinearMotionND< T, 3 >::Vector3 SurgSim::Math::LinearMotionND< T, 3 >::atTime ( const T &  t) const
Parameters
tthe parametric value at which to evaluate the linear motion
Returns
the value of the linear motion 3D at time t as a 3 Vector

§ crossProduct()

template<typename T >
IntervalND< T, 3 > SurgSim::Math::LinearMotionND< T, 3 >::crossProduct ( const LinearMotionND< T, 3 > &  motion,
const Interval< T > &  range 
) const
Parameters
motionthe input linear motion 3 group
rangethe range over which the cross product is to be evaluated.
Returns
the interval cross product of the current 3 group and interval evaluated over the interval range.

§ dotProduct()

template<typename T >
Interval< T > SurgSim::Math::LinearMotionND< T, 3 >::dotProduct ( const LinearMotionND< T, 3 > &  motion,
const Interval< T > &  range 
) const
Parameters
motionthe input linear motion 3 group
rangethe range over which the dot product is to be evaluated.
Returns
the interval dot product of the current 3 group and interval evaluated over the interval range.

§ firstHalf()

template<typename T >
LinearMotionND< T, 3 > SurgSim::Math::LinearMotionND< T, 3 >::firstHalf ( ) const
Returns
the linear motion 3D from the start to the midpoint

§ getAxis()

template<typename T >
const LinearMotion< T > & SurgSim::Math::LinearMotionND< T, 3 >::getAxis ( int  i) const
Parameters
ithe selector for the linear motion to be returned
Returns
the ith linear motion in the current 3 group
Exceptions
thrownif the requested axis is < 0 or greater than 2

§ getEnd() [1/2]

template<typename T >
void SurgSim::Math::LinearMotionND< T, 3 >::getEnd ( std::array< T, 3 > *  end) const
Parameters
end[out] the end of the linear motion 3D as a 3 value array

§ getEnd() [2/2]

template<typename T >
LinearMotionND< T, 3 >::Vector3 SurgSim::Math::LinearMotionND< T, 3 >::getEnd ( ) const
Returns
the end of the linear motion 3D as a 3 Vector

§ getStart() [1/2]

template<typename T >
void SurgSim::Math::LinearMotionND< T, 3 >::getStart ( std::array< T, 3 > *  start) const
Parameters
start[out] the start of the linear motion 3D as a 3 value array

§ getStart() [2/2]

template<typename T >
LinearMotionND< T, 3 >::Vector3 SurgSim::Math::LinearMotionND< T, 3 >::getStart ( ) const
Returns
the start of the linear motion 3D as a 3 Vector

§ isApprox()

template<typename T >
bool SurgSim::Math::LinearMotionND< T, 3 >::isApprox ( const LinearMotionND< T, 3 > &  motion,
const T &  epsilon 
) const
Parameters
motionthe motion group to be tested
epsilonthe nearness parameter
Returns
true if each linear motion in the input group is approximately equal to its correspondent element in motion.

§ magnitude()

template<typename T >
Interval< T > SurgSim::Math::LinearMotionND< T, 3 >::magnitude ( const Interval< T > &  range) const
Returns
the linear motion magnitude for the current 3 group

§ magnitudeSquared()

template<typename T >
Interval< T > SurgSim::Math::LinearMotionND< T, 3 >::magnitudeSquared ( const Interval< T > &  range) const
Returns
the square of the linear motion magnitude for the current 3 group

§ operator!=()

template<typename T >
bool SurgSim::Math::LinearMotionND< T, 3 >::operator!= ( const LinearMotionND< T, 3 > &  motion) const
Parameters
motionthe linear motion group to be tested
Returns
true if the current linear motion 3 group is not identical to the input 3 group motion.

§ operator*()

template<typename T >
IntervalND< T, 3 > SurgSim::Math::LinearMotionND< T, 3 >::operator* ( const LinearMotionND< T, 3 > &  m) const

Standard arithmetic operators extended to interval groups.

Note
Multiplication and division operators by their nature do not preserve time ordering and so the return value is an IntervalND instead of a LinearMotionND

§ operator+()

template<typename T >
LinearMotionND< T, 3 > SurgSim::Math::LinearMotionND< T, 3 >::operator+ ( const LinearMotionND< T, 3 > &  m) const

Standard arithmetic operators extended to 3 interval groups

§ operator/()

template<typename T >
IntervalND< T, 3 > SurgSim::Math::LinearMotionND< T, 3 >::operator/ ( const LinearMotionND< T, 3 > &  m) const

Standard arithmetic operators extended to interval groups.

Note
Multiplication and division operators by their nature do not preserve time ordering and so the return value is an IntervalND instead of a LinearMotionND
Exceptions
ifany component of interval includes 0

§ operator=() [1/2]

template<typename T >
LinearMotionND< T, 3 > & SurgSim::Math::LinearMotionND< T, 3 >::operator= ( const LinearMotionND< T, 3 > &  motion)

Assignment operator.

Parameters
motionLinear motion 3 group to be copied

§ operator=() [2/2]

template<typename T >
LinearMotionND< T, 3 > & SurgSim::Math::LinearMotionND< T, 3 >::operator= ( LinearMotionND< T, 3 > &&  motion)

Move assignment operator.

Parameters
motionLinear motion 3 group to be moved

§ operator==()

template<typename T >
bool SurgSim::Math::LinearMotionND< T, 3 >::operator== ( const LinearMotionND< T, 3 > &  motion) const
Parameters
motionthe linear motion group to be tested
Returns
true if the current linear motion 3 group is identical to the input 3 group motion

§ secondHalf()

template<typename T >
LinearMotionND< T, 3 > SurgSim::Math::LinearMotionND< T, 3 >::secondHalf ( ) const
Returns
the linear motion 3D from the midpoint to the start

§ toInterval()

template<typename T >
IntervalND< T, 3 > SurgSim::Math::LinearMotionND< T, 3 >::toInterval ( ) const

Convert from LinearMotion to an Interval.

Returns
the conversion of the 3D LinearMotion to a 3D Interval

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