|
![](/i/fill.gif) |
> Fine, but doing it in another step after parsing coan make it impossible
to
> effectively use bboxes during parsing (in trace(), in patches with
pigments
> delivering rendering of other parts of the scene).
The best way to handle this is probably to:
- keep track of the object's transformation
- during parsing, when the bounding box is called for (it can be made into
a function call or something for parsing-related functions), compute it from
the current transformation. Remember it in case it is needed again before
the object is transformed again, but once the object has been transformed,
throw away the current bounding box. (And set a flag that it needs to be
recomputed.) Note that the "base" bounding box will have to be stored
separately or recalculated each time the true bounding box is recalculated.
- after parsing, calculate the final bounding box (from the base bounding
box with the final transformation).
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
![](/i/fill.gif) |