Johannes Dahlstrom <sad### [at] tkukoulu fi> wrote:
> You could use an integer to represent the value you want to vary, like this:
>
> #declare VaryAmbient = 1;
> #declare VaryDiffuse = 2;
> #declare VarySpecular = 3;
>
> #declare WhichValueToVary = VaryAmbient;
>
> #declare Variable = ... // Vary this
>
> // ...
> finish {
> ambient (WhichValueToVary == VaryAmbient) ? Variable : 0.1;
> diffuse (WhichValueToVary == VaryDiffuse) ? Variable : 0.6;
> specular (WhichValueToVary == VarySpecular) ? Variable : 1.0;
> }
> // ...
Thanks Johannes. I haven't come across this construction, and can't find
it in the manual. Can you give me a hint as to where I can find more
information on this?
--
Kaveh
Post a reply to this message
|