POV-Ray : Newsgroups : povray.off-topic : Tell me it isn't so! : Re: Tell me it isn't so! Server Time
10 Oct 2024 11:20:35 EDT (-0400)
  Re: Tell me it isn't so!  
From: Neeum Zawan
Date: 24 Jul 2009 13:07:24
Message: <4a69ea4c$1@news.povray.org>
On 07/24/09 09:51, David H. Burns wrote:
> I think the concept of "object" is a real advance in programming but
> "OOP" seems
> a lot more than simpling making use of "objects" which "contain" both
> data members
> and functions ("methods")

	As I said before, you have a "ball" variable, which is just a sphere 
with everything you've defined (coordinates, texture, etc).

	It has data members, which would be the aforementioned items 
(coordinates, pigments, etc). It also may have methods, like rotate, 
translate, etc. You could do:

ball.translate(1, 3, 5)

	to translate it by <1, 3, 5>.


	(The syntax may be a bit different - that's a minor issue).

	I think you're worried that you'll somehow have to put all your code 
into the methods of objects. Heck, for simple scenes, I doubt you'll 
have to code _any_ methods. POV-Ray will provide standard methods to all 
objects (like rotate, translate, etc), which you will merely use.

	If you want to do regular for loops, etc, it need not be part of any 
object method, but in your "regular" code. No one said that the new SDL 
will force everything to reside in an object like Java does.

-- 
Cut my pizza in six slices, please; I can't eat eight.


Post a reply to this message

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