PDA

View Full Version : screen extrems of the geometry projected on the screen



iris_raj
02-28-2007, 09:28 AM
Dear opengl Programmers,

Is it possible to find a bounding rectangle(minimum and maximum extreams) of an object projected on the screen. The minimum and maximum extreams have to be in pixels(screen coordinates).
Thanks in advance
RAJESH.R

Flavious
02-28-2007, 05:04 PM
It is possible!

One way is to iterate over the projected vertices and min/max them (see gluProject). But it really depends on how accurate a bound you need. Sometimes projecting a bounding box or a sphere is enough.

Cheers