POV-Ray : Newsgroups : povray.general : Question About Macros : Re: Question About Macros Server Time
10 Aug 2024 23:25:58 EDT (-0400)
  Re: Question About Macros  
From: Larry Fontaine
Date: 14 Oct 1999 16:50:18
Message: <3806423F.21C3FD7E@isd.net>
I was going to say this yesterday but my connection problems were even
worse than usual.
Yes, vectors are extremely useful macro parameters. I would just like to
point out that in this specific case the dot operator is not needed at
all, though yes, it is very useful at cutting down parameters when
individual components are needed. I ran out of parameters on my tree
macro, using vectors, so now I'm even passing it arrays!
#macro Foo(Trans)
translate Trans
#end

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.