Click or drag to resize

IMcViewNDRotation Property

Sets/gets camera rotation quaternion.

Namespace:  MediaCy.IQL.Display.ViewerND
Assembly:  MediaCy.IQL.Display.ViewerND (in MediaCy.IQL.Display.ViewerND.dll) Version: 10.0.6912.0
Syntax
VB
Property Rotation As Object
	Get
	Set

Property Value

Type: Object
Remarks
Rotation is defined as rotation quaternion (w,x,y,z) in form of an array of 4 double values. The default quaternion is set to 1,0,0,0. Rotation can also be changed interactively by <Left Mouse Click>-<drag>.
Examples
VB
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
See Also