|
![](/i/fill.gif) |
In article <3dbc1972@news.povray.org>,
"Thorsten Froehlich" <tho### [at] trf de> wrote:
> No, where would they be? The G functions i know are apparently something
> completely different from those you know...
The "It's alive" thread in .general, and the "Re: Proposal for 4.0 core
control" thread in .programming. The language is called "G" for now,
because it is mainly for graphics and I needed a name. I've heard of
S-expressions, but not G-functions.
> You should not really mess with tables of constant values. It is
> initialised there in order to determine how many parameters a function
> takes, more information is not necessary.
The problem isn't the amount of information, but when it is known. The
POV VM doesn't know how many parameters a G function has until it is
told, it can't be hard coded at compile time.
> However, I see no clean way to determine how many values got passed
> to the functions and then take appropriate action. If you desire
> such functionality, you should really not add it with such an ugly
> hack.
It doesn't need to count values passed to the function. It just needs to
take the parameter count from a different source, because it can vary
for individual declarations.
Modifying the trap table seems to work fine, it looks like the code only
uses that value to set the parameter_cnt value in the function, then
relies on that value. I don't like it either, but it's the only way I
can see to do it without modifying large chunks of the POV VM code,
which I am reluctant to do.
> Vectors are not allowed as function parameters, so...
Right...my memory was getting mixed up with thinking about the transform
functions. My code will see triples of scalar parameters as single
vector parameters where a vector parameter is needed.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |