glOrtho
NAME
函数名
glOrtho -- multiply the current matrix by an
orthographic matrix
用正交矩阵乘以当前矩阵
C SPECIFICATION
C风格
void glOrtho(GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble near,
GLdouble far)
PARAMETERS
参数
left, right
左,右
Specify the coordinates for the left and right
vertical clipping planes.
为左右垂直裁剪平面指定正交矩阵。
bottom, top
底,顶
Specify the coordinates for the bottom and top
horizontal clipping planes.
为底和顶的水平裁剪面指定正交矩阵。
near, far
近,远
Specify the distances to the nearer and farther
depth clipping planes.
指定深度裁剪平面的远近距离。
These distances are negative if the plane is to be
behind the viewer.
如果平面在观察点的下面,则距离是负的。
DESCRIPTION
描述
glOrtho describes a matrix that produces a
parallel projection.
glOrtho描述了一个平行透视的矩阵
(left, bottom, -near) and (right, top, -near)
specify the points on the near clipping plane that
are mapped to the lower left and upper right
corners of the window, respectively, assuming that
the eye is located at (0, 0, 0).
假定视点在(0,0,0),(左,底,近)和(右,顶,近
)指定了外侧的平面上的点,这两个点各自映射窗口的左
下和右上角。
-far specifies the location of the far clipping
plane. Both near and far can be either positive or
negative.
-far制定了远处的平面位置。近平面和远平面可以各自为
正为负。
The current matrix is multiplied by this matrix
with the result replacing the current matrix.
当前矩阵跟它的正交矩阵相乘的结果会取代当前的矩阵
That is, if M is the current matrix and O is the
ortho matrix, then M is replaced with M*O.
也就是说,如果M是当前的矩阵,0是它的正交矩阵,那么M
会被M*0取代。
Use glPushMatrix and glPopMatrix to save and
restore the current matrix stack.
使用glPushMatrix和glPopMatrix来压弹当前的矩阵栈。
ERRORS
GL_INVALID_OPERATION is generated if glOrtho is
called between a call to glBegin and the
corresponding call to glEnd.
ASSOCIATED GETS
glGet with argument GL_MATRIX_MODE
glGet with argument GL_MODELVIEW_MATRIX
glGet with argument GL_PROJECTION_MATRIX
glGet with argument GL_TEXTURE_MATRIX
SEE ALSO
glFrustum, glMatrixMode, glMultMatrix,
glPushMatrix, glViewport