|
|
On Thu, 6 Jul 2000 22:24:08 +0200, Marc-Hendrik Bremer wrote:
>You could achieve this with the megapov-keywords min_extend and max_extend,
>if I get this right. How accurate are the bounding boxes of the 'primitive'
>pov-primitives like spheres, boxes, cones, cylinders? Is the object
>'centered' in there. I know this is not a accurate term, 'course where is
>the center? What I mean is: would min_extend.x and max_extend.x return -1
>and 1 for a sphere{0,1}, a box{-1,1}, a cone {<-1,0,0>,1,<1,0,0>,2}?
The keywords are min_extent and max_extent (t, not d.) I wrote the
implementation, so I should know.
They're generally pretty accurate for simple primitives, and in the four
cases you mentioned the object is centered in there. If you have rotated
the objects, the bounding box gets larger rather than rotating, so there's
likely to be some space for them to rattle around in the box.
CSG objects are likely to overbound, and some objects are just plain
unbounded (poly springs to mind.) I think it's probably better to just
know what you want the center of the object to be and keep it in mind while
you're designing it, then do any scales or rotations before translating
it to the final location. If you find it easier to work in terms of
local or global transforms, (e.g. you want to rotate the table after you
translate it where you need it) then use the macros I posted in that other
thread. (Remember to read the followup; it fixes an error.)
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|