POV-Ray : Newsgroups : povray.general : Pov 4.00 question : Re: Pov 4.00 question Server Time
6 Aug 2024 19:28:51 EDT (-0400)
  Re: Pov 4.00 question  
From: Jan Walzer
Date: 30 Jan 2002 15:58:39
Message: <3c585e7f$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote:
> Christopher James Huff <chr### [at] maccom> wrote:
> : The POV Team has said they were rewriting it in C++. Actually, the
> : current source implements a kind of OOP, it is just hard to manage.
> : The scripting...it could be argued that it is already OOP
>
>   It maybe modular, but it certainly is not object-oriented.
>   Two basic requirements for object-orientedness are inheritance and
dynamic
> binding. Without those you just have a modular language, not
object-oriented.

you mean, if it would something like the following, it wouldn't be OO ?

----- Example, how _I_ would wish the SDL to be
... ----------------------------

#declare MySphere=sphere{<0,0,0>,5}
#declare MyMaterial=material{texture{pigment{color rgb 1}}}

MySphere.setCenter(<5,2,5>)
MySphere.setMaterial(MyMaterial)

MyMaterial.getTexture.setFinish(finish{ambient 0})

#declare MyBox=box{}
MyBox.setCorners(<-1,-2,-3>,<1,2,3>)
MyBox.setMaterial(MyMaterial.clone())
MyBox.getMaterial.getTexture.setFinish(finish{reflection 0.7 ambient 0.0
diffuse 0.2})
MyBox.translate(<-5,0,8>)

Scene.add(MyBox)
Scene.add(MySphere)
Scene.add(camera{lookAt 0, location y*5+z*-10})
Scene.add(lightSource{y*20, color rgb 1})

Scene.render()


-----------------------------------------------------------------------------
----

Maybe I've done too much Java ...

this would IMHO provide a certain degree of compatibility, and allow a
perfect
manipulation of objects, after they've been declared ...

The mainThing I prefer in this solution, is:
- you can declare Objs (maybe even only the frame of the obj)
- specify afterwards, how to manipulate it
- add it to the Scene-Object if it should be taken into account while
rendering
- you can specify the moment, when the scene should be rendered ...
- do some cleanup, or prepair the next frame to be rendered ...


--
#macro J(N A)#local a=mod(N 3);#local W=<int(mod(A,4)*2)int(-A/4)9>*2;#if
(!mod(a 2))sphere{W,2,2pigment{color rgb<a*5A/2W.x/A*5>}}#if(a<1)sphere{W
+<2,0>2 2pigment{color rgb<a*10A 10>}}#end#end#if(N>3)J(int(N/3)A+1)#end#
end blob{J(29229171 0)threshold 1translate<-6 3>}/******Jan Walzer******/


Post a reply to this message

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