Documentation 6b54b78464
Loading...
Searching...
No Matches
GeometryToolbox Namespace Reference

Functions

template<class T , class U , typename Int >
T SquaredDistance (Int nDim, const T *a, const U *b)
 
template<class T , class U , typename Int >
T Distance (Int nDim, const T *a, const U *b)
 
template<class T , typename Int >
void Distance (Int nDim, const T *a, const T *b, T *d)
 d = a-b
 
template<class T , typename Int >
void PointPointReflect (Int nDim, const T *a, const T *b, T *d)
 Reflect a at b: c = 2*b - a.
 
template<class T , typename Int >
T DotProduct (Int nDim, const T *a, const T *b)
 
template<class T , typename Int >
T SquaredNorm (Int nDim, const T *a)
 
template<class T , typename Int >
T Norm (Int nDim, const T *a)
 
template<class T , typename Int >
T NormalDistance (Int nDim, const T *n, const T *a, const T *b)
 dn = max(abs(n.(a-b)), 0.05 * ||a-b||
 
template<class T >
void CrossProduct (const T *a, const T *b, T *c)
 c = a x b
 
template<class T , int nDim>
T LinePlaneIntersection (const T *l0, const T *d, const T *p0, const T *n, T *c)
 Compute the coordinate (c) where the line defined by coordinate l0 and direction d intersects the plane defined by point p0 and normal n.
 
template<class T , int nDim>
T PointPlaneProjection (const T *p1, const T *p0, const T *n, T *c)
 Compute the coordinate (c) where point p1 intersects the plane defined by point p0 and normal n if projected perpendicular to it.
 
template<class T , class U >
void LineNormal (const T &coords, U *normal)
 Set U as the normal to a 2D line defined by coords[iPoint][iDim].
 
template<class T , class U >
void TriangleNormal (const T &coords, U *normal)
 Normal vector of a triangle, cross product of two sides.
 
template<class T , class U >
void QuadrilateralNormal (const T &coords, U *normal)
 Normal vector of a quadrilateral, cross product of the two diagonals.
 
template<class T , class U >
U PointToPlaneDistance (const T &coords, const U *point)
 Signed distance from a point to a plane defined by 3 coordinates.
 
template<class Scalar , class Matrix >
void RotationMatrix (Scalar theta, Scalar phi, Scalar psi, Matrix &mat)
 Compute a 3D rotation matrix.
 
template<class Scalar , class Matrix >
void RotationMatrix (Scalar psi, Matrix &mat)
 Compute a 2D rotation matrix.
 
template<class Scalar , int nDim>
void Rotate (const Scalar R[][nDim], const Scalar *O, const Scalar *d, Scalar *c)
 Apply a rotation matrix (R) about origin (O) to a point at distance (d) from it to obtain new coordinate (c).
 
template<class Scalar >
bool HasRotation (const Scalar *angles)
 
template<class Scalar , int nDim>
void RotateBox (const Scalar R[][nDim], Scalar *vMin, Scalar *vMax)
 Rotate component bounds in place, enclosing the rotated box.
 
template<class Mat , class Scalar , class Int >
void TangentProjection (Int nDim, const Mat &tensor, const Scalar *vector, Scalar *proj)
 Tangent projection