|
|
clipka <ano### [at] anonymousorg> wrote:
>
> The first thing to note is that whenever you transform an object,
> obviously the bounding box needs to be adjusted accordingly.
>
> This is generally implemented in a pretty braindead manner: The bounding
> box is re-computed from scratch.
>
> Normally this does not interfere with custom bounding boxes, because
> those are applied only at the closing brace of the object statement,
> when all your transformations are done already.
>
I'm wondering about the implications of this during SDL coding--the ordering of
terms. If I'm understanding this correctly, is the placement of the bounded_by
object actually important? (The docs are silent on this issue, except for a
single example with no in-depth explanation.)
In other words: Which of these two constructions is the 'better' one re:
bounded_by? (I haven't checked the math, BTW; these are just dumb examples)
difference{
sphere{0,1}
sphere{0,1 translate 1*x}
bounded_by{sphere{0,2.1 translate 1*x}} // placed *prior to* translate/rotate
translate <3,6,9>
rotate 35*y
}
OR...
difference{
sphere{0,1}
sphere{0,1 translate 1*x}
translate <3,6,9>
rotate 35*y
bounded_by{sphere{0,2.1 translate 1*x}} // *after* all the transformations
}
The first example is usually the way I do it--it just seems more 'intuitive' to
transform the difference *along with* the bounding object. But is that really
correct? Or does the ordering of terms matter at all?
Post a reply to this message
|
|