|
|
kurtz le pirate <kur### [at] yahoofr> wrote:
> hi,
>
> i am trying to make a macro with one of parameters is "normal" like this
> #macro foo(.., .., thisNormal, ..)
> ...
> normal { thisNormal }
> ...
> #end
>
> ok, works fine... but in some cases i don't want normal.
> how can i pass a "no-normal" or "empty-normal" parameters ?
>
> any ideas ?
>
> thanks.
If you prefer your own code (with thisNormal as a non-global declared
variable), you can use it like this, too:
camera {location <0,0,-4> look_at <0,0,0>}
light_source{<0,3,-10> rgb 1}
#macro foo (thisNormal)
cylinder {-1,1,0.5
texture {
pigment {color rgb <1,1,1>}
normal {thisNormal}
}
}
#end
foo(normal {function {0}})
object {foo(normal {marble 2 turbulence 0.5}) rotate -y*90}
object {foo(normal {marble 2 turbulence 0.5}) rotate y*135}
// function {0} means "no normal"
Post a reply to this message
|
|