|
|
In article <43ef3706$1@news.povray.org>,
"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "kurtz le pirate" <kur### [at] yahoofr> wrote in message
> news:kurtzlepirate-D923AB.09321512022006@news.povray.org...
> > 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.
>
> Hi Kurtz,
>
> I don't know how to do exactly what you ask. Just in case no-one else does
> either, here's a work-around.
> Forgive me if it's just dodging the question, or if it's describing
> something that's already obvious to you.
>
> Regards,
> Chris B.
>
> camera {location <0,0,-4> look_at <0,0,0>}
> light_source{<0,3,-10> rgb 1}
> #macro foo ()
> cylinder {-1,1,0.5
> texture {
> pigment {color rgb <1,1,1>}
> #ifdef (thisNormal) normal {thisNormal} #end
> }
> }
> #end
>
> #declare thisNormal = normal {agate};
> foo()
> #undef thisNormal
> object {foo() rotate -y*90}
> #declare thisNormal = normal {marble 2 turbulence 0.5};
> object {foo() rotate y*135}
thanks chris. my english is not very good :))
but you help me. in fact, normal{} must be global's declared and not a
parameter for the macro and, with #ifdef and #undef i can make want i
want.
thanks too
Post a reply to this message
|
|