Brief Index      Full Index      Events Index      I.M. Reference

Rotate_Object


Functions

void Rotate_Object (double theta, double phi, double psi)
void DRotate_Object (double theta, double phi, double psi)

Function Documentation

void Rotate_Object ( double  theta,
double  phi,
double  psi 
)

Moves the represented object about its X-, Y-, or Z-axis.

Parameters:
theta - Angle, in degrees, to rotate about the X-axis.
phi - Angle to rotate about the Y-axis
psi - Angle to rotate about the Z-axis

DETAILS

Rotate_Object() is a modelling transformation---it should be thought of as changing the position of the object you have created. If you want to look at your scene as if it were being rotated, the better choice i s Orbit_Camera() , possibly in combination with Roll_Camera() .

If more than one degree of rotation is requested, the effect is of theta being performed first, then phi , then psi.

All rotations in HOOPS, no matter whether "camera" or "object", are performed by default using a left-hand rule. A positive rotation is represented by the di rection curved fingers of the left hand are pointing when the thumb points in th e positive direction along the axis in question, i.e., counter-clockwise. A nega tive rotation angle goes the other way. This definition can be reversed with the "Handedness" attribute.

The mathematical transform that is supplied to Append_Modelling_Matrix(), if you have any use for it, is:

rotate.gif

NOTES

The system doesn't labor over a general concatenation of all those matrices.

RESTRICTIONS

See also:
Rotate_Object_Offaxis, Translate_Object, Scale_Object, Append_Modelling_Matrix, Set_Modelling_Matrix, Set_Handedness, Orbit_Camera, Roll_Camera.

void DRotate_Object ( double  theta,
double  phi,
double  psi 
)

Similar to Rotate_Object(), but operates on double-precision data.

Parameters:
theta - Angle, in degrees, to rotate about the X-axis.
phi - Angle to rotate about the Y-axis
psi - Angle to rotate about the Z-axis

Brief Index      Full Index      Events Index      I.M. Reference