POV-Ray : Newsgroups : povray.general : object oriented features : Re: object oriented features Server Time
28 Jul 2024 16:27:51 EDT (-0400)
  Re: object oriented features  
From: Mikael Carneholm
Date: 21 Aug 2000 12:53:36
Message: <39A15E8D.91B2E3E7@ida.utb.hb.se>
Chris Huff wrote:

> You left out "matrix" and "scale" transforms.

I know...for simplicity I only mentioned translation and rotation.

> I think you can do all you need by simply making the transformation
> matrix available to the user. If the user needs more, they can create a
> new object and override the rotate(), translate(), etc. methods
> themselves to do what they want.

This is probably exactly what I'm looking for. That is, if the values used
to create the object are available also (like the first vector in the sphere
expression, the float value determining the radius, etc.). Note that
"origin" only applies to that first vector parameter in spheres and light
sources...(from what I currently can recall) - other objects use other
construction parameters, like the box with it's two vectors that probably
best could be called .corner1 & .corner2, or something like that. All that
should be object specific, as said before.

> However, it looks like it would be a pretty big adjustment from
> POV-Script. And it would need a bit of adjustment to fit with POV...it
> seems designed to do dynamic realtime animations, while POV does frames.
> And it looks like all objects are drawn, no matter what, I would prefer
> at least a draw() method so I can have objects which aren't drawn.
> But it looks nice and efficient, just 12 lines...
>

I don't want VPython to be the new OO POV-Script - but VPython could be seen
as an example of how nice and efficient it should be...nothing else.


----------------------------------------------------
Mikael Carneholm, B.Sc.
Dep. of Computer Science and Business Administration


Personal homepage:
http://www.studenter.hb.se/~arch
E-mail:
sa9### [at] idautbhbse


Post a reply to this message

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