ABX wrote:
>
>I would suggest to change Parse_Object_Mods in parse.cpp to cause above lines
>to be executed as in
>
>transform{
> rotate z*45
> rotate z*-45
>}
>
>(Storing transformations in Local_Matrix and applying then on exit from
>Parse_Object_Mods or if some object modifier needs bounding box to be
>specified)
>
>ABX
>
That's not the worst of the problem... Even if there were only one
transformation eg.
intersection { sphere{...} sphere{...} rotate z*45 }
the final bounding box might not be the tightest, because it assumes that
the rotated spheres are bounded like rotated boxes. Of course the rotated
sphere is bounded tighter than a rotated box.
The only way to fix this is to compute all the bounding boxes from the
bottom up after all the transformations have been parsed and applied.
Andrew
Post a reply to this message
|