PDA

View Full Version : How to determine the render volume?



jrbcast
11-26-2001, 08:57 AM
Hi

I want to draw a cube containing all the objects in my scene. How can I determine the bounds for it?.

Of course it must be as small as posible :-)

Thanks

Rob The Bloke
11-26-2001, 09:24 AM
run through each vertex, store the maximum x,y & z you find as well as the minimum values. You then have two points representing the volume in which all primitives are contined.

Add them both together and divide by two to get the centre.....