|
![](/i/fill.gif) |
On 5 Jun 2003 10:21:53 -0400, Warp <war### [at] tag povray org> wrote:
> > The scene which
> > uses macro with 'transform' (tomtreet.inc) renders 6-7 times faster.
>
> You don't mean it parses 6-7 times faster?
When you apply transform to CGS each scale, translate, rotate etc. cause
separate calculation of transformation matrix and applying it to all children of
this object. So if you have union of 100 objects, and you rotate and then scale
this union it cause 202 calls to Transform_Object (for each child + parent). If
you enclose scale and rotate within transform{} it is first parsed into one
matrix within Parse_Objects_Mods and 101 calls to Transform_Object is executed.
The difference is not small and increases with number of transformations.
ABX
Post a reply to this message
|
![](/i/fill.gif) |