|
![](/i/fill.gif) |
Chris Huff <chr### [at] yahoo com> writes:
> In article <38ce5f44@news.povray.org>, "Philippe Debar"
> <phi### [at] hotmail com> wrote:
>
> > A workaround : make your object a macro like #macro
> > myObject(currentTransform).
> >
> > I hope this helps,
>
> Yes, that is possible, and I often do my objects this way so I can
> incorporate other randomized elements for a little more realism. But a
> way to translate an object and not it's texture, some kind of flag for
> the transform {} blocks, would still be useful sometimes. It would
> require you to use the transform {} block to enclose your
> transformations, but this might be a good idea anyway...and it would
> only be for a few small cases that you would want to do this.
IMHO it would be more "clean" to introduce a way to invert a transformation.
As far as I know, the inverse matrix is already calculated internally.
(The struct TRANSFORM has the two members "matrix" and "inverse".)
So, the implementation should be easy.
Then you would get the desired effect like this:
#declare Trans = transform { translate .. rotate .... }
#declare InvTrans = transform { invert_transform Trans }
object { ... texture { ... transform{InvTrans} } transform {Trans} }
Just my 0.02 Euro
Thomas
--
http://thomas.willhalm.de/ (includes pgp key)
Post a reply to this message
|
![](/i/fill.gif) |