Classes | Functions
SurgSim::Math::TriangleCapsuleContactCalculation Namespace Reference

Classes

class  TriangleCapsuleContactCalculation
 Class used to find the intersection between a triangle and a capsule. More...
 

Functions

template<class T , int MOpt>
Eigen::Matrix< T, 3, 1, MOpt > pointWithTangentOnEllipse (const Eigen::Matrix< T, 3, 1, MOpt > &center, const Eigen::Matrix< T, 3, 1, MOpt > &majorAxis, const Eigen::Matrix< T, 3, 1, MOpt > &minorAxis, const double majorRadius, const double minorRadius, const Eigen::Matrix< T, 3, 1, MOpt > &tangent)
 Find the point on (positive X side of) ellipse parallel to the given tangent. More...
 

Function Documentation

◆ pointWithTangentOnEllipse()

template<class T , int MOpt>
Eigen::Matrix<T, 3, 1, MOpt> SurgSim::Math::TriangleCapsuleContactCalculation::pointWithTangentOnEllipse ( const Eigen::Matrix< T, 3, 1, MOpt > &  center,
const Eigen::Matrix< T, 3, 1, MOpt > &  majorAxis,
const Eigen::Matrix< T, 3, 1, MOpt > &  minorAxis,
const double  majorRadius,
const double  minorRadius,
const Eigen::Matrix< T, 3, 1, MOpt > &  tangent 
)

Find the point on (positive X side of) ellipse parallel to the given tangent.

Template Parameters
TAccuracy of the calculation, can usually be inferred.
MOptEigen Matrix options, can usually be inferred.
Parameters
tangentThe given tangent to this ellipse, whose corresponding point is to be found
centerCenter of the ellipse.
majorAxis,minorAxisThe major/minor axes of the ellipse, both of unit length
majorRadius,minorRadiusMajor/minor radii of the ellipse
Note
majorAxis and minorAxis are assumed to be orthogonal to each other.
Returns
The point on the ellipse (in positive x direction) which has the given tangent.