POV-Ray : Newsgroups : povray.programming : this : Re: this Server Time
28 Jul 2024 10:31:53 EDT (-0400)
  Re: this  
From: Christopher James Huff
Date: 24 Jun 2002 11:42:46
Message: <pan.2002.06.24.10.42.24.248294.635@mac.com>
Personally, I'd prefer "self"... ;-)
I don't think this would work, not with the current object syntax anyway.
If it is available at any point in the object block, then it would have to
be available at times when the object doesn't completely exist yet. There
would be an "invisible line" somewhere where the "self" identifier would
appear, you couldn't do this:

sphere {min_extent(self), 1}

And I'm not sure how CSG objects would handle it in between adding
objects, or meshes while adding triangles. Something like this might work
though:

object {
    sphere {...}
    "self" or "this" is defined in this level, but not in the shape
specification block itself, making sure there is a complete shape to
refer to.
}

Or if the shape parameters used a different syntax or always had default
values...it would be pretty much necessary for my idea of changing the
POV-Ray language into a prototype-based object oriented language.


-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: <chr### [at] tagpovrayorg>
WWW: http://homepage.mac.com/chrishuff/


Post a reply to this message

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