POV-Ray : Newsgroups : povray.unofficial.patches : Re: Hi from DKBTrace author : Re: Hi from DKBTrace author Server Time
4 Nov 2024 13:03:54 EST (-0500)
  Re: Hi from DKBTrace author  
From: Chris Huff
Date: 20 Jan 2001 12:12:38
Message: <chrishuff-96ACF1.12134420012001@news.povray.org>
In article <3A69BA2F.5FB74425@pacbell.net>, lin### [at] povrayorg 
wrote:

> >  and the source code is fully object-oriented ...
> 
> If the source code is fully object-oriented...

The main reason to choose C++ as the language to rewrite POV 4.0 in, 
would be to make using OOP concepts a lot easier to use. The current 
source code has to mess around with function pointers in order to mimic 
objects. You *could* do the same thing in C++, but there would be no 
reason to do so...it just makes things unnecesarily difficult to modify. 
For example, to add a proximity function in the current source, I would 
have to modify the code for every shape...in C++ I would only have to 
modify a small amount of code in the base shape and it would be 
inherited by all of the other shapes.
I think it's safe to say that most of the reason for choosing C++ is to 
allow making the source code fully object-oriented.

-- 
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.