POV-Ray : Newsgroups : povray.unofficial.patches : Inverse Transformations patch : Re: Inverse Transformations patch Server Time
2 Sep 2024 06:18:39 EDT (-0400)
  Re: Inverse Transformations patch  
From: Chris Huff
Date: 25 Apr 2000 07:42:48
Message: <chrishuff_99-07B9FB.06454725042000@news.povray.org>
In article <390581e3@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   I think that this patch is not of very much use if we can't get the
> transformations from an object. You seldom define the transformations of
> an object separately.
>   How about a function to get the transformations applied to an object?
> Something like:
> 
> #declare Trans = transformations(MyObject)
> 
> object
> { MyObject
>   transform { Trans inverse }
> }
> 
>   This would create an instance of MyObject without transformations.
> 
>   Of course there's a problem: What if MyObject is a CSG with nested
> transformations?

I would really prefer the dot operator instead, it is shorter by 1 
character and a lot more flexible(it doesn't have the problems with CSG 
transforms).
#declare Trans = transform {transformations(MyObject)}
#declare Trans = transform {MyObject.transformations}
#declare Trans = transform {MyObject.SubObject.transformations}

However, I don't know how easy this would be...it would have to use the 
label feature, and there is probably already code that can be adapted to 
do the job in MegaPOV. The same thing would be useful for textures and 
interior.
This patch is still useful in some cases, though. We could implement 
functions to access those variables as a stop-gap measure, but I don't 
think that is a good idea...people would begin to use them, and they 
would have to be removed later.
I will check out the label code, and see if I can do anything about it.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.