5.49. Rotation (transformation)

<transformation geometry="rotation"> ‐ A rotation transformation

5.49.1. Attributes

NameTypeDefaults
idIDNone (required)
xFLOAT0.0
yFLOAT0.0
zFLOAT0.0
angleFLOAT0.0
matrixFLOAT MATRIXNone (read-only)

5.49.2. Description

This element defines a 3D rotation about an axis.

The float values of the x, y, and z attributes define the coordinates of the rotation axis vector. This vector and the origin of the coordinates define the rotation axis. The float value of the angle attribute define the angle of the rotation.

The value of the read-only attribute matrix is a 4x4 float matrix that represents the current curve transformation.

5.49.3. Expected child

None.

5.49.4. Example

In the example below, the viewpoint viewpoint#1 rotates -70 degrees about the y-axis.

<node id = "rot viewpoint">
  <transformation id="transf1"
      geometry="rotation" x="0.0" y="1.0" z="0.0" angle="-70.0" />
  <node id = "viewpoint">
     <viewpoint id="viewpoint#1" /> 
  </node>
</node>