Description:

Rotates a 3d vector. This operation is also called conjugation, because the result is the same as (q.Conjugate()*(0,x,y,x)*q/q.LengthSquared).Vector.

Syntax:
public Vector3d Rotate(
Vector3d v
)
Parameters:
  • v
  • Type: Vector3d
  • The vector to be rotated.
Returns:
Type: Vector3d
R*v, where R is the rotation defined by the unit quaternion. This is mathematically the same as the values (Inverse(q)*(0,x,y,z)*q).Vector and (q.Conjugate()*(0,x,y,x)*q/q.LengthSquared).Vector.
Remarks:
If you need to rotate more than a dozen or so vectors, it will be more efficient to calculate the rotation matrix once and use it repeatedly.
Available since:
5.0

Nothing found