public SetLocalAxes ( Matrix3x3 matrix ) : void | ||
matrix | Matrix3x3 | Rotation matrix representing the three axes. /// The matrix's backward vector is used as the primary axis. /// The matrix's right vector is used as the x axis. |
Résultat | void |
public void SetLocalAxes(Matrix3x3 matrix)
{
if (Math.Abs(Vector3.Dot(matrix.Backward, matrix.Right)) > Toolbox.BigEpsilon)
throw new ArgumentException("The axes provided to the joint transform are not perpendicular. Ensure that the specified axes form a valid constraint.");
localPrimaryAxis = Vector3.Normalize(matrix.Backward);
localXAxis = Vector3.Normalize(matrix.Right);
ComputeWorldSpaceAxes();
}
JointBasis2D::SetLocalAxes ( Vector3 primaryAxis, Vector3 xAxis ) : void | |
JointBasis2D::SetLocalAxes ( Vector3 primaryAxis, Vector3 xAxis, Matrix3x3 rotationMatrix ) : void |