NAME
rot_frame rotate_frame - create unit to rotate object(s)
PROTOTYPES
unitptr rot_frame(float angle, char axis, unitptr host)
unitptr rotate_frame( float angle, char axis, unitptr host)
ARGUMENTS
- float angle
- rotation angle (in degrees for rotate_frame, in radians for rot_frame)
- char axis
- axis of rotation (one of 'X','Y','Z' for positive x,y or z-axis, one of 'x','y','z' for negativ x,y or z-axis)
- unitptr host
- host unit for newly created instance
RETURN VALUE:
- unitptr u:
- pointer to newly created unit
INTERFACE OF CREATED UNIT:
- X_in[1]:
- (input field 0) additive offset to
rotation angle (in degrees for
rotate_frame, in radians for rot_frame).
DESCRIPTION:
Creates a unit execution of which rotates the coordinate
frame used for rendering objects by an angle angle+X_in[0].
(the exec-routine of this unit is the GL-rotate-routine).
As a result, all objects rendered after a (single) execution
of this unit will appear rotated by an angle angle
+X_in[0].
Note that rotations and translations effected by subsequent
execution of rotate_frame and translate_frame -units will
refer to the new, i.e. rotated coordinate frame. The only
difference between the two routines is that rot_frame
expects the angle to be specified in radians, while
rotate_frame uses degrees.
EXAMPLES:
The program logo.c illustrates the use of the rotate_frame-
unit.
FILE
/local/homes/rhaschke/nst7/man/../o.linx86//../foldersrc/nst_solid.c