POV-Ray : Newsgroups : povray.general : Question About Macros : Re: Question About Macros Server Time
11 Aug 2024 05:16:45 EDT (-0400)
  Re: Question About Macros  
From: Andrea Ryan
Date: 14 Oct 1999 17:17:47
Message: <38064770.80BF732B@global2000.net>
Thanks. In one of my block macros, I cut the number of parameters from six
to two.
Brendan Ryan

Andrea Ryan wrote:

> That won't work if the object needs to be translated different distances
> along different axies.
> Brendan Ryan
>
> Peter Popov wrote:
>
> > On Wed, 13 Oct 1999 21:33:56 -0400, Andrea Ryan <ary### [at] global2000net>
> > wrote:
> >
> > >    Is it a good idea to include transformations in macros like:
> > <code>
> > >or let others add object statements and transformations?
> > >Brendan Ryan
> >
> > You should take advantage of the dot "." operator. For example:
> >
> > #macro Foo (Trans, Rot, Scale) // These are all vectors
> >   #local TransZ = Trans.z;
> >   ...
> > #end
> >
> > This way you'll pass the macro three times less parameters.
> >
> > Peter Popov
> > ICQ: 15002700


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.