Contents /
Previous /
Next
Scale
void glScale{fd}(TYPE x, TYPE y, TYPE z )
Multiplies the current matrix by a matrix that stretches, shrinks, or
reflects an object along the axes.
Each x, y, and z coordinate of every point
in the object is multiplied by the corresponding argument x, y, or z.
With the
local coordinate system approach, the local coordinate axes are stretched,
shrunk, or reflected by the x, y, and z factors, and the associated object is
transformed with them.
The Figure shows the effect of glScalef(2.0, -0.5, 1.0).
The call glScale*(x, y, z) generates S, where:
Notice that S-1 is defined only if x, y, and z are all nonzero.