PDA

View Full Version : gluPerspective() question



06-26-2001, 05:38 AM
How do I know what the size of my viewing volume is after using gluPerspective() to create my viewing volume?

MrShoe
06-26-2001, 04:31 PM
The very first value you pass to gluPerspective is the angle of the viewing frustrum. From there you can work out the volume...

john
06-26-2001, 07:39 PM
... and you can compute the volume from the projection matrix alone.

Any point that maps to +/-1 x/y and 0..1 z is visible. You just need to exploit these constraints by fittings planes through the set of points on the boundary.

cheers,
John