English 中文(简体)
如何在 OpenGL 上取得投射平面
原标题:How to get the projection plane in OpenGL

我用 GluPerspective 和 glLookAt 来设置我的投影矩阵和查看矩阵。 如果我想获得眼睛的坐标, 它就是 GluLookAt 前三个参数, 对不对?

但是,现在我需要得到投影飞机,也就是屏幕在世界坐标系统中的位置。你知道, 如果我能计算到左下角角点和右上角点, 飞机就在那里!

有人能告诉我怎么计算吗?

最佳回答

您可以使用带屏幕空间坐标的 gluun Project (映射视图宽度和高度为 0.. 1) A = (0,0,0,0, B = 1,0) 和 C = 1,0) 来显示投影平面的共平面点。 添加第四点(1,1,0) 时, 您可以得到矩形限制 。

问题回答

暂无回答




相关问题
OpenGL 3D Selection

I am trying to create a 3D robot that should perform certain actions when certain body parts are clicked. I have successfully (sort of) implemented picking in that if you click on any x-plane part, it ...

CVDisplayLink instead of NSTimer

I have started to implement cvDisplayLink to drive the render loop instead of nstimer, as detailed in this technical note https://developer.apple.com/library/archive/qa/qa1385/_index.html Is it ...

Can the iPhone simulator handle PVR textures?

I have a really weird problem with PVR textures on the iPhone simulator- the framerate falls through the floor on the iPhone simulator, but on the iPhone itself it works just fine. Has anyone had any ...

Calculate fps (frames per second) for iphone app

I am using an opengl es iphone application. What is the most accurate way to calculate the frames per second of my application for performance tuning?

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I d like to be able to do some prototyping of creating new types of interfaces for navigating within data and ...

FLTK in Cygwin using Eclipse (Linking errors)

I have this assignment due that requires the usage of FLTK. The code is given to us and it should compile straight off of the bat, but I am having linking errors and do not know which other libraries ...

热门标签