Rotate
Inherits from: Transform
Overview
This class represents an Affine object that rotates coordinates around an anchor point. This operation is equivalent to translating the coordinates so that the anchor point is at the origin (S1), then rotating them about the new origin (S2), and finally translating so that the intermediate origin is restored to the coordinates of the original anchor point (S3). For example, the matrix representing the returned transform of Rotate { angle: theta pivotX: x pivotY: y pivotZ: z } is :
[ cos(theta) -sin(theta) 0 x-x*cos+y*sin ]
[ sin(theta) cos(theta) 0 y-x*sin-y*cos ]
[ 0 0 1 z ]
Profile: common
Constants Summary
| name | type | description |
|---|---|---|
| X_AXIS | Point3D |
Specifies the X-axis as the axis of rotation. |
| Y_AXIS | Point3D |
Specifies the Y-axis as the axis of rotation. |
| Z_AXIS | Point3D |
Specifies the Z-axis as the axis of rotation. |
Variable Summary
| name | type | Default Value | description |
|---|---|---|---|
| angle | Number | 0.0 |
Defines the angle of rotation measured in degrees. |
| pivotX | Number | 0.0 |
Defines the X coordinate of the rotation pivot point. |
| pivotY | Number | 0.0 |
Defines the Y coordinate of the rotation pivot point. |
| pivotZ | Number | 0.0 |
Defines the Z coordinate of the rotation pivot point. |
| axis | Point3D | Rotate.Z_AXIS |
Defines the axis of rotation at the pivot point. |
