glOrtho

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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值