View Full Version : View-Plane Coordinates in World Co-ordinate System
03-19-2002, 05:25 PM
OK. I know how to get the coordinate of each corner of the view plane in the View co-ordinate system
But how do i get the 4 points in the World Co-ordinate System?
Anyone have clue?
I assume you mean you can get the viewport using glGetIntegerv(GL_VIEWPORT,vp) but want these points in world coords.
Use the glUnproject funtion.To find how it works read the manual page or even better the red book(the chapter about transformations).It can be found online,just do a search on google(www.google.com).
BTW if you want to do frustum culling you'll have to find the plane equations.A search on google will surely give you some links to tutorial on how to do that(both culling and extraction).Also try to use the beginner's forum for simple questions next time.Hope that helped.
03-19-2002, 07:33 PM
Zen, thanks for the reply. Ill certainly check for a drustum culling program.
GluUnproject projects a pixel to a world co-ordinate i think, so its not really what I need. I want the actual image-plane co-ordinates (4 points) in World space.
Check the book again: what Zen said is correct.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.