Class MatInterpolationKit
Provides functionality for interpolating between two transformation matrices.
public class MatInterpolationKit
- Inheritance
-
MatInterpolationKit
- Inherited Members
- Extension Methods
Remarks
A shell over the native mechmotionmat_interpolation_kit_t (core.dll,
mat_interpolation__* in Hi.Motion.NativeMotion): the kit is built once by the
constructor into a caller-owned struct and every interpolation is computed natively from it.
Constructors
MatInterpolationKit(mat4d_t, mat4d_t)
Initializes a new instance of the MatInterpolationKit class with two matrices.
public MatInterpolationKit(mat4d_t m0, mat4d_t m1)
Parameters
Properties
Mat0
Gets the first matrix.
public mat4d_t Mat0 { get; }
Property Value
Mat1
Gets the second matrix.
public mat4d_t Mat1 { get; }
Property Value
RotationAxisAngle
Gets the rotation axis and angle between the two matrices.
public AxisAngle4d RotationAxisAngle { get; }
Property Value
Trans
Gets the translation vector between the two matrices.
public vec3d_t Trans { get; }
Property Value
Methods
GetInterpolation(double)
Gets the pose alpha of the way from Mat0 to Mat1:
the rotation alpha · RotationAxisAngle applied to
Mat0 (the shortest rotation between the two, in equal steps), the position
linear between the two.
public mat4d_t GetInterpolation(double alpha)
Parameters
alphadoubleThe interpolation factor between 0 and 1.
Returns
- mat4d_t
The interpolated matrix.