|
![](/i/fill.gif) |
"wyleu" <nomail@nomail> wrote:
> My questions are therefore.
>
> How do I specify that an particular object or group of objects returns the
> appropriate variables?
>
> and,
>
> How are variable from a POV-RAY command line render returned to a calling
> programme?
>
> I have search on Google fro min_extent, max_extent and POV-RAY but can't find
> anything that aren't restatements of the FAQ.
The documentation for min_extent and max_extent provide simple examples for
their use here:
http://www.povray.org/documentation/view/3.6.1/229/
In your case, it would probably be something more like:
#declare MyText =
text
{
ttf // font type (only TrueType format for now)
"cour.ttf", // Microsoft Windows-format TrueType font file name
"Hello World", // the string to create
.25, // the extrusion depth
0 // inter-character spacing
scale 2
}
#declare TextMin = min_extent( MyText );
#declare TextMax = max_extent( MyText );
#declare TextSize = TextMax - TextMin;
object
{
MyText
translate -TextSize / 2 // center object according to bounding box
}
As for returning values, this can be done if commands are specified in the ini
file, documentation here:
http://www.povray.org/documentation/view/3.6.1/221/
From what you've described, it sounds like you want variables from within the
scene returned to the calling program. From my understanding, this cannot be
done directly, but can still be accomplished by using the file I/O directives
( http://www.povray.org/documentation/view/3.6.1/238/ ) to write the scene
variables to a file, then use a post scene command to call the program with
that file (or, alternatively, when POV-ray returns after exiting, that
program can open the text file that POV has written).
HTH
-Reactor
Post a reply to this message
|
![](/i/fill.gif) |