|
![](/i/fill.gif) |
In article <3c8f298c$1@news.povray.org>,
"Vadim Sytnikov" <syt### [at] ru com> wrote:
> If a language has an explicit pre-processing stage, then there is something
> wrong with the language itself. My point is that POV-Ray must not expose
> that to the user -- and hopefully get rid of such internal subdivision as
> well.
I don't think the mere presence of a preprocessor is a flaw in a
language. And in this case, it is rather unavoidable...unless you want
to re-evaluate the entire scene for each ray cast.
The POV-Ray control structures (macros, #if-else and #switch
conditionals, #while loops) are more like preprocessor directives than
language structures, and this gives them some very useful
advantages--you can use them to generate scene code automatically,
making a large number of objects in a union or initializing arrays.
There isn't a separate pre-parse stage, but the scene parser doesn't see
the loops and doesn't need to, it just needs to know objects and other
scene attributes. After parsing, the scene is pretty static, it just
gets rendered.
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |