public void SetWorldAxes(Matrix3x3 matrix)
{
if (Math.Abs(Vector3.Dot(matrix.Backward, matrix.Right)) > Toolbox.BigEpsilon ||
Math.Abs(Vector3.Dot(matrix.Backward, matrix.Up)) > Toolbox.BigEpsilon ||
Math.Abs(Vector3.Dot(matrix.Right, matrix.Up)) > Toolbox.BigEpsilon)
throw new ArgumentException("The axes provided to the joint transform do not form an orthonormal basis. Ensure that each axis is perpendicular to the other two.");
primaryAxis = Vector3.Normalize(matrix.Backward);
xAxis = Vector3.Normalize(matrix.Right);
yAxis = Vector3.Normalize(matrix.Up);
Matrix3x3.TransformTranspose(ref this.primaryAxis, ref rotationMatrix, out localPrimaryAxis);
Matrix3x3.TransformTranspose(ref this.xAxis, ref rotationMatrix, out localXAxis);
Matrix3x3.TransformTranspose(ref this.yAxis, ref rotationMatrix, out localYAxis);
}