|
|
On 07/23/09 08:07, David H. Burns wrote:
> ??!! Though the second clause of this sentence seems true to me, nothing
> that I have read or heard in a long time seems so obviously false! It makes
Perhaps it's because you tried learning OOP from C++/Java?
I'm sure you think in OOP all the time with POV-Ray. You create a
sphere. It's an object with certain properties (texture, location, etc).
Now let's say you want to rotate the sphere, does it hurt so much to do
something like:
mysphere.rotate(45)
Let's say you want to have lots of balls in your scene. You want some
to be red, some blue, and some green. And some of _those_ you want to be
translucent.
So you create your "basic" ball as a sphere with little texture. You
subclass it to create two kinds of balls: "solid" and "translucent". In
terms of actual code, you just create a new object that is the subclass
of your "basic", and you merely add to it the texture that makes it
translucent.
Then you can subclass each to get the red, blue and green balls.
--
No, Taco Bell is NOT the Mexican Phone Company!
Post a reply to this message
|
|