rotate
Rotates the target by the specified angle in degrees around the Z-axis.
Usage example:
// rotate around the point at (100.0, 100.0)
drawer.translate(100.0, 100.0)
drawer.rotate(45.0)
drawer.translate(-100.0, -100.0)Content copied to clipboard
Parameters
rotationInDegrees
The angle in degrees by which to rotate.
target
The target object to apply the rotation to. Defaults to TransformTarget.MODEL.
fun rotate(axis: Vector3, rotationInDegrees: Double, target: TransformTarget = TransformTarget.MODEL)(source)
Rotates a transformation using the specified axis and angle in degrees, applying the rotation to the given transformation target.
Parameters
axis
the axis of rotation represented as a 3D vector.
rotationInDegrees
the angle of rotation in degrees.
target
the transformation target to which the rotation is applied; defaults to TransformTarget.MODEL.