[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

rot Subroutine

Purpose

Rotates graphical primitives (floating-point version).

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void rot(Float 32 angle, Char8 axis)

FORTRAN Syntax

SUBROUTINE ROT(angle, axis) 
REAL angle
CHARACTER*1 axis

Description

The rot subroutine specifies an angle (angle) and an axis of rotation (axis). The floating point angle is given in degrees according to the right-hand rule.

The rot subroutine is a modeling routine; it changes the current transformation matrix. All objects drawn after the rot subroutine executes are rotated. Use the pushmatrix and popmatrix subroutines to preserve and restore unrotated modeling coordinates.

Parameters

angle Specifies the angle of rotation of an object.
axis Specifies the relative axis of rotation. There are three values defined for this parameter (the character may be upper- or lowercase):
x, X indicates the x-axis.
y, Y indicates the y-axis.
z, Z indicates the z-axis.

Example

The example C language program cylinder1.c uses the rot subroutine to rotate a cylinder about the y- and z-axes.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Popping the transformation matrix stack with the popmatrix subroutine.

Pushing down the transformation matrix stack with the pushmatrix subroutine.

Rotating a graphical primitive (fixed-point version) with the rotate subroutine.

Scaling and mirroring objects with the scale subroutine.

Translating a graphical primitive with the translate subroutine.

AIX Graphics Library Overview and Working with Coordinate Systems.


[ Previous | Next | Contents | Glossary | Home | Search ]