Return to previous page | Return to menu | Go to next page


void
Matrix function

slRotAX

Rotate around any axis through the origin

Format

void slRotAX(vctx , vcty , vctz , anga)
FIXED vctx ;
FIXED vcty ;
FIXED vctz ;
ANGLE anga ;

Parameter

vctx Rotation axis vector X component
vcty Rotation axis vector Y component
vctz Rotation axis vector Z component
anga rotation angle value

Function

Add rotation around an arbitrary axis that passes through the origin.
Be sure to specify the rotation axis vector that determines the rotation axis as a unit vector.
The rotation matrix is ​​represented as shown below.

Return value

None

Remarks

The following figure shows a rotation matrix for rotating around an arbitrary axis.

Note) Nx, Ny and Nz are XYZ components of the rotation axis vector.
S and C are Sin and Cos into which the angle value “anga” is substituted.

Reference: Chapter 4 Coordinate transformation

slRotAX


Return to previous page | Return to menu | Go to next page