M_Rhino_Geometry_Quaternion_Rotate - mcneel/rhinocommon-api-docs GitHub Wiki

Quaternion.Rotate Method

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.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public Vector3d Rotate(
	Vector3d v
)

VB

Public Function Rotate ( 
	v As Vector3d
) As Vector3d

Parameters

 

v
Type: Rhino.Geometry.Vector3d
The vector to be rotated.

Return Value

Type: Vector3d
Rv, 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.

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Quaternion Structure
Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️