POV-Ray : Newsgroups : povray.general : Pov 4.00 question : Re: Pov 4.00 question Server Time
7 Aug 2024 05:23:02 EDT (-0400)
  Re: Pov 4.00 question  
From: Warp
Date: 31 Jan 2002 14:53:37
Message: <3c59a0c1@news.povray.org>
Alan Holding <tro### [at] tiscalicouk> wrote:
: #local MySphere2=object {MySphere1 inherit {all | include {some things or a
: #declared collection of things} | exclude {other things or a #declared
: collection of things} }

  This is the wrong concept of inheritance.
  Inheritance is not "make an object including some features of another
object and excluding other features, or changing some of the features".

  Inheritance is spezialization. A base class is a more generic concept
and an inherited class is specialization, ie. a more concrete version of
that concept. The inherited class is, by all means, a base class (with
some additions, implementations or specializations).
  For example, we could have a base class called 'Vehicle' which is a
generic concept. Then we could specialize a more concrete class 'Car' from
it. A 'Car' is a 'Vehicle' by all means. 'Car' knows and supports everything
'Vehicle' does. Everything that uses an object of the 'Vehicle' can use an
object of type 'Car'.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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