POV-Ray : Newsgroups : povray.general : Pov 4.00 question : Re: Pov 4.00 question Server Time
6 Aug 2024 19:35:00 EDT (-0400)
  Re: Pov 4.00 question  
From: Christopher James Huff
Date: 30 Jan 2002 16:36:56
Message: <chrishuff-F3A817.16380630012002@netplex.aussie.org>
In article <3c58554e@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   It maybe modular, but it certainly is not object-oriented.
>   Two basic requirements for object-orientedness are inheritance and dynamic
> binding. Without those you just have a modular language, not object-oriented.

If you're talking about the scripting language:
The shapes could be arranged in a heirarchy where they seem to "inherit" 
attributes:
The base "object" has transformations and textures, and all objects have 
double_illuminate, etc.
The solid objects have insides and can be hollow, but are objects. The 
patch objects do not have insides.
The sturm objects can use the sturm keyword for more accurate rendering, 
but are solid objects.
The blob and lathe objects are sturm objects.

The system is just so limited and static that dynamic binding is almost 
meaningless (almost...the individual shapes do "override" transformation 
as an optimization, for example, I'm pretty sure translating a sphere 
moves it's center).

What I was saying is that you could look at it like an object-oriented 
system, and the language could become a real prototype-based object 
oriented language with just a little modification.

If you're talking about the source code, it does a sort of dynamic 
binding using function pointers, and a sort of inheritance using macros 
to generate code common to all shapes.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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