Frame Functions

Functions to compute coordinate frames.

template<class T>
Matrix44<T> constexpr Imath::firstFrame(const Vec3<T> &pi, const Vec3<T> &pj, const Vec3<T> &pk)

Compute the first reference frame along a curve.

This function returns the transformation matrix to the reference frame defined by the three points pi, pj and pk. Note that if the two vectors <pi,pj> and <pi,pk> are colinears, an arbitrary twist value will be choosen.

Throw std::domain_error if pi and pj are equal.

Parameters
  • pi: First point
  • pj: Second point
  • pk: Third point

template<class T>
Matrix44<T> constexpr Imath::nextFrame(const Matrix44<T> &Mi, const Vec3<T> &pi, const Vec3<T> &pj, Vec3<T> &ti, Vec3<T> &tj)

Compute the next reference frame along a curve.

This function returns the transformation matrix to the next reference frame defined by the previously computed transformation matrix and the new point and tangent vector along the curve.

Parameters
  • Mi: The previous matrix
  • pi: The previous point
  • pj: The current point
  • ti: The previous tangent vector
  • tj: The current tangent vector

template<class T>
Matrix44<T> constexpr Imath::lastFrame(const Matrix44<T> &Mi, const Vec3<T> &pi, const Vec3<T> &pj)

Compute the last reference frame along a curve.

This function returns the transformation matrix to the last reference frame defined by the previously computed transformation matrix and the last point along the curve.

Parameters
  • Mi: The previous matrix
  • pi: The previous point
  • pj: The last point