perspective(3G)perspective(3G)NAMEperspective - defines a perspective projection transformation
C SPECIFICATION
void perspective(fovy, aspect, near, far)
Angle fovy;
float aspect;
Coord near, far;
PARAMETERS
fovy expects the field-of-view angle in the y direction. The field
of view is the range of the area that is being viewed. fovy
must be > 2 or an error results.
aspect expects the aspect ratio which determines the field of view in
the x direction. The aspect ratio is the ratio of x (width) to
y (height).
near expects the distance from the viewer to the closest clipping
plane (always positive).
far expects the distance from the viewer to the farthest clipping
plane (always positive).
DESCRIPTIONperspective specifies a viewing pyramid into the world coordinate system.
In general, the aspect ratio in perspective should match the aspect ratio
of the associated viewport. For example, aspect=2.0 means the viewer's
angle of view is twice as wide in x as it is in y. If the viewport is
twice as wide as it is tall, it displays the image without distortion.
When the system is in single matrix mode, perspective loads a matrix onto
the transformation stack, replacing the current top matrix. When the
system is in viewing, projection, or texture matrix mode, perspective
replaces the current Projection matrix and leaves the ModelView matrix
stack and the Texture matrix unchanged.
SEE ALSO
mmode, ortho, viewport, window
Page 1