gluPerspective
2015-08-04 10:52
309 查看
Name
gluPerspective — set up a perspective projection matrixC Specification
void gluPerspective( | GLdouble fovy, |
GLdouble aspect, | |
GLdouble zNear, | |
GLdouble zFar); |
Parameters
fovy
Specifies the field of view angle, in degrees, in the y direction.
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).
zNear
Specifies the distance from the viewer to the near clipping plane (always positive).
zFar
Specifies the distance from the viewer to the far clipping plane (always positive).
Description
gluPerspectivespecifies a viewing frustum into the world coordinate system. In general, the aspect ratio in
gluPerspectiveshould 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.
The matrix generated by
gluPerspectiveis multipled by the current matrix, just as if glMultMatrix were called with the generated matrix. To load the perspective matrix onto the current matrix stack instead, precede the call to
gluPerspectivewith a call to glLoadIdentity.
Given f defined as follows:
f=cotangentfovy2
The generated matrix is
faspect0000f0000zFar+zNearzNear-zFar2×zFar×zNearzNear-zFar00-10
相关文章推荐
- HDU5324 cqd分治
- 关于部署问题
- 浮点数在计算机中存储方式
- 南邮 OJ 1090 Rock, Paper, Scissors
- crontab 定时任务没有执行
- java动态数组
- Bloodsucker
- quick-cocos2d-x数据存储之GameState
- svn配置启动方式
- IO流
- 列表属性list-style-type、图像符号list-style-image、列表缩进list-style-position
- 如何从本地把项目上传到github
- vim粘贴代码时缩进混乱
- android手机出现sqlite3 not found的解决方法
- 类加载机制详解(有条理)
- Bootstrap中的Carousel插件的图片滚动时间间隔的设置
- Https协议相关
- 计算机程序模型
- POJ 2253 Frogger 最短路
- 配置文件解析方法总结