IMcViewNDRotation Property |
![]() |
Namespace: MediaCy.IQL.Display.ViewerND
With McViewND1 Dim i As Long, angle, X, Y, Z, W, sin_a, cos_a Dim RotationAxis(2) As Double 'rotaton axis X,Y,Z 'rotate around Y axis RotationAxis(0) = 0 RotationAxis(1) = 1 RotationAxis(2) = 0 'rotate object arond Y axis from 0 to 360 degrees For i = 0 To 360 'convert to radians angle = (3.14 * (i + 90) / 180) sin_a = Sin(angle / 2) cos_a = Cos(angle / 2) 'convert to quaternion X = RotationAxis(0) * sin_a Y = RotationAxis(1) * sin_a Z = RotationAxis(2) * sin_a W = cos_a 'set rotation .Rotation = Array(W, X, Y, Z) DoEvents Next i End With