|
|
Hi nemesis,
I'm writing a macro of the form
areaLight(_Colour,_Size,_subPanels,_Lights,_Transform)
that creates a visible light panel with the required characteristics.
I've actually figured out a generic work around given a declared transform.
Using vtransform from 'transforms.inc' you can split the translate out as
follows:
#local _Translate = vtransform(x*0,_Transform);
transform {_Transform translate -_Translate}
translate _Translate
So I can finish writing the macro now :-)
Bye for now,
Mike Andrews.
"nemesis" <nam### [at] gmailcom> wrote:
> "Mike Andrews" <nomail@nomail> wrote:
> > Can anyone think of a work around or is it a show-stopper for what I was trying
> > to achieve?
>
> If your intention is to have something like:
>
> #declare tr1 = transform {rotate -90*x translate <0,2,0>}
>
> light_source { foo transform { tr1 } }
>
> Then you can accomplish the same by using a macro rather than a declare:
>
> #macro tr1() rotate -90*x translate <0,2,0> #end
>
> light_source { foo tr1() }
>
> It's even shorter and reuses previous values just like in a declare. :)
>
> Of course, a general matrix transform won't work while the bug isn't
> corrected...
Post a reply to this message
|
|