POV-Ray : Newsgroups : povray.programming : POV 4 ideology proposal : Re: POV 4 ideology proposal Server Time
30 Jul 2024 10:11:34 EDT (-0400)
  Re: POV 4 ideology proposal  
From: Ron Parker
Date: 12 May 1999 19:19:53
Message: <3739fe89.0@news.povray.org>
On Wed, 12 May 1999 18:26:41 GMT, Cliff Bowman wrote:

>>> #declare SomeSphere.position=SomeSphere.position+<0,1,0>;
>>
>>#declare SomeSphere = object { SomeSphere translate y }
>>Does exactly it.
>
>Not quite, I suspect. Isuspect the OOP example would change the
>.position property of the pre-defined object "SomeSphere" 

...

>it might well be preferable to
>adjust the properties of the object rather than declaring a whole new
>object

You're not declaring a whole new object.  Since you're putting it in
the same place, the old one gets destroyed and the new one takes its
place.  The only thing that might be optimized better is the fact that
while the object {...} block is open, there are two copies of the object
in memory.


>Not necessarily ideal. Take making an asteroid out hundreds of
>randomly jittered sperical blob components as an example. Simly
>adjusting the texture might make a cloud of asteroids easier to do
>than re-declaring each asteroid - especially if (for any reason) each
>asteroid is meant to be identical in actual shape (oh it can be done -
>but tedious for the modeller and computer alike).

For this were macros invented.


Post a reply to this message

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