POV-Ray : Newsgroups : povray.programming : Re: Reading the values of a object-parameter : Re: Reading the values of a object-parameter Server Time
20 Dec 2025 08:23:24 EST (-0500)
  Re: Reading the values of a object-parameter  
From: Christopher James Huff
Date: 31 Aug 2003 16:15:31
Message: <cjameshuff-4131C6.16153131082003@netplex.aussie.org>
In article <3f50b482$1@news.povray.org>, Oliver Jaxid <mai### [at] finniqcom> 
wrote:

> >> so, any idea to wright the function with only 1 box-parameter?
> > 
> > have a look at the min_extent & max_extent functions.
> > 
> 
> thx, that was it!

Well, you've already been corrected about the group, so I'll just answer 
your question: this does not do what you asked for. The *_extent() 
functions return the extents of the object along each coordinate axis. 
If you rotate or shear the box, this will no longer correspond to the 
corners, and it is useless for most other objects.

To make this message at least somewhat on-topic for this group: Patching 
POV to allow these attributes to be accessed would be difficult, because 
they are not always stored in the form they are specified in. For many 
objects, POV calculates additional information based on the object 
parameters, and may throw away the original parameters entirely. Not 
impossible, but to do it right would require a lot of code rewriting. 
Objects could be parsed into an intermediate form which is then 
reprocessed into the data structure used for rendering, requiring code 
to be written for every single object, and a rewrite of all object 
parsing code.

Anyway, with the example you gave and keeping to plain-vanilla official 
POV-Ray, the best thing to do is to just create the box inside the macro 
instead of doing it outside and passing it and its corners...you have 
not provided enough information for me to tell if this even makes sense 
in your situation. Your syntax was completely wrong, maybe you don't 
know about the macro feature.

#macro myInvBox(ptA, ptB, Tex)
    box {ptA, ptB texture {Tex}}
    ...
#end

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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