示例#1
0
 /// <summary>
 /// Transforms the given axis by the object's orientation.
 /// </summary>
 /// <param name="axis">Axis to transform.</param>
 /// <returns>The transformed axis.</returns>
 private Vector3 TransformVector(Vector3 axis)
 {
     return(QuaternionMath.TransformVectorByOrientation(axis, _orientation));
 }
示例#2
0
 /// <summary>
 /// Rotate the object around the given axis.
 /// </summary>
 /// <param name="angle">Angle to rotate by.</param>
 /// <param name="axis">Axis to rotate around.</param>
 private void Rotate(float angle, Vector3 axis)
 {
     _orientation = QuaternionMath.RotateAxis(angle, axis, _orientation);
 }