|
![](/i/fill.gif) |
Where can I find information on these temple include files? I want default values.
Brendan Ryan
Remco de Korte wrote:
> Andrea Ryan wrote:
> >
> > Is it a good idea to include transformations in macros like:
> >
> > #macro MakeBall (translatex, translatey, translatez, scalex, scaley,
> > scalez, radius)
> > sphere { <translatex, translatey, translatez>,radius
> > scale <scalex, scaley, scalez>
> > texture {...}
> > }
> > #end
> >
> > or let others add object statements and transformations?
> > Brendan Ryan
>
> There's a limit to the amount of parameters a macro can handle (I soon found
> out).
> It's also not easier to work with a macro that only needs a few essential
> parameters.
> For instance, if a macro just declares an object you can easily scale, rotate or
> translate it outside that macro by including it in an object statement, leaving
> the essentials to the actual macro-declaration. To turn things round: you can
> add the most redundant parameters to a macro and it will still work (in the
> example of the object-macro you could add parameters declaring ground_fog,
> sky_sphere etc. - of course these might also be meaningful to the macro).
>
> If you _need_ a lot of parameters it's also an idea to pass those in an
> include-file.
> You could use a template-include with default values... eeh... oh well, this is
> not what you asked, never mind.
>
> Remco
Post a reply to this message
|
![](/i/fill.gif) |