• 1.摘要
  • 2.基本信息
  • 3.介绍
  • 4.说明

gluPerspective

gluPerspective这个函数指定了观察的视景体(frustum为锥台的意思,通常译为视景体)在世界坐标系中的具体大小,一般而言,其中的参数aspect应该与窗口的宽高比大小相同。比如说,aspect=2.0表示在观察者的角度中物体的宽度是高度的两倍,在视口中宽度也是高度的两倍,这样显示出的物体才不会被扭曲。

基本信息

  • 外文名

    gluPerspective

  • 类型

    函数

  • 优点

    显示出的物体不会被扭曲

  • 函数名称

    NAME

介绍

gluPerspective

NAME(函数名称)

gluPerspective -- set up a perspective projection matrix (设置透视投影矩阵)

C SPECIFICATION(C语言实现示例)

void gluPerspective(

GLdouble fovy, //角度

GLdouble aspect,//视景体的宽高比

GLdouble zNear,//沿z轴方向的两裁面之间的距离的近处

GLdouble zFar //沿z轴方向的两裁面之间的距离的远处

)

PARAMETERS(参数含义)

fovy

Specifies the field of view angle, in degrees, in the y direction.

指定视景体的视野的角度,以度数为单位,y轴的上下方向

aspect

Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).

指定你的视景体的宽高比(x 平面上)

zNear