All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Functions
SurgSim::Testing Namespace Reference

Namespaces

 Cube
 

Classes

struct  MockInputOutput
 
class  MockPhysicsManager
 Testing class used to publicly expose PhysicsManager's protected member functions. More...
 

Functions

SurgSim::Math::RigidTransform3d interpolatePose (const Vector3d &startAngles, const Vector3d &endAngles, const Vector3d &startPosition, const Vector3d &endPosition, const double &t)
 
template<>
SurgSim::Math::Quaterniond interpolate (const SurgSim::Math::Quaterniond &start, const SurgSim::Math::Quaterniond &end, const double &t)
 
template<>
SurgSim::Math::RigidTransform3d interpolate (const SurgSim::Math::RigidTransform3d &start, const SurgSim::Math::RigidTransform3d &end, const double &t)
 
template<class T >
interpolate (const T &start, const T &end, const double &t)
 Does a linear interpolation between the start and the end dependent on t. More...
 
template<class T >
interpolate (const std::pair< T, T > &values, const double &t)
 
template<>
SurgSim::Math::Quaterniond interpolate< SurgSim::Math::Quaterniond > (const SurgSim::Math::Quaterniond &start, const SurgSim::Math::Quaterniond &end, const double &t)
 Specialized template to call the correct function for Quaterniond, might be superfluous, delegates to the eigen interpolation function for Quaterniond. More...
 
template<>
SurgSim::Math::RigidTransform3d interpolate< SurgSim::Math::RigidTransform3d > (const SurgSim::Math::RigidTransform3d &start, const SurgSim::Math::RigidTransform3d &end, const double &t)
 Specialized template to call the correct function for RigidTransform3d, might be superfluous, delegates to the eigen interpolation function for RigidTransform3d. More...
 
SurgSim::Math::RigidTransform3d interpolatePose (const SurgSim::Math::Vector3d &startAngles, const SurgSim::Math::Vector3d &endAngles, const SurgSim::Math::Vector3d &startPosition, const SurgSim::Math::Vector3d &endPosition, const double &t)
 Does a linear interpolation on a pose, given Vector3d for angles and positions. More...
 

Function Documentation

template<class T >
T SurgSim::Testing::interpolate ( const T &  start,
const T &  end,
const double &  t 
)

Does a linear interpolation between the start and the end dependent on t.

Template Parameters
TThe type of value to be interpolated.
Parameters
startThe start value.
endThe end value.
tThe percentage for the interpolation.
Returns
the interpolated value.
template<class T >
T SurgSim::Testing::interpolate ( const std::pair< T, T > &  values,
const double &  t 
)
template<>
SurgSim::Math::Quaterniond SurgSim::Testing::interpolate ( const SurgSim::Math::Quaterniond start,
const SurgSim::Math::Quaterniond end,
const double &  t 
)
template<>
SurgSim::Math::RigidTransform3d SurgSim::Testing::interpolate ( const SurgSim::Math::RigidTransform3d start,
const SurgSim::Math::RigidTransform3d end,
const double &  t 
)

Specialized template to call the correct function for Quaterniond, might be superfluous, delegates to the eigen interpolation function for Quaterniond.

Parameters
startThe start quaternion.
endThe end quaternion.
tThe percentage for the interpolation.
Returns
the interpolated quaternion.

Specialized template to call the correct function for RigidTransform3d, might be superfluous, delegates to the eigen interpolation function for RigidTransform3d.

Parameters
startThe start quaternion.
endThe end quaternion.
tThe percentage for the interpolation.
Returns
the interpolated RigidTransform3d.
SurgSim::Math::RigidTransform3d SurgSim::Testing::interpolatePose ( const Vector3d &  startAngles,
const Vector3d &  endAngles,
const Vector3d &  startPosition,
const Vector3d &  endPosition,
const double &  t 
)
SurgSim::Math::RigidTransform3d SurgSim::Testing::interpolatePose ( const SurgSim::Math::Vector3d startAngles,
const SurgSim::Math::Vector3d endAngles,
const SurgSim::Math::Vector3d startPosition,
const SurgSim::Math::Vector3d endPosition,
const double &  t 
)

Does a linear interpolation on a pose, given Vector3d for angles and positions.

The angles around the X, Y and Z axis are being passed in a Vector3d for a terser expression.

Parameters
startAnglesThe start angles in the order X/Y/Z angle axis value in radians.
endAnglesThe end angles in the order X/Y/Z angle axis value in radians.
startPositionThe start position.
endPositionThe end position.
tThe percentage for the interpolation.
Returns
The transform gained by interpolating and assembling the rotation and position values.