Frustum vertex extraction

C3e4dac0186a6a2f6b05d272fded2d6f
0
Asshen 101 Nov 10, 2003 at 20:41

Q1:
How do I extract the 8 vertices of a frustum ?
I can calculate the 6 planes, and I have the result in frustum[6][4]…
But how do I now extract the 8 frustum verts from that ???

Q2:
Is there any opengl extension that extracts the frustum ?

Thank you.

6 Replies

Please log in or register to post a reply.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Nov 11, 2003 at 01:34

gluUnproject (or similar) could help.. just throw in the 8 signed-unit-cube coords..

then again, thats just a blind guess..

you could as well search for a point intersection_of(plane a,plane b,plane c) code, and just intersect all combinations of planes for the points..

C3e4dac0186a6a2f6b05d272fded2d6f
0
Asshen 101 Nov 11, 2003 at 16:15

gluUnproject is too slow for getting the frustum.
I’m currently using the frustum plane extraction code by Mark Morley.

But this only gives me 6 planes.
But I also need the 8 verts for my project :(

I heard that there is an opengl extension for extracting the frustum?
Maybe that one could help me ?

Anyway, if you could direct me to a 3x plane intersection code example, that would get me on my way :)

Thanks.
K.

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Nov 11, 2003 at 17:55

http://mathworld.wolfram.com/

always a good starting point if you have mathprobs

never heard of such an extension… http://oss.sgi.com/projects/ogl-sample/registry/

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Nov 11, 2003 at 19:28

gluUnproject is not slow to get called 8 times. not that its the most efficient way. but something that gets called 8 times per frame never hurts.. i call very expensive functions 100000 times per frame and have smooth fps..

get it working.
get it save working.
get it fast working.

first: get it WORKING

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Nov 11, 2003 at 19:51

something is wrong with the posting screen, anway…
hehe, just the coding paradigm we talked about :)

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Nov 11, 2003 at 20:49

whats wrong with it? i don’t see anything..

yes. always the same:D