POV-Ray : Newsgroups : povray.general : Pov 4.00 question : Re: Pov 4.00 question Server Time
7 Aug 2024 05:16:19 EDT (-0400)
  Re: Pov 4.00 question  
From: Alan Holding
Date: 31 Jan 2002 14:11:41
Message: <3c5996ed@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3c57d5a1@news.povray.org...
> Just out of curiousity....

Pardon me for speaking out of turn, because most of the people contributing
to this thread seem pretty on the ball with their languages, but doesn't POV
has a basic sort of inheritance anyway?

#local MySphere1=sphere {0 1 pigment {rgb 1}}

#local MySphere2=object {MySphere1 pigment {rgb 0}}

MySphere1 and MySphere2 come out different.  If you want cascading changes
similar to classes why not have something like:

#local MySphere2=object {MySphere1 inherit {all | include {some things or a
#declared collection of things} | exclude {other things or a #declared
collection of things} }

I know this kind of inheritance doesn't work for things like mesh2 objects
and their textures, but I think something like the above would make for more
friendly, and tighter, script than the other hypothetical examples posted in
this thread.

Or am I talking tosh?


Post a reply to this message

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