glFrustum()和gluPerspective()详解
来源:互联网 发布:js日期格式化yyyymmdd 编辑:程序博客网 时间:2024/06/05 16:36
1、void glFrustum(GLdouble left,GLdouble Right,GLdouble bottom,GLdouble top,GLdouble zNear,GLdouble zFar);
left,right 表示近平面左右两边相对于垂直平面的位置
bottom,top 表示近平面顶和底相对于水平面的位置
zNear和zFar是表示视点到远近投影平面的距离
2、gluPerspective(GLdouble fovy,GLdouble aspect,GLdouble zNear,GLdouble zFar);
fovy是视角的大小,以度为单位; aspect = w/h 是视景体的宽高比
gluPerspective函数是对glFrustum函数的一种简单封装,那么gluPerspective的参数如何转化为glFrustum的参数呢?
void MyPerspective (GLdouble fovy,GLdouble aspect,GLdouble zNear,GLdouble zFar){ GLdouble dbFov = fovy*M_PI/180.0; GLdouble dbTan = tan(dbFov/2); glFrustum(-zNear*dbTan*aspect,zNear*dbTan*aspect, -zNear*dbTan,zNear*dbTan,zNear,zFar);}
参照博客:
http://www.linuxidc.com/Linux/2014-03/98825.htm
http://www.2cto.com/kf/201504/389187.html
0 0
- glFrustum()和gluPerspective()详解
- 区分glFrustum和gluPerspective
- 区分glFrustum和gluPerspective
- gluperspective和glFrustum函数的比较
- 透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法.
- OpenGL中glFrustum()和gluPerspective()的相互转换
- 透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法
- OpenGL中glFrustum()和gluPerspective()的相互转换
- OpenGL中gluPerspective函数和glFrustum函数的关系
- 透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法.
- 透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法.
- 透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法.
- 透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法.
- glFrustum(),glOrtho(),gluPerspective()的实例
- OpenGL 入门纪录--2 .透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法
- OpenGL 入门纪录--透视函数glFrustum(), gluPerspective()函数用法和glOrtho()函数用法
- glOrtho,glFrustum,gluPerspective的理解,很清楚
- OpenGL的gluLookAt和gluPerspective详解
- 225. Implement Stack using Queues
- Vector Math for 3D Computer Graphics
- Ubuntu 下安装Composer
- table tennis超级麻烦的大模拟题
- ZCMU—1892
- glFrustum()和gluPerspective()详解
- JSON
- js正则验证手机号
- DataBinding 学习系列(5)细节上的概念强化和扩展
- [BZOJ3697][[FJ2014集训]采药人的路径][点分治]
- css vertical-align属性
- c++访问webservice(gsoap简单使用)
- PAT 1100
- Application Installation Failed 解决办法