View Full Version : Getting View Frustumīs Planes in OpenGl????
For things like View Frustum clipping I need the Plane Equations(or their normals) of the View Pyramid.I could calculate them from the Rotation matrix and the angle of view but to do this I need alot of sines + cosines which slows down things alot if one calculates them (the Planes) every frame.
I think Opengl knows these planes(īcause it does (slow) clipping ,too.
So please tell me if it is possible to get these Planes from Opengl and if so ,how does it work????
04-18-2000, 02:56 PM
If you want a (kind of) fast method to get a fast sine & cosine value of an given radian, you should look into the thread:
"Getting normal vectors"
Hope that helped you!
And msy the vector by with you!
Thanx,that might help if would calculate my planes myself.
But,I DONT want to calculate it myself,I want to get these Planes from OpenGl!!
So if somebody has some ideas PLEASE POST them even if they are wrong.īcause I want to continue programming.
[This message has been edited by XBCT (edited 04-19-2000).]
04-19-2000, 07:46 AM
Depending on how your frustrum is set up you may only have to calculate 1 of the normals using your sine/cosine method. The other sides of you frustrum (assuming you don't change the frustrum should be predicably different and you would only have to figure out how they're diffrent from the "master side" of the frustrum once with some precomputed geometry.
One way to avoid any of this sine/cosine stuff would be to make a single triangle just outside your frustrum with a normal defined. If you keep it in the same location in relation to your frustrum it should always provide a normal to you frustrum. Although this method also has the over head of a triangle.
I don't know how or if it's possible to get these planes directly from OpenGL, but these would be a few ways to speed up a work around solution.
It looks like I have to calculate things myself(thanx for all the speed improvement tips).
BUT:IF someone knows how to get the View Frustumīs Planes from Opengl,PLEASE PLEASE tell me!!!!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.