Frame Functions¶
Functions to compute coordinate frames.
-
template<class
T
>
Matrix44<T> constexprImath
::
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
andpk
. Note that if the two vectors <pi
,pj
> and <pi
,pk
> are colinears, an arbitrary twist value will be choosen.Throw
std::domain_error
ifpi
andpj
are equal.- Parameters
pi
: First pointpj
: Second pointpk
: Third point
-
template<class
T
>
Matrix44<T> constexprImath
::
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 matrixpi
: The previous pointpj
: The current pointti
: The previous tangent vectortj
: The current tangent vector
-
template<class
T
>
Matrix44<T> constexprImath
::
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 matrixpi
: The previous pointpj
: The last point