POV-Ray : Newsgroups : povray.programming : Object oriented POV scene language? : Re: Object oriented POV scene language? Server Time
28 Jul 2024 18:15:07 EDT (-0400)
  Re: Object oriented POV scene language?  
From: Chris Huff
Date: 26 Oct 2000 17:44:10
Message: <chrishuff-26D3D9.16470626102000@news.povray.org>
In article <39f89df8@news.povray.org>, "Matthew Webster" 
<mat### [at] nospamvirginnet> wrote:

> Has anyone ever thought of using a straight C++ interface for POV?

I think a language designed for scene description would be a better 
idea. Something similar in basic syntax to C/C++/ObjC/Java, but 
simplified and modified to make scene description part of the language. 
My "CSDL" project is an example of what I am talking about...(CSDL == 
C-like Scene Description Language)


> It seems the language is slowly growing that way anyway but its all 
> getting a bit messy with more and more switches etc.

Um, it doesn't seem very C++-like to me...and what do you mean by 
switches? I don't use the #switch command very often at all...and I 
don't see what it has to do with making POV-Script more object-oriented 
or using C++.


> My thought is that you could define a set of standard C++ objects 
> corresponding to the objects POV understands. Each has a set of 
> operations such as object.rotate(x,y,z) and 
> object.interior.ior(1.5)... At some point in the code there's a call 
> to "object.store" to download the resulting primitives in some form 
> the renderer understands.
> Compile this in a shareware compiler and run it, then a separate renderer
> can then act on the primitives generated.
> Is this all too geeky?

A few things that make it a bad idea to use C++ as the POV language: 
1: Ease of use. Everyone would have to forget POV-Script and learn C++. 
Some people simply don't like C++, others don't have time, talent, or 
will to learn and use it. And even once you learn it and use it, it just 
isn't the best tool for doing many scenes.
2: Everyone would need a C++ compiler. Unless the POV-Team writes one 
for each platform and includes it with POV, they will have to go find 
some free or shareware one, figure out how to install and use it with 
what documentation they can find, and cope with differences between 
compilers.
3: Platform/development environment differences. POV always runs 
POV-Script the same way, compilers(especially free/cheap ones) often 
have odd little "issues". And then there are differences in the 
libraries...again, unless the POV-Team writes one for each platform and 
includes it with POV, these will be big problems.
4: Security. Using C++ means a POV-Script would be able to do 
*anything*. For some applications this is simply unacceptable.

However, a "POV-Library" that can emit POV-Script code would still be 
very useful for other things: utilities, complex simulations or 
calculations, etc. It just wouldn't be a good idea to use C++ as the 
main scene description language.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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