![]() |
Namespaces | |
Geometry | |
Classes | |
class | BoxShape |
Box shape: box centered on (0 0 0), aligned with the axis with different sizes along X, Y and Z. More... | |
class | CapsuleShape |
Capsule shape: centered on (0, 0, 0), aligned along Y, with length and radius. More... | |
class | CylinderShape |
Cylinder shape: centered on (0 0 0), aligned along Y, defined with length and radius. More... | |
class | DoubleSidedPlaneShape |
DoubleSidedPlaneShape: The XZ plane (d = 0) with normal pointing along positive Y axis. More... | |
struct | gaussQuadraturePoint |
class | LinearSolveAndInverse |
LinearSolveAndInverse aims at performing an efficient linear system resolution and calculating its inverse matrix at the same time. More... | |
class | LinearSolveAndInverseDenseMatrix |
Derivation for dense matrix type. More... | |
class | LinearSolveAndInverseDiagonalMatrix |
Derivation for diagonal matrix type. More... | |
class | LinearSolveAndInverseSymmetricTriDiagonalBlockMatrix |
Derivation for symmetric tri-diagonal block matrix type. More... | |
class | LinearSolveAndInverseTriDiagonalBlockMatrix |
Derivation for tri-diagonal block matrix type. More... | |
class | MeshShape |
Mesh shape: shape made of a triangle mesh The triangle mesh needs to be watertight to produce valid volume, center and second moment of volume. More... | |
class | MlcpGaussSeidelSolver |
A solver for mixed LCP problems using the Gauss-Seidel iterative method. More... | |
struct | MlcpProblem |
A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved. More... | |
struct | MlcpSolution |
The description of a solution to a mixed linear complementarity problem. More... | |
class | MlcpSolver |
This class provides a solver interface for mixed linear complementarity problems. More... | |
class | OctreeShape |
Octree Shape A defined by an octree data structure. More... | |
class | OdeEquation |
Ode equation of 2nd order of the form M(x,v).a = F(x, v) with (x0, v0) for initial conditions and a set of boundary conditions. More... | |
class | OdeSolver |
Base class for all solvers of ode equation of order 2 of the form M(x(t), v(t)).a(t) = f(t, x(t), v(t)) More... | |
class | OdeSolverEulerExplicit |
Euler Explicit ode solver. More... | |
class | OdeSolverEulerExplicitModified |
Euler Explicit Modified ode solver. More... | |
class | OdeSolverEulerImplicit |
Euler Implicit ode solver. More... | |
class | OdeSolverLinearEulerExplicit |
Linear Version of the Euler Explicit ode solver This solver assumes that the system is linear, ie that Mass, Damping, and Stiffness matrices do not change. More... | |
class | OdeSolverLinearEulerExplicitModified |
Linear Version of the Modified Euler Explicit ode solver This solver assumes that the system is linear, ie that Mass, Damping, and Stiffness matrices do not change. More... | |
class | OdeSolverLinearEulerImplicit |
Linear Version of the Euler Implicit ode solver This solver assumes that the system is linear, ie that Mass, Damping, and Stiffness matrices do not change. More... | |
class | OdeSolverLinearRungeKutta4 |
Linear Version of the Runge Kutta 4 ode solver This solver assumes that the system is linear ie that Mass, Damping, and Stiffness matrices do not change. More... | |
class | OdeSolverLinearStatic |
Linear version of the static ode solver This solver assumes that the system is linear, ie that Stiffness matrix does not change. More... | |
class | OdeSolverRungeKutta4 |
Runge Kutta 4 ode solver See http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods. More... | |
class | OdeSolverStatic |
Static ode solver. More... | |
class | OdeState |
OdeState defines the state y of an ode of 2nd order of the form M(x,v).a = F(x, v) with boundary conditions. More... | |
class | PlaneShape |
The XZ plane (d = 0) with normal pointing along positive Y axis. More... | |
class | Shape |
Generic rigid shape class defining a shape. More... | |
class | SphereShape |
Sphere shape: sphere centered on (0 0 0), defined with radius. More... | |
class | SurfaceMeshShape |
SurfaceMeshShape defines a shape based on a mesh, like MeshShape. More... | |
class | TriangleHelper |
A helper class for a triangle, used for the following two purposes: More... | |
Typedefs | |
typedef Eigen::AlignedBox< float, 3 > | Aabbf |
Wrapper around the Eigen type. More... | |
typedef Eigen::AlignedBox< double, 3 > | Aabbd |
Wrapper around the Eigen type. More... | |
typedef Eigen::Matrix< float, 2, 2, Eigen::RowMajor > | Matrix22f |
A 2x2 matrix of floats. More... | |
typedef Eigen::Matrix< float, 3, 3, Eigen::RowMajor > | Matrix33f |
A 3x3 matrix of floats. More... | |
typedef Eigen::Matrix< float, 4, 4, Eigen::RowMajor > | Matrix44f |
A 4x4 matrix of floats. More... | |
typedef Eigen::Matrix< double, 2, 2, Eigen::RowMajor > | Matrix22d |
A 2x2 matrix of doubles. More... | |
typedef Eigen::Matrix< double, 3, 3, Eigen::RowMajor > | Matrix33d |
A 3x3 matrix of doubles. More... | |
typedef Eigen::Matrix< double, 4, 4, Eigen::RowMajor > | Matrix44d |
A 4x4 matrix of doubles. More... | |
typedef Eigen::Matrix< double, 6, 6, Eigen::RowMajor > | Matrix66d |
A 6x6 matrix of doubles. More... | |
typedef Eigen::DiagonalMatrix< double, Eigen::Dynamic > | DiagonalMatrix |
A dynamic size diagonal matrix. More... | |
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > | Matrix |
A dynamic size matrix. More... | |
typedef Eigen::Quaternion< float > | Quaternionf |
A quaternion of floats. More... | |
typedef Eigen::Quaternion< double > | Quaterniond |
A quaternion of doubles. More... | |
typedef Eigen::Transform< float, 2, Eigen::Isometry > | RigidTransform2f |
A 2D rigid (isometric) transform, represented as floats. More... | |
typedef Eigen::Transform< float, 3, Eigen::Isometry > | RigidTransform3f |
A 3D rigid (isometric) transform, represented as floats. More... | |
typedef Eigen::Transform< double, 2, Eigen::Isometry > | RigidTransform2d |
A 2D rigid (isometric) transform, represented as doubles. More... | |
typedef Eigen::Transform< double, 3, Eigen::Isometry > | RigidTransform3d |
A 3D rigid (isometric) transform, represented as doubles. More... | |
typedef Eigen::Matrix< float, 2, 1 > | Vector2f |
A 2D vector of floats. More... | |
typedef Eigen::Matrix< float, 3, 1 > | Vector3f |
A 3D vector of floats. More... | |
typedef Eigen::Matrix< float, 4, 1 > | Vector4f |
A 4D vector of floats. More... | |
typedef Eigen::Matrix< float, 6, 1 > | Vector6f |
A 6D vector of floats. More... | |
typedef Eigen::Matrix< double, 2, 1 > | Vector2d |
A 2D vector of doubles. More... | |
typedef Eigen::Matrix< double, 3, 1 > | Vector3d |
A 3D vector of doubles. More... | |
typedef Eigen::Matrix< double, 4, 1 > | Vector4d |
A 4D vector of doubles. More... | |
typedef Eigen::Matrix< double, 6, 1 > | Vector6d |
A 6D matrix of doubles. More... | |
typedef Eigen::Matrix< double, Eigen::Dynamic, 1 > | Vector |
A dynamic size column vector. More... | |
Functions | |
template<class Scalar , int Dim> | |
bool | doAabbIntersect (const Eigen::AlignedBox< Scalar, Dim > &aabb0, const Eigen::AlignedBox< Scalar, Dim > &aabb1, double tolerance) |
Determine whether two AABBs have an intersection with each other, for the calculation see http://www.gamasutra.com/view/feature/131790/simple_intersection_tests_for_games.php?page=3. More... | |
template<class Scalar , int Dim> | |
bool | doAabbIntersect (const Eigen::AlignedBox< Scalar, Dim > &a, const Eigen::AlignedBox< Scalar, Dim > &b) |
Determine whether two AABBs overlap, using a minimal set of eigen calls, does not take a tolerance. More... | |
template<class Scalar , int Dim, int MType> | |
Eigen::AlignedBox< Scalar, Dim > | makeAabb (const Eigen::Matrix< Scalar, Dim, 1, MType > &vector0, const Eigen::Matrix< Scalar, Dim, 1, MType > &vector1, const Eigen::Matrix< Scalar, Dim, 1, MType > &vector2) |
Convenience function for creating a bounding box from three vertices (e.g. More... | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::BoxShape, BoxShape) | |
SURGSIM_STATIC_REGISTRATION (BoxShape) | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::CapsuleShape, CapsuleShape) | |
SURGSIM_STATIC_REGISTRATION (CapsuleShape) | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::CylinderShape, CylinderShape) | |
SURGSIM_STATIC_REGISTRATION (CylinderShape) | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::DoubleSidedPlaneShape, DoubleSidedPlaneShape) | |
SURGSIM_STATIC_REGISTRATION (DoubleSidedPlaneShape) | |
template<class T , int MOpt> | |
bool | barycentricCoordinates (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, const Eigen::Matrix< T, 3, 1, MOpt > &tn, Eigen::Matrix< T, 3, 1, MOpt > *coordinates) |
Calculate the barycentric coordinates of a point with respect to a triangle. More... | |
template<class T , int MOpt> | |
bool | barycentricCoordinates (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, Eigen::Matrix< T, 3, 1, MOpt > *coordinates) |
Calculate the barycentric coordinates of a point with respect to a triangle. More... | |
template<class T , int MOpt> | |
bool | isPointInsideTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, const Eigen::Matrix< T, 3, 1, MOpt > &tn) |
Check if a point is inside a triangle. More... | |
template<class T , int MOpt> | |
bool | isPointInsideTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2) |
Check if a point is inside a triangle. More... | |
template<class T , int MOpt> | |
bool | isCoplanar (const Eigen::Matrix< T, 3, 1, MOpt > &a, const Eigen::Matrix< T, 3, 1, MOpt > &b, const Eigen::Matrix< T, 3, 1, MOpt > &c, const Eigen::Matrix< T, 3, 1, MOpt > &d) |
Check whether the points are coplanar. More... | |
template<class T , int MOpt> | |
T | distancePointLine (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &v0, const Eigen::Matrix< T, 3, 1, MOpt > &v1, Eigen::Matrix< T, 3, 1, MOpt > *result) |
Calculate the normal distance between a point and a line. More... | |
template<class T , int MOpt> | |
T | distancePointSegment (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &sv0, const Eigen::Matrix< T, 3, 1, MOpt > &sv1, Eigen::Matrix< T, 3, 1, MOpt > *result) |
Point segment distance, if the projection of the closest point is not within the segments, the closest segment point is used for the distance calculation. More... | |
template<class T , int MOpt> | |
T | distanceLineLine (const Eigen::Matrix< T, 3, 1, MOpt > &l0v0, const Eigen::Matrix< T, 3, 1, MOpt > &l0v1, const Eigen::Matrix< T, 3, 1, MOpt > &l1v0, const Eigen::Matrix< T, 3, 1, MOpt > &l1v1, Eigen::Matrix< T, 3, 1, MOpt > *pt0, Eigen::Matrix< T, 3, 1, MOpt > *pt1) |
Determine the distance between two lines. More... | |
template<class T , int MOpt> | |
T | distanceSegmentSegment (const Eigen::Matrix< T, 3, 1, MOpt > &s0v0, const Eigen::Matrix< T, 3, 1, MOpt > &s0v1, const Eigen::Matrix< T, 3, 1, MOpt > &s1v0, const Eigen::Matrix< T, 3, 1, MOpt > &s1v1, Eigen::Matrix< T, 3, 1, MOpt > *pt0, Eigen::Matrix< T, 3, 1, MOpt > *pt1, T *s0t=nullptr, T *s1t=nullptr) |
Distance between two segments, if the project of the closest point is not on the opposing segment, the segment endpoints will be used for the distance calculation. More... | |
template<class T , int MOpt> | |
T | distancePointTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, Eigen::Matrix< T, 3, 1, MOpt > *result) |
Calculate the normal distance of a point from a triangle, the resulting point will be on the edge of the triangle if the projection of the point is not inside the triangle. More... | |
template<class T , int MOpt> | |
bool | doesCollideSegmentTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &sv0, const Eigen::Matrix< T, 3, 1, MOpt > &sv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, const Eigen::Matrix< T, 3, 1, MOpt > &tn, Eigen::Matrix< T, 3, 1, MOpt > *result) |
Calculate the intersection of a line segment with a triangle See http://geomalgorithms.com/a06-_intersect-2.html#intersect_RayTriangle for the algorithm. More... | |
template<class T , int MOpt> | |
T | distancePointPlane (const Eigen::Matrix< T, 3, 1, MOpt > &pt, const Eigen::Matrix< T, 3, 1, MOpt > &n, T d, Eigen::Matrix< T, 3, 1, MOpt > *result) |
Calculate the distance of a point to a plane. More... | |
template<class T , int MOpt> | |
T | distanceSegmentPlane (const Eigen::Matrix< T, 3, 1, MOpt > &sv0, const Eigen::Matrix< T, 3, 1, MOpt > &sv1, const Eigen::Matrix< T, 3, 1, MOpt > &n, T d, Eigen::Matrix< T, 3, 1, MOpt > *closestPointSegment, Eigen::Matrix< T, 3, 1, MOpt > *planeIntersectionPoint) |
Calculate the distance between a segment and a plane. More... | |
template<class T , int MOpt> | |
T | distanceTrianglePlane (const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, const Eigen::Matrix< T, 3, 1, MOpt > &n, T d, Eigen::Matrix< T, 3, 1, MOpt > *closestPointTriangle, Eigen::Matrix< T, 3, 1, MOpt > *planeProjectionPoint) |
Calculate the distance of a triangle to a plane. More... | |
template<class T , int MOpt> | |
bool | doesIntersectPlanePlane (const Eigen::Matrix< T, 3, 1, MOpt > &pn0, T pd0, const Eigen::Matrix< T, 3, 1, MOpt > &pn1, T pd1, Eigen::Matrix< T, 3, 1, MOpt > *pt0, Eigen::Matrix< T, 3, 1, MOpt > *pt1) |
Test if two planes are intersecting, if yes also calculate the intersection line. More... | |
template<class T , int MOpt> | |
T | distanceSegmentTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &sv0, const Eigen::Matrix< T, 3, 1, MOpt > &sv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, Eigen::Matrix< T, 3, 1, MOpt > *segmentPoint, Eigen::Matrix< T, 3, 1, MOpt > *trianglePoint) |
Calculate the distance of a line segment to a triangle. More... | |
template<class T , int MOpt> | |
T | distanceSegmentTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &sv0, const Eigen::Matrix< T, 3, 1, MOpt > &sv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv0, const Eigen::Matrix< T, 3, 1, MOpt > &tv1, const Eigen::Matrix< T, 3, 1, MOpt > &tv2, const Eigen::Matrix< T, 3, 1, MOpt > &normal, Eigen::Matrix< T, 3, 1, MOpt > *segmentPoint, Eigen::Matrix< T, 3, 1, MOpt > *trianglePoint) |
Calculate the distance of a line segment to a triangle. More... | |
template<class T , int MOpt> | |
T | distanceTriangleTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &t0v0, const Eigen::Matrix< T, 3, 1, MOpt > &t0v1, const Eigen::Matrix< T, 3, 1, MOpt > &t0v2, const Eigen::Matrix< T, 3, 1, MOpt > &t1v0, const Eigen::Matrix< T, 3, 1, MOpt > &t1v1, const Eigen::Matrix< T, 3, 1, MOpt > &t1v2, Eigen::Matrix< T, 3, 1, MOpt > *closestPoint0, Eigen::Matrix< T, 3, 1, MOpt > *closestPoint1) |
Calculate the distance between two triangles. More... | |
template<class T , int MOpt> | |
void | intersectionsSegmentBox (const Eigen::Matrix< T, 3, 1, MOpt > &sv0, const Eigen::Matrix< T, 3, 1, MOpt > &sv1, const Eigen::AlignedBox< T, 3 > &box, std::vector< Eigen::Matrix< T, 3, 1, MOpt > > *intersections) |
Calculate the intersections between a line segment and an axis aligned box. More... | |
template<class T , int MOpt> | |
bool | doesIntersectBoxCapsule (const Eigen::Matrix< T, 3, 1, MOpt > &capsuleBottom, const Eigen::Matrix< T, 3, 1, MOpt > &capsuleTop, const T capsuleRadius, const Eigen::AlignedBox< T, 3 > &box) |
Test if an axis aligned box intersects with a capsule. More... | |
template<class T , int MOpt> | |
bool | doesIntersectTriangleTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &t0v0, const Eigen::Matrix< T, 3, 1, MOpt > &t0v1, const Eigen::Matrix< T, 3, 1, MOpt > &t0v2, const Eigen::Matrix< T, 3, 1, MOpt > &t1v0, const Eigen::Matrix< T, 3, 1, MOpt > &t1v1, const Eigen::Matrix< T, 3, 1, MOpt > &t1v2, const Eigen::Matrix< T, 3, 1, MOpt > &t0n, const Eigen::Matrix< T, 3, 1, MOpt > &t1n) |
Check if the two triangles intersect using separating axis test. More... | |
template<class T , int MOpt> | |
bool | doesIntersectTriangleTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &t0v0, const Eigen::Matrix< T, 3, 1, MOpt > &t0v1, const Eigen::Matrix< T, 3, 1, MOpt > &t0v2, const Eigen::Matrix< T, 3, 1, MOpt > &t1v0, const Eigen::Matrix< T, 3, 1, MOpt > &t1v1, const Eigen::Matrix< T, 3, 1, MOpt > &t1v2) |
Check if the two triangles intersect using separating axis test. More... | |
template<class T , int MOpt> | |
bool | calculateContactTriangleTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &t0v0, const Eigen::Matrix< T, 3, 1, MOpt > &t0v1, const Eigen::Matrix< T, 3, 1, MOpt > &t0v2, const Eigen::Matrix< T, 3, 1, MOpt > &t1v0, const Eigen::Matrix< T, 3, 1, MOpt > &t1v1, const Eigen::Matrix< T, 3, 1, MOpt > &t1v2, const Eigen::Matrix< T, 3, 1, MOpt > &t0n, const Eigen::Matrix< T, 3, 1, MOpt > &t1n, T *penetrationDepth, Eigen::Matrix< T, 3, 1, MOpt > *penetrationPoint0, Eigen::Matrix< T, 3, 1, MOpt > *penetrationPoint1, Eigen::Matrix< T, 3, 1, MOpt > *contactNormal) |
Calculate the contact between two triangles. More... | |
template<class T , int MOpt> | |
bool | calculateContactTriangleTriangle (const Eigen::Matrix< T, 3, 1, MOpt > &t0v0, const Eigen::Matrix< T, 3, 1, MOpt > &t0v1, const Eigen::Matrix< T, 3, 1, MOpt > &t0v2, const Eigen::Matrix< T, 3, 1, MOpt > &t1v0, const Eigen::Matrix< T, 3, 1, MOpt > &t1v1, const Eigen::Matrix< T, 3, 1, MOpt > &t1v2, T *penetrationDepth, Eigen::Matrix< T, 3, 1, MOpt > *penetrationPoint0, Eigen::Matrix< T, 3, 1, MOpt > *penetrationPoint1, Eigen::Matrix< T, 3, 1, MOpt > *contactNormal) |
Calculate the contact between two triangles. More... | |
template<typename T , int VOpt> | |
Eigen::Matrix< T, 3, 3 > | makeRotationMatrix (const T &angle, const Eigen::Matrix< T, 3, 1, VOpt > &axis) |
Create a rotation matrix corresponding to the specified angle (in radians) and axis. More... | |
template<typename T , int VOpt> | |
Eigen::Matrix< T, 3, 3 > | makeSkewSymmetricMatrix (const Eigen::Matrix< T, 3, 1, VOpt > &vector) |
Create a skew-symmetric matrix corresponding to the specified vector. More... | |
template<typename T , int MOpt> | |
Eigen::Matrix< T, 3, 1 > | skew (const Eigen::Matrix< T, 3, 3, MOpt > &matrix) |
Extract the unique vector from the skew-symmetric part of a given matrix. More... | |
template<typename T , int MOpt, int VOpt> | |
void | computeAngleAndAxis (const Eigen::Matrix< T, 3, 3, MOpt > &matrix, T *angle, Eigen::Matrix< T, 3, 1, VOpt > *axis) |
Get the angle (in radians) and axis corresponding to a rotation matrix. More... | |
template<typename T , int MOpt> | |
T | computeAngle (const Eigen::Matrix< T, 3, 3, MOpt > &matrix) |
Get the angle corresponding to a quaternion's rotation, in radians. More... | |
template<class Matrix , class SubMatrix > | |
void | addSubMatrix (const SubMatrix &subMatrix, size_t blockIdRow, size_t blockIdCol, size_t blockSizeRow, size_t blockSizeCol, Matrix *matrix) |
Helper method to add a sub-matrix into a matrix, for the sake of clarity. More... | |
template<class Matrix , class SubMatrix > | |
void | addSubMatrix (const SubMatrix &subMatrix, const std::vector< size_t > blockIds, size_t blockSize, Matrix *matrix) |
Helper method to add a sub-matrix made of squared-blocks into a matrix, for the sake of clarity. More... | |
template<class Matrix , class SubMatrix > | |
void | setSubMatrix (const SubMatrix &subMatrix, size_t blockIdRow, size_t blockIdCol, size_t blockSizeRow, size_t blockSizeCol, Matrix *matrix) |
Helper method to set a sub-matrix into a matrix, for the sake of clarity. More... | |
template<class Matrix > | |
Eigen::Block< Matrix > | getSubMatrix (Matrix &matrix, size_t blockIdRow, size_t blockIdCol, size_t blockSizeRow, size_t blockSizeCol) |
Helper method to access a sub-matrix from a matrix, for the sake of clarity. More... | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::MeshShape, MeshShape) | |
SURGSIM_STATIC_REGISTRATION (MeshShape) | |
std::string | getMlcpConstraintTypeName (MlcpConstraintType constraintType) |
MlcpConstraintType | getMlcpConstraintTypeValue (const std::string &typeName) |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::OctreeShape, OctreeShape) | |
SURGSIM_STATIC_REGISTRATION (OctreeShape) | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::PlaneShape, PlaneShape) | |
SURGSIM_STATIC_REGISTRATION (PlaneShape) | |
template<typename T , int VOpt> | |
Eigen::Quaternion< T > | makeRotationQuaternion (const T &angle, const Eigen::Matrix< T, 3, 1, VOpt > &axis) |
Create a quaternion rotation corresponding to the specified angle (in radians) and axis. More... | |
template<typename T , int QOpt> | |
Eigen::Quaternion< T, QOpt > | negate (const Eigen::Quaternion< T, QOpt > &q) |
Quaternion negation (i.e. More... | |
template<typename T , int QOpt, int VOpt> | |
void | computeAngleAndAxis (const Eigen::Quaternion< T, QOpt > &quaternion, T *angle, Eigen::Matrix< T, 3, 1, VOpt > *axis) |
Get the angle (in radians) and axis corresponding to a quaternion's rotation. More... | |
template<typename T , int QOpt> | |
T | computeAngle (const Eigen::Quaternion< T, QOpt > &quaternion) |
Get the angle corresponding to a quaternion's rotation, in radians. More... | |
template<typename T , int TOpt, int VOpt> | |
void | computeRotationVector (const Eigen::Transform< T, 3, Eigen::Isometry, TOpt > &end, const Eigen::Transform< T, 3, Eigen::Isometry, TOpt > &start, Eigen::Matrix< T, 3, 1, VOpt > *rotationVector) |
Get the vector corresponding to the rotation between transforms. More... | |
template<typename T , int QOpt> | |
Eigen::Quaternion< T, QOpt > | interpolate (const Eigen::Quaternion< T, QOpt > &q0, const Eigen::Quaternion< T, QOpt > &q1, T t) |
Interpolate (slerp) between 2 quaternions. More... | |
template<typename M , typename V > | |
Eigen::Transform< typename M::Scalar, M::RowsAtCompileTime, Eigen::Isometry > | makeRigidTransform (const Eigen::MatrixBase< M > &rotation, const Eigen::MatrixBase< V > &translation) |
Create a rigid transform using the specified rotation matrix and translation. More... | |
template<typename Q , typename V > | |
Eigen::Transform< typename Q::Scalar, 3, Eigen::Isometry > | makeRigidTransform (const Eigen::QuaternionBase< Q > &rotation, const Eigen::MatrixBase< V > &translation) |
Create a rigid transform using the specified rotation quaternion and translation. More... | |
template<typename T , int VOpt> | |
Eigen::Transform< T, 3, Eigen::Isometry > | makeRigidTransform (const Eigen::Matrix< T, 3, 1, VOpt > &position, const Eigen::Matrix< T, 3, 1, VOpt > ¢er, const Eigen::Matrix< T, 3, 1, VOpt > &up) |
Make a rigid transform from a eye point a center view point and an up direction, does not check whether up is colinear with eye-center The original formula can be found at http://www.opengl.org/sdk/docs/man2/xhtml/gluLookAt.xml. More... | |
template<typename V > | |
Eigen::Transform< typename V::Scalar, V::SizeAtCompileTime, Eigen::Isometry > | makeRigidTranslation (const Eigen::MatrixBase< V > &translation) |
Create a rigid transform using the identity rotation and the specified translation. More... | |
template<typename T , int TOpt> | |
Eigen::Transform< T, 3, Eigen::Isometry > | interpolate (const Eigen::Transform< T, 3, Eigen::Isometry, TOpt > &t0, const Eigen::Transform< T, 3, Eigen::Isometry, TOpt > &t1, T t) |
Interpolate (slerp) between 2 rigid transformations. More... | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::SphereShape, SphereShape) | |
SURGSIM_STATIC_REGISTRATION (SphereShape) | |
SURGSIM_REGISTER (SurgSim::Math::Shape, SurgSim::Math::SurfaceMeshShape, SurfaceMeshShape) | |
SURGSIM_STATIC_REGISTRATION (SurfaceMeshShape) | |
template<class T > | |
void | edgeIntersection (T dStart, T dEnd, T pvStart, T pvEnd, T *parametricIntersection, size_t *parametricIntersectionIndex) |
Two ends of the triangle edge are given in terms of the following vertex properties. More... | |
bool | isValid (float value) |
Check if a float value is valid. More... | |
bool | isValid (double value) |
Check if a double value is valid. More... | |
template<typename T > | |
bool | isValid (const Eigen::DenseBase< T > &value) |
Check if a matrix or a vector is valid. More... | |
template<typename T > | |
bool | isValid (const Eigen::QuaternionBase< T > &value) |
Check if a quaternion is valid. More... | |
template<typename T > | |
bool | isValid (const Eigen::AngleAxis< T > &value) |
Check if an angle/axis 3D rotation is valid. More... | |
template<typename T > | |
bool | isValid (const Eigen::Rotation2D< T > &value) |
Check if a 2D rotation is valid. More... | |
template<typename T , int D, int M, int O> | |
bool | isValid (const Eigen::Transform< T, D, M, O > &value) |
Check if a transform is valid. More... | |
bool | isSubnormal (float value) |
Check if a float value is subnormal. More... | |
bool | isSubnormal (double value) |
Check if a double value is subnormal. More... | |
template<typename T > | |
bool | isSubnormal (const Eigen::DenseBase< T > &value) |
Check if a matrix or a vector contains any subnormal floating-point values. More... | |
template<typename T > | |
bool | isSubnormal (const Eigen::QuaternionBase< T > &value) |
Check if a quaternion contains any subnormal floating-point values. More... | |
template<typename T > | |
bool | isSubnormal (const Eigen::AngleAxis< T > &value) |
Check if an angle/axis 3D rotation contains any subnormal floating-point values. More... | |
template<typename T > | |
bool | isSubnormal (const Eigen::Rotation2D< T > &value) |
Check if a 2D rotation is described by an angle that is subnormal. More... | |
template<typename T , int D, int M, int O> | |
bool | isSubnormal (const Eigen::Transform< T, D, M, O > &value) |
Check if a transform contains any subnormal floating-point values. More... | |
bool | setSubnormalToZero (float *value) |
If the float value is subnormal, set it to zero. More... | |
bool | setSubnormalToZero (double *value) |
If the double value is subnormal, set it to zero. More... | |
template<typename T > | |
bool | setSubnormalToZero (Eigen::DenseBase< T > *value) |
Set all subnormal values in a matrix or a vector to zero. More... | |
template<typename T > | |
bool | setSubnormalToZero (Eigen::QuaternionBase< T > *value) |
Set all subnormal values in a quaternion to zero. More... | |
template<typename T > | |
bool | setSubnormalToZero (Eigen::AngleAxis< T > *value) |
Set all subnormal values in an angle/axis 3D rotation to zero. More... | |
template<typename T > | |
bool | setSubnormalToZero (Eigen::Rotation2D< T > *value) |
If the angle of a 2D rotation is subnormal, set it to zero. More... | |
template<typename T , int D, int M, int O> | |
bool | setSubnormalToZero (Eigen::Transform< T, D, M, O > *value) |
Set all subnormal values in a transform to zero. More... | |
template<class Vector , class SubVector > | |
void | addSubVector (const SubVector &subVector, size_t blockId, size_t blockSize, Vector *vector) |
Helper method to add a sub-vector into a vector, for the sake of clarity. More... | |
template<class Vector , class SubVector > | |
void | addSubVector (const SubVector &subVector, const std::vector< size_t > blockIds, size_t blockSize, Vector *vector) |
Helper method to add a sub-vector per block into a vector, for the sake of clarity. More... | |
template<class Vector , class SubVector > | |
void | setSubVector (const SubVector &subVector, size_t blockId, size_t blockSize, Vector *vector) |
Helper method to set a sub-vector into a vector, for the sake of clarity. More... | |
template<class Vector > | |
Eigen::VectorBlock< Vector > | getSubVector (Vector &vector, size_t blockId, size_t blockSize) |
Helper method to access a sub-vector from a vector, for the sake of clarity. More... | |
template<class Vector , class SubVector > | |
void | getSubVector (const Vector &vector, const std::vector< size_t > blockIds, size_t blockSize, SubVector *subVector) |
Helper method to get a sub-vector per block from a vector, for the sake of clarity. More... | |
template<typename T , int size, int TOpt> | |
Eigen::Matrix< T, size, 1, TOpt > | interpolate (const Eigen::Matrix< T, size, 1, TOpt > &previous, const Eigen::Matrix< T, size, 1, TOpt > &next, T t) |
Interpolate (slerp) between 2 vectors. More... | |
template<class T , int VOpt> | |
bool | buildOrthonormalBasis (Eigen::Matrix< T, 3, 1, VOpt > *i, Eigen::Matrix< T, 3, 1, VOpt > *j, Eigen::Matrix< T, 3, 1, VOpt > *k) |
Helper method to construct an orthonormal basis (i, j, k) given the 1st vector direction. More... | |
Variables | |
std::array< gaussQuadraturePoint, 1 > | gaussQuadrature1Point |
1-point Gauss-Legendre quadrature {<x_1, w_1>} More... | |
std::array< gaussQuadraturePoint, 2 > | gaussQuadrature2Points |
2-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>} More... | |
std::array< gaussQuadraturePoint, 3 > | gaussQuadrature3Points |
3-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>} More... | |
std::array< gaussQuadraturePoint, 4 > | gaussQuadrature4Points |
4-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>, <x_4, w_4>} More... | |
std::array< gaussQuadraturePoint, 5 > | gaussQuadrature5Points |
5-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>, <x_4, w_4>, <x_5, w_5>} More... | |
std::array< gaussQuadraturePoint, 100 > | gaussQuadrature100Points |
100-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>, ..., <x_100, w_100>} More... | |
const std::unordered_map< IntegrationScheme, std::string, std::hash< int > > | IntegrationSchemeNames |
typedef Eigen::AlignedBox<double, 3> SurgSim::Math::Aabbd |
Wrapper around the Eigen type.
typedef Eigen::AlignedBox<float, 3> SurgSim::Math::Aabbf |
Wrapper around the Eigen type.
typedef Eigen::DiagonalMatrix<double, Eigen::Dynamic> SurgSim::Math::DiagonalMatrix |
A dynamic size diagonal matrix.
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> SurgSim::Math::Matrix |
A dynamic size matrix.
typedef Eigen::Matrix<double, 2, 2, Eigen::RowMajor> SurgSim::Math::Matrix22d |
A 2x2 matrix of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<float, 2, 2, Eigen::RowMajor> SurgSim::Math::Matrix22f |
A 2x2 matrix of floats.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<double, 3, 3, Eigen::RowMajor> SurgSim::Math::Matrix33d |
A 3x3 matrix of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<float, 3, 3, Eigen::RowMajor> SurgSim::Math::Matrix33f |
A 3x3 matrix of floats.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<double, 4, 4, Eigen::RowMajor> SurgSim::Math::Matrix44d |
A 4x4 matrix of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<float, 4, 4, Eigen::RowMajor> SurgSim::Math::Matrix44f |
A 4x4 matrix of floats.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<double, 6, 6, Eigen::RowMajor> SurgSim::Math::Matrix66d |
A 6x6 matrix of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Quaternion<double> SurgSim::Math::Quaterniond |
A quaternion of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Quaternion<float> SurgSim::Math::Quaternionf |
A quaternion of floats.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Transform<double, 2, Eigen::Isometry> SurgSim::Math::RigidTransform2d |
A 2D rigid (isometric) transform, represented as doubles.
This type (and any struct that contain it) can be safely allocated via new.
typedef Eigen::Transform<float, 2, Eigen::Isometry> SurgSim::Math::RigidTransform2f |
A 2D rigid (isometric) transform, represented as floats.
This type (and any struct that contain it) can be safely allocated via new.
typedef Eigen::Transform<double, 3, Eigen::Isometry> SurgSim::Math::RigidTransform3d |
A 3D rigid (isometric) transform, represented as doubles.
This type (and any struct that contain it) can be safely allocated via new.
typedef Eigen::Transform<float, 3, Eigen::Isometry> SurgSim::Math::RigidTransform3f |
A 3D rigid (isometric) transform, represented as floats.
This type (and any struct that contain it) can be safely allocated via new.
typedef Eigen::Matrix<double, Eigen::Dynamic, 1> SurgSim::Math::Vector |
A dynamic size column vector.
typedef Eigen::Matrix<double, 2, 1> SurgSim::Math::Vector2d |
A 2D vector of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<float, 2, 1> SurgSim::Math::Vector2f |
A 2D vector of floats.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<double, 3, 1> SurgSim::Math::Vector3d |
A 3D vector of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<float, 3, 1> SurgSim::Math::Vector3f |
A 3D vector of floats.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<double, 4, 1> SurgSim::Math::Vector4d |
A 4D vector of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<float, 4, 1> SurgSim::Math::Vector4f |
A 4D vector of floats.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<double, 6, 1> SurgSim::Math::Vector6d |
A 6D matrix of doubles.
This type (and any structs that contain it) can be safely allocated via new.
typedef Eigen::Matrix<float, 6, 1> SurgSim::Math::Vector6f |
A 6D vector of floats.
This type (and any structs that contain it) can be safely allocated via new.
The diverse numerical integration scheme supported Each Ode Solver should have its own entry in this enum.
Type defining the shape direction for certain templatized shape (i.e.
CylinderShape and CapsuleShape)
Enumerator | |
---|---|
SHAPE_DIRECTION_AXIS_X | |
SHAPE_DIRECTION_AXIS_Y | |
SHAPE_DIRECTION_AXIS_Z |
Fixed List of enums for the available Shape types, do not explicitly assign values, ShapeCount is used to determine the number of actual shape types.
void SurgSim::Math::addSubMatrix | ( | const SubMatrix & | subMatrix, |
size_t | blockIdRow, | ||
size_t | blockIdCol, | ||
size_t | blockSizeRow, | ||
size_t | blockSizeCol, | ||
Matrix * | matrix | ||
) |
Helper method to add a sub-matrix into a matrix, for the sake of clarity.
Matrix | The matrix type |
SubMatrix | The sub-matrix type |
subMatrix | The sub-matrix | |
blockIdRow,blockIdCol | The block indices in matrix | |
blockSizeRow,blockSizeCol | The block size (size of the sub-matrix) | |
[out] | matrix | The matrix to add the sub-matrix into |
void SurgSim::Math::addSubMatrix | ( | const SubMatrix & | subMatrix, |
const std::vector< size_t > | blockIds, | ||
size_t | blockSize, | ||
Matrix * | matrix | ||
) |
Helper method to add a sub-matrix made of squared-blocks into a matrix, for the sake of clarity.
Matrix | The matrix type |
SubMatrix | The sub-matrix type |
subMatrix | The sub-matrix (containing all the squared-blocks) | |
blockIds | Vector of block indices (for accessing matrix) corresponding to the blocks in sub-matrix | |
blockSize | The blocks size | |
[out] | matrix | The matrix to add the sub-matrix blocks into |
void SurgSim::Math::addSubVector | ( | const SubVector & | subVector, |
size_t | blockId, | ||
size_t | blockSize, | ||
Vector * | vector | ||
) |
Helper method to add a sub-vector into a vector, for the sake of clarity.
Vector | The vector type |
SubVector | The sub-vector type |
subVector | The sub-vector | |
blockId | The block index in vector | |
blockSize | The block size | |
[out] | vector | The vector to add the sub-vector into |
void SurgSim::Math::addSubVector | ( | const SubVector & | subVector, |
const std::vector< size_t > | blockIds, | ||
size_t | blockSize, | ||
Vector * | vector | ||
) |
Helper method to add a sub-vector per block into a vector, for the sake of clarity.
Vector | The vector type |
SubVector | The sub-vector type |
subVector | The sub-vector (containing all the blocks) | |
blockIds | Vector of block indices (for accessing vector) corresponding to the blocks in sub-vector | |
blockSize | The block size | |
[out] | vector | The vector to add the sub-vector blocks into |
|
inline |
Calculate the barycentric coordinates of a point with respect to a triangle.
T | Floating point type of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pt | Vertex of the point. | |
tv0,tv1,tv2 | Vertices of the triangle in counter clockwise order in respect to the normal. | |
tn | Normal of the triangle (yes must be of norm 1 and a,b,c CCW). | |
[out] | coordinates | Barycentric coordinates. |
|
inline |
Calculate the barycentric coordinates of a point with respect to a triangle.
Please note that each time you use this call the normal of the triangle will be calculated, if you convert more than one coordinate against this triangle, precalculate the normal and use the other version of this function
T | Floating point type of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pt | Vertex of the point. | |
tv0,tv1,tv2 | Vertices of the triangle. | |
[out] | coordinates | The Barycentric coordinates. |
bool SurgSim::Math::buildOrthonormalBasis | ( | Eigen::Matrix< T, 3, 1, VOpt > * | i, |
Eigen::Matrix< T, 3, 1, VOpt > * | j, | ||
Eigen::Matrix< T, 3, 1, VOpt > * | k | ||
) |
Helper method to construct an orthonormal basis (i, j, k) given the 1st vector direction.
T | the numeric data type used for the vector argument. Can usually be deduced. |
VOpt | the option flags (alignment etc.) used for the vector argument. Can be deduced. |
[in,out] | i | Should provide the 1st direction on input. The 1st vector of the basis (i, j, k) on output. |
[out] | j,k | The 2nd and 3rd orthonormal vectors of the basis (i, j, k) |
|
inline |
Calculate the contact between two triangles.
Algorithm presented in https://docs.google.com/a/simquest.com/document/d/11ajMD7QoTVelT2_szGPpeUEY0wHKKxW1TOgMe8k5Fsc/pub. If the triangle are known to intersect, the deepest penetration of the triangles into each other is calculated. The triangle which penetrates less into the other triangle is chosen as contact.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
t0v0,t0v1,t0v2 | Vertices of the first triangle. | |
t1v0,t1v1,t1v2 | Vertices of the second triangle. | |
t0n | Unit length normal of the first triangle, should be normalized. | |
t1n | Unit length normal of the second triangle, should be normalized. | |
[out] | penetrationDepth | The depth of penetration. |
[out] | penetrationPoint0 | The contact point on triangle0 (t0v0,t0v1,t0v2). |
[out] | penetrationPoint1 | The contact point on triangle1 (t1v0,t1v1,t1v2). |
[out] | contactNormal | The contact normal that points from triangle1 to triangle0. |
|
inline |
Calculate the contact between two triangles.
Algorithm presented in https://docs.google.com/a/simquest.com/document/d/11ajMD7QoTVelT2_szGPpeUEY0wHKKxW1TOgMe8k5Fsc/pub. If the triangle are known to intersect, the deepest penetration of the triangles into each other is calculated. The triangle which penetrates less into the other triangle is chosen as contact.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
t0v0,t0v1,t0v2 | Vertices of the first triangle, should be normalized. | |
t1v0,t1v1,t1v2 | Vertices of the second triangle, should be normalized. | |
[out] | penetrationDepth | The depth of penetration. |
[out] | penetrationPoint0 | The contact point on triangle0 (t0v0,t0v1,t0v2). |
[out] | penetrationPoint1 | The contact point on triangle1 (t1v0,t1v1,t1v2). |
[out] | contactNormal | The contact normal that points from triangle1 to triangle0. |
|
inline |
Get the angle corresponding to a quaternion's rotation, in radians.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
QOpt | the option flags (alignment etc.) used for the quaternion argument. Can be deduced. |
quaternion | the rotation quaternion to inspect. |
|
inline |
Get the angle corresponding to a quaternion's rotation, in radians.
If you don't care about the rotation axis, this is more efficient than computeAngleAndAxis().
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
MOpt | the option flags (alignment etc.) used for the rotation matrix argument. Can be deduced. |
matrix | the rotation matrix to inspect. |
|
inline |
Get the angle (in radians) and axis corresponding to a quaternion's rotation.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
QOpt | the option flags (alignment etc.) used for the quaternion argument. Can be deduced. |
VOpt | the option flags (alignment etc.) used for the axis vector argument. Can be deduced. |
quaternion | the rotation quaternion to inspect. | |
[out] | angle | the angle of the rotation in [0 +pi], in radians. |
[out] | axis | the axis of the rotation. |
|
inline |
Get the angle (in radians) and axis corresponding to a rotation matrix.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
MOpt | the option flags (alignment etc.) used for the rotation matrix argument. Can be deduced. |
VOpt | the option flags (alignment etc.) used for the axis vector argument. Can be deduced. |
matrix | the rotation matrix to inspect. | |
[out] | angle | the angle of the rotation, in radians. |
[out] | axis | the axis of the rotation. |
void SurgSim::Math::computeRotationVector | ( | const Eigen::Transform< T, 3, Eigen::Isometry, TOpt > & | end, |
const Eigen::Transform< T, 3, Eigen::Isometry, TOpt > & | start, | ||
Eigen::Matrix< T, 3, 1, VOpt > * | rotationVector | ||
) |
Get the vector corresponding to the rotation between transforms.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
TOpt | the option flags (alignment etc.) used for the transform arguments. Can be deduced. |
VOpt | the option flags (alignment etc.) used for the vector argument. Can be deduced. |
end | the transform after the rotation. | |
start | the transform before the rotation. | |
[out] | rotationVector | a vector describing the rotation. |
|
inline |
Determine the distance between two lines.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
l0v0,l0v1 | Points on Line 0. | |
l1v0,l1v1 | Points on Line 1. | |
[out] | pt0 | The closest point on line 0. |
[out] | pt1 | The closest point on line 1. |
|
inline |
Calculate the normal distance between a point and a line.
pt | The input point. | |
v0,v1 | Two vertices on the line. | |
[out] | result | The point projected onto the line. |
|
inline |
Calculate the distance of a point to a plane.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pt | The point to check. | |
n | The normal of the plane n (normalized). | |
d | Constant d for the plane equation as in n.x + d = 0. | |
[out] | result | Projection of point p into the plane. |
|
inline |
Point segment distance, if the projection of the closest point is not within the segments, the closest segment point is used for the distance calculation.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pt | The input point | |
sv0,sv1 | The segment extremities. | |
[out] | result | Either the projection onto the segment or one of the 2 vertices. |
|
inline |
Calculate the normal distance of a point from a triangle, the resulting point will be on the edge of the triangle if the projection of the point is not inside the triangle.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pt | The point that is being measured. | |
tv0,tv1,tv2 | The vertices of the triangle. | |
[out] | result | The point on the triangle that is closest to pt, if the projection of pt onto the triangle. plane is not inside the triangle the closest point on the edge will be used. |
|
inline |
Calculate the distance between a segment and a plane.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
sv0,sv1 | Endpoints of the segments. | |
n | Normal of the plane n (normalized). | |
d | Constant d in n.x + d = 0. | |
[out] | closestPointSegment | Point closest to the plane, the midpoint of the segment (v0+v1)/2 is being used if the segment is parallel to the plane. If the segment actually intersects the plane segmentIntersectionPoint will be equal to planeIntersectionPoint. |
[out] | planeIntersectionPoint | the point on the plane where the line defined by the segment intersects the plane. |
T SurgSim::Math::distanceSegmentSegment | ( | const Eigen::Matrix< T, 3, 1, MOpt > & | s0v0, |
const Eigen::Matrix< T, 3, 1, MOpt > & | s0v1, | ||
const Eigen::Matrix< T, 3, 1, MOpt > & | s1v0, | ||
const Eigen::Matrix< T, 3, 1, MOpt > & | s1v1, | ||
Eigen::Matrix< T, 3, 1, MOpt > * | pt0, | ||
Eigen::Matrix< T, 3, 1, MOpt > * | pt1, | ||
T * | s0t = nullptr , |
||
T * | s1t = nullptr |
||
) |
Distance between two segments, if the project of the closest point is not on the opposing segment, the segment endpoints will be used for the distance calculation.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
s0v0,s0v1 | Segment 0 Extremities. | |
s1v0,s1v1 | Segment 1 Extremities. | |
[out] | pt0 | Closest point on segment 0 |
[out] | pt1 | Closest point on segment 1 |
[out] | s0t | Abscissa at the point of intersection on Segment 0 (s0v0 + t * (s0v1 - s0v0)). |
[out] | s1t | Abscissa at the point of intersection on Segment 0 (s1v0 + t * (s1v1 - s1v0)). |
|
inline |
Calculate the distance of a line segment to a triangle.
Note that this version will calculate the normal of the triangle, if the normal is known use the other version of this function.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
sv0,sv1 | Extremities of the line segment. | |
tv0,tv1,tv2 | Triangle points. | |
[out] | segmentPoint | Closest point on the segment. |
[out] | trianglePoint | Closest point on the triangle. |
|
inline |
Calculate the distance of a line segment to a triangle.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
sv0,sv1 | Extremities of the line segment. | |
tv0,tv1,tv2 | Points of the triangle. | |
normal | Normal of the triangle (Expected to be normalized) | |
[out] | segmentPoint | Closest point on the segment. |
[out] | trianglePoint | Closest point on the triangle. |
|
inline |
Calculate the distance of a triangle to a plane.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
tv0,tv1,tv2 | Points of the triangle. |
n | Normal of the plane n (normalized). |
d | Constant d in n.x + d = 0. |
closestPointTriangle | Closest point on the triangle, when the triangle is coplanar to the plane (tv0+tv1+tv2)/3 is used, when the triangle intersects the plane the midpoint of the intersection segment is returned. |
planeProjectionPoint | Projection of the closest point onto the plane, when the triangle intersects the plane the midpoint of the intersection segment is returned. |
|
inline |
Calculate the distance between two triangles.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
t0v0,t0v1,t0v2 | Points of the first triangle. | |
t1v0,t1v1,t1v2 | Points of the second triangle. | |
[out] | closestPoint0 | Closest point on the first triangle, unless penetrating, in which case it is the point along the edge that allows min separation. |
[out] | closestPoint1 | Closest point on the second triangle, unless penetrating, in which case it is the point along the edge that allows min separation. |
bool SurgSim::Math::doAabbIntersect | ( | const Eigen::AlignedBox< Scalar, Dim > & | aabb0, |
const Eigen::AlignedBox< Scalar, Dim > & | aabb1, | ||
double | tolerance | ||
) |
Determine whether two AABBs have an intersection with each other, for the calculation see http://www.gamasutra.com/view/feature/131790/simple_intersection_tests_for_games.php?page=3.
Scalar | numeric type |
Dim | dimension of the space to be used |
aabb0 | first axis aligned bounding box |
aabb1 | second axis aligned bounding box |
tolerance | the bounding boxes will be considered bigger by this amount |
bool SurgSim::Math::doAabbIntersect | ( | const Eigen::AlignedBox< Scalar, Dim > & | a, |
const Eigen::AlignedBox< Scalar, Dim > & | b | ||
) |
Determine whether two AABBs overlap, using a minimal set of eigen calls, does not take a tolerance.
Scalar | numeric type |
Dim | dimension of the space to be used |
a | first axis aligned bounding box |
b | second axis aligned bounding box |
|
inline |
Calculate the intersection of a line segment with a triangle See http://geomalgorithms.com/a06-_intersect-2.html#intersect_RayTriangle for the algorithm.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
sv0,sv1 | Extremities of the segment. | |
tv0,tv1,tv2 | The triangle vertices. CCW around the normal. | |
tn | The triangle normal, should be normalized. | |
[out] | result | The point where the triangle and the line segment intersect, invalid if they don't intersect. |
bool SurgSim::Math::doesIntersectBoxCapsule | ( | const Eigen::Matrix< T, 3, 1, MOpt > & | capsuleBottom, |
const Eigen::Matrix< T, 3, 1, MOpt > & | capsuleTop, | ||
const T | capsuleRadius, | ||
const Eigen::AlignedBox< T, 3 > & | box | ||
) |
Test if an axis aligned box intersects with a capsule.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
capsuleBottom | Position of the capsule bottom |
capsuleTop | Position of the capsule top |
capsuleRadius | The capsule radius |
box | Axis aligned bounding box |
|
inline |
Test if two planes are intersecting, if yes also calculate the intersection line.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pn0,pd0 | Normal and constant of the first plane, nx + d = 0. | |
pn1,pd1 | Normal and constant of the second plane, nx + d = 0. | |
[out] | pt0,pt1 | Two points on the intersection line, not valid if there is no intersection. |
|
inline |
Check if the two triangles intersect using separating axis test.
Algorithm is implemented from http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/pubs/tritri.pdf
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
t0v0,t0v1,t0v2 | Vertices of the first triangle. |
t1v0,t1v1,t1v2 | Vertices of the second triangle. |
t0n | Normal of the first triangle, should be normalized. |
t1n | Normal of the second triangle, should be normalized. |
|
inline |
Check if the two triangles intersect using separating axis test.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
t0v0,t0v1,t0v2 | Vertices of the first triangle. |
t1v0,t1v1,t1v2 | Vertices of the second triangle. |
void SurgSim::Math::edgeIntersection | ( | T | dStart, |
T | dEnd, | ||
T | pvStart, | ||
T | pvEnd, | ||
T * | parametricIntersection, | ||
size_t * | parametricIntersectionIndex | ||
) |
Two ends of the triangle edge are given in terms of the following vertex properties.
T | Accuracy of the calculation, can usually be inferred. |
dStart | Signed distance of the start of edge from the plane of the colliding triangle. |
dEnd | Signed distance of the end of edge from the plane of the colliding triangle. |
pvStart | Projection of the start of edge from the plane of the colliding triangle. |
pvEnd | Projection of the end of edge from the plane of the colliding triangle. |
parametricIntersection | Parametric representation of the intersection between the triangle edge and the plane in terms of the projection on the separating axis. |
parametricIntersectionIndex | The array index of parametricIntersection. |
|
inline |
|
inline |
Eigen::Block<Matrix> SurgSim::Math::getSubMatrix | ( | Matrix & | matrix, |
size_t | blockIdRow, | ||
size_t | blockIdCol, | ||
size_t | blockSizeRow, | ||
size_t | blockSizeCol | ||
) |
Helper method to access a sub-matrix from a matrix, for the sake of clarity.
Matrix | The matrix type to get the sub-matrix from |
matrix | The matrix to get the sub-matrix from |
blockIdRow,blockIdCol | The block indices |
blockSizeRow,blockSizeCol | The block size |
Eigen::VectorBlock<Vector> SurgSim::Math::getSubVector | ( | Vector & | vector, |
size_t | blockId, | ||
size_t | blockSize | ||
) |
Helper method to access a sub-vector from a vector, for the sake of clarity.
Vector | The vector type to get the sub-vector from |
vector | The vector to get the sub-vector from |
blockId | The block index |
blockSize | The block size |
void SurgSim::Math::getSubVector | ( | const Vector & | vector, |
const std::vector< size_t > | blockIds, | ||
size_t | blockSize, | ||
SubVector * | subVector | ||
) |
Helper method to get a sub-vector per block from a vector, for the sake of clarity.
Vector | The vector type |
SubVector | The sub-vector type |
vector | The vector (containing the blocks in a sparse manner) | |
blockIds | Vector of block indices (for accessing vector) corresponding to the blocks in vector | |
blockSize | The block size | |
[out] | subVector | The sub-vector to store the requested blocks (blockIds) from vector into |
|
inline |
Interpolate (slerp) between 2 rigid transformations.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
TOpt | the option flags (alignment etc.) used for the Transform arguments. Can be deduced. |
t0 | The start transform (at time 0.0). |
t1 | The end transform (at time 1.0). |
t | The interpolation time requested. Within [0..1]. |
|
inline |
Interpolate (slerp) between 2 quaternions.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
QOpt | the option flags (alignment etc.) used for the quaternion arguments. Can be deduced. |
q0 | The start quaternion (at time 0.0). |
q1 | The end quaternion (at time 1.0). |
t | The interpolation time requested. Within [0..1]. |
Eigen::Matrix<T, size, 1, TOpt> SurgSim::Math::interpolate | ( | const Eigen::Matrix< T, size, 1, TOpt > & | previous, |
const Eigen::Matrix< T, size, 1, TOpt > & | next, | ||
T | t | ||
) |
Interpolate (slerp) between 2 vectors.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
size | the size of the vectors. Can be deduced. |
TOpt | the option flags (alignment etc.) used for the Vector arguments. Can be deduced. |
previous | The starting vector (at time 0.0). |
next | The ending vector (at time 1.0). |
t | The interpolation time requested. Within [0..1], although note bounds are not checked. |
void SurgSim::Math::intersectionsSegmentBox | ( | const Eigen::Matrix< T, 3, 1, MOpt > & | sv0, |
const Eigen::Matrix< T, 3, 1, MOpt > & | sv1, | ||
const Eigen::AlignedBox< T, 3 > & | box, | ||
std::vector< Eigen::Matrix< T, 3, 1, MOpt > > * | intersections | ||
) |
Calculate the intersections between a line segment and an axis aligned box.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
sv0,sv1 | Extremities of the line segment. | |
box | Axis aligned bounding box | |
[out] | intersections | The points of intersection between the segment and the box |
|
inline |
Check whether the points are coplanar.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
a,b,c,d | Points to check for coplanarity. |
|
inline |
Check if a point is inside a triangle.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pt | Vertex of the point. |
tv0,tv1,tv2 | Vertices of the triangle, must be in CCW. |
tn | Normal of the triangle (yes must be of norm 1 and a,b,c CCW). |
|
inline |
Check if a point is inside a triangle.
T | Accuracy of the calculation, can usually be inferred. |
MOpt | Eigen Matrix options, can usually be inferred. |
pt | Vertex of the point. |
tv0,tv1,tv2 | Vertices of the triangle, must be in CCW. |
|
inline |
Check if a float
value is subnormal.
Subnormal values have absolute values in the range std::numeric_limits<float>::denorm_min() <= x < std::numeric_limits<float>::min()
, and can result in very slow floating point calculations under some conditions.
value | the value to check. |
|
inline |
Check if a double
value is subnormal.
Subnormal values have absolute values in the range std::numeric_limits<double>::denorm_min() <= x < std::numeric_limits<double>::min()
, and can result in very slow floating point calculations under some conditions.
value | the value to check. |
|
inline |
Check if a matrix or a vector contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the matrix or vector. Can usually be deduced. |
value | the matrix or vector value to check. |
|
inline |
Check if a quaternion contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the quaternion. Can usually be deduced. |
value | the quaternion value to check. |
|
inline |
Check if an angle/axis 3D rotation contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the rotation value to check. |
|
inline |
Check if a 2D rotation is described by an angle that is subnormal.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the 2D rotation value to check. |
|
inline |
Check if a transform contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the transform. Can usually be deduced. |
D | the dimension used to describe the transform. Can usually be deduced. |
M | the mode value used to describe the transform. Can usually be deduced. |
O | the options value used to describe the transform. Can usually be deduced. |
value | the transform value to check. |
|
inline |
Check if a float
value is valid.
Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
value | the value to check. |
|
inline |
Check if a double
value is valid.
Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
value | the value to check. |
|
inline |
Check if a matrix or a vector is valid.
These quantities are valid if all of their elements are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the base type used to describe the matrix or vector. Can usually be deduced. |
value | the matrix or vector value to check. |
|
inline |
Check if a quaternion is valid.
Quaternions are valid if all of their components are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the base type used to describe the quaternion. Can usually be deduced. |
value | the quaternion value to check. |
|
inline |
Check if an angle/axis 3D rotation is valid.
Angle/axis rotations are valid if the angle and the axis components are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the rotation value to check. |
|
inline |
Check if a 2D rotation is valid.
2D rotations are valid if the rotation angle is valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the rotation value to check. |
|
inline |
Check if a transform is valid.
Transforms are valid if all of their components are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the scalar type used to describe the transform. Can usually be deduced. |
D | the dimension used to describe the transform. Can usually be deduced. |
M | the mode value used to describe the transform. Can usually be deduced. |
O | the options value used to describe the transform. Can usually be deduced. |
value | the transform value to check. |
Eigen::AlignedBox<Scalar, Dim> SurgSim::Math::makeAabb | ( | const Eigen::Matrix< Scalar, Dim, 1, MType > & | vector0, |
const Eigen::Matrix< Scalar, Dim, 1, MType > & | vector1, | ||
const Eigen::Matrix< Scalar, Dim, 1, MType > & | vector2 | ||
) |
Convenience function for creating a bounding box from three vertices (e.g.
the vertices of a triangle)
Scalar | numeric type |
Dim | dimension of the space to be used |
MType | the eigen type of the vectors |
|
inline |
Create a rigid transform using the specified rotation matrix and translation.
M | the type used to describe the rotation matrix. Can usually be deduced. |
V | the type used to describe the translation vector. Can usually be deduced. |
rotation | the rotation matrix. |
translation | the translation vector. |
|
inline |
Create a rigid transform using the specified rotation quaternion and translation.
Q | the type used to describe the rotation quaternion. Can usually be deduced. |
V | the type used to describe the translation vector. Can usually be deduced. |
rotation | the rotation quaternion. |
translation | the translation vector. |
|
inline |
Make a rigid transform from a eye point a center view point and an up direction, does not check whether up is colinear with eye-center The original formula can be found at http://www.opengl.org/sdk/docs/man2/xhtml/gluLookAt.xml.
typename | T T the numeric data type used for arguments and the return value. Can usually be deduced. |
int | VOpt VOpt the option flags (alignment etc.) used for the axis vector argument. Can be deduced. |
position | The position of the object. |
center | The point to which the object should point. |
up | The up vector to be used for this calculation. |
|
inline |
Create a rigid transform using the identity rotation and the specified translation.
V | the type used to describe the translation vector. Can usually be deduced. |
translation | the translation vector. |
|
inline |
Create a rotation matrix corresponding to the specified angle (in radians) and axis.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
VOpt | the option flags (alignment etc.) used for the axis vector argument. Can be deduced. |
angle | the angle of the rotation, in radians. |
axis | the axis of the rotation. |
|
inline |
Create a quaternion rotation corresponding to the specified angle (in radians) and axis.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
VOpt | the option flags (alignment etc.) used for the axis vector argument. Can be deduced. |
angle | the angle of the rotation, in radians. |
axis | the axis of the rotation. |
|
inline |
Create a skew-symmetric matrix corresponding to the specified vector.
Skew-symmetric matrices are particularly useful for representing a portion of the vector cross-product.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
VOpt | the option flags (alignment etc.) used for the vector argument. Can be deduced. |
vector | the vector to be transformed. |
|
inline |
Quaternion negation (i.e.
unary operator -)
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
QOpt | the option flags (alignment etc.) used for the quaternion arguments. Can be deduced. |
q | The quaternion to negate |
void SurgSim::Math::setSubMatrix | ( | const SubMatrix & | subMatrix, |
size_t | blockIdRow, | ||
size_t | blockIdCol, | ||
size_t | blockSizeRow, | ||
size_t | blockSizeCol, | ||
Matrix * | matrix | ||
) |
Helper method to set a sub-matrix into a matrix, for the sake of clarity.
Matrix | The matrix type |
SubMatrix | The sub-matrix type |
subMatrix | The sub-matrix | |
blockIdRow,blockIdCol | The block indices for row and column in matrix | |
blockSizeRow,blockSizeCol | The size of the sub-matrix | |
[out] | matrix | The matrix to set the sub-matrix into |
|
inline |
If the float
value is subnormal, set it to zero.
Subnormal values have absolute values in the range std::numeric_limits<float>::denorm_min() <= x < std::numeric_limits<float>::min()
, and can result in very slow floating point calculations under some conditions.
[in,out] | value | the value to check and possibly modify. |
|
inline |
If the double
value is subnormal, set it to zero.
Subnormal values have absolute values in the range std::numeric_limits<double>::denorm_min() <= x < std::numeric_limits<double>::min()
, and can result in very slow floating point calculations under some conditions.
[in,out] | value | the value to check and possibly modify. |
|
inline |
Set all subnormal values in a matrix or a vector to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the matrix or vector. Can usually be deduced. |
[in,out] | value | the matrix or vector value to check and possibly modify. |
|
inline |
Set all subnormal values in a quaternion to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the quaternion. Can usually be deduced. |
[in,out] | value | the quaternion value to check and possibly modify. |
|
inline |
Set all subnormal values in an angle/axis 3D rotation to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
[in,out] | value | the rotation value to check and possibly modify. |
|
inline |
If the angle of a 2D rotation is subnormal, set it to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
[in,out] | value | the rotation value to check and possibly modify. |
|
inline |
Set all subnormal values in a transform to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the transform. Can usually be deduced. |
[in,out] | value | the transform value to check and possibly modify. |
void SurgSim::Math::setSubVector | ( | const SubVector & | subVector, |
size_t | blockId, | ||
size_t | blockSize, | ||
Vector * | vector | ||
) |
Helper method to set a sub-vector into a vector, for the sake of clarity.
Vector | The vector type |
SubVector | The sub-vector type |
subVector | The sub-vector | |
blockId | The block index in vector | |
blockSize | The size of the sub-vector | |
[out] | vector | The vector to set the sub-vector into |
|
inline |
Extract the unique vector from the skew-symmetric part of a given matrix.
T | the numeric data type used for arguments and the return value. Can usually be deduced. |
MOpt | the option flags (alignment etc.) used for the matrix argument. Can be deduced. |
matrix | the matrix to compute the skew symmetric part from. |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::BoxShape | , | ||
BoxShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::CapsuleShape | , | ||
CapsuleShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::PlaneShape | , | ||
PlaneShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::SphereShape | , | ||
SphereShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::CylinderShape | , | ||
CylinderShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::DoubleSidedPlaneShape | , | ||
DoubleSidedPlaneShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::OctreeShape | , | ||
OctreeShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::MeshShape | , | ||
MeshShape | |||
) |
SurgSim::Math::SURGSIM_REGISTER | ( | SurgSim::Math::Shape | , |
SurgSim::Math::SurfaceMeshShape | , | ||
SurfaceMeshShape | |||
) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | PlaneShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | CylinderShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | DoubleSidedPlaneShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | SphereShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | CapsuleShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | SurfaceMeshShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | BoxShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | OctreeShape | ) |
SurgSim::Math::SURGSIM_STATIC_REGISTRATION | ( | MeshShape | ) |
std::array< gaussQuadraturePoint, 100 > SurgSim::Math::gaussQuadrature100Points |
100-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>, ..., <x_100, w_100>}
std::array< gaussQuadraturePoint, 1 > SurgSim::Math::gaussQuadrature1Point |
1-point Gauss-Legendre quadrature {<x_1, w_1>}
std::array< gaussQuadraturePoint, 2 > SurgSim::Math::gaussQuadrature2Points |
2-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>}
std::array< gaussQuadraturePoint, 3 > SurgSim::Math::gaussQuadrature3Points |
3-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>}
std::array< gaussQuadraturePoint, 4 > SurgSim::Math::gaussQuadrature4Points |
4-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>, <x_4, w_4>}
std::array< gaussQuadraturePoint, 5 > SurgSim::Math::gaussQuadrature5Points |
5-points Gauss-Legendre quadrature {<x_1, w_1>, <x_2, w_2>, <x_3, w_3>, <x_4, w_4>, <x_5, w_5>}
const std::unordered_map<IntegrationScheme, std::string, std::hash<int> > SurgSim::Math::IntegrationSchemeNames |