Ogre屏幕坐标的几种方式
来源:互联网 发布:php微信开发 编辑:程序博客网 时间:2024/04/29 08:47
在使用Camera::getCameraToViewportBoxVolume (Real screenLeft,Real screenTop, Real screenRight, Real screenBottom, boolincludeFarPlane=false)时,不清楚这几个值到底该怎么设置呢?跟我用的屏幕坐标mousePoint(x,y)有什么不一样呢?接 下来总结一下。
常见的Ogre中的屏幕坐标有以下三种方式:
1. 屏幕绝对坐标系。
度量为像素。如左上角为(0,0), 右下角为(800, 600).这些值分别表示在屏幕宽度和高度上的像素位置。经常也表示为2D的数据,分别表示x方向和y方向。
2. 屏幕相对坐标系。
左下角为(-1,-1),右上角为(1,1),Rectangle2D::setCorners(Real left, Real top,Real right, Real bottom,bool updateAABB = true )用的就是就这个坐标系。 其中left:Left position in screen relative coordinates, -1 = left edge, 1.0 =right edge。top :Top positionin screen relative coordinates, 1 = top edge, -1 = bottom edge。right: Right position in screen relativecoordinates。bottom :Bottomposition in screen relative coordinates。
3. 屏幕单位化绝对坐标系。
左上角为(0,0),右下角为(1,1),Camera::getCameraToViewportBoxVolume (Real screenLeft, RealscreenTop, Real screenRight, Real screenBottom, bool includeFarPlane=false)就是用的这个坐标系。 screenLeft,screenTop,screenRight,screenBottom The bounds of theon-screen rectangle, expressed in normalised screen coordinates [0,1]。
由此,1,3之间 是可以相互转化的。不过要首先获取到屏幕的宽度和高度,可以在绝对坐标系和单位话绝对坐标系之间游刃有余了。
- Ogre屏幕坐标的几种方式
- ogre 世界坐标、本地坐标、屏幕坐标之间的转换
- OGRE的2D坐标、CEGUI坐标、鼠标坐标、 世界坐标转屏幕坐标
- OGRE的2D坐标、CEGUI坐标、鼠标坐标、 世界坐标转屏幕坐标
- OGRE中OIS与CEGUI的屏幕坐标转换
- OGRE中OIS与CEGUI的屏幕坐标转换
- OGRE中OIS与CEGUI的屏幕坐标转换
- OGRE屏幕坐标转世界坐标
- OGRE屏幕坐标转世界坐标
- 几种获取屏幕大小的方式。
- ogre世界坐标与屏幕坐标相互转换
- Android中保持屏幕常亮的几种方式
- Activity 横竖屏幕切换的几种实现方式
- iOS屏幕适配的几种方式
- Android 获取屏幕宽高的几种方式
- 屏幕坐标,鼠标坐标,屏幕宽度等取值方式
- OGRE的2D坐标、CEGUI坐标、鼠标坐标
- OGRE的2D坐标、CEGUI坐标、鼠标坐标
- 正则表达式判断号码靓号类型
- 如何做到iphone数据恢复
- OnLButtonDown
- vc++与MySql
- MongoDB---登陆认证
- Ogre屏幕坐标的几种方式
- UVA 270 共线
- Android菜单
- c语言可变参数va_list,va_start用法与分析
- Pin~动态插装原理
- SQLServer:查询所有外键关联表信息
- ASP中使用method="post"的表单
- POJ3468(线段树区间更新)
- ogre 选取包围盒的两种方式