|
|
"ABX" <abx### [at] abxartpl> wrote in message
news:uqau509fp9s1aq67kkr6buhg3amup6lc0h@4ax.com...
> On Mon, 22 Mar 2004 10:04:40 -0800, "Chambers" <bdc### [at] yahoocom>
wrote:
> > How difficult would it be to allow SDL access to predeclared objects?
>
> Not difficoult at all if you encapsulate input data and object in one
> structure and operate on it.
>
http://news.povray.org/povray.advanced-users/thread/%3C6lpkut0vdh0h6gljr7u2v4mip6olddkmel%404ax.com%3E/
Hmm, I've used a similar method, but this again requires that you declare
your objects in #declare 's and then operate on those.
Say we have the following:
sphere {0,1 pigment {color red 1} }
#declare struct=array[3];
#declare struct[0]=sphere{y*2,1 pigment {color blue 1} }
#declare struct[1]=finish {reflection 1};
#declare struct[2]=sphere{x*2,1 pigment {color green 1} }
(I know it's a crude example, but let's keep things simple :)
OK, now in the struct we have two spheres and a finish because we declared
them. Fine, we can access those. For the purposes of the example, let's
say I'm doing collision detection (though this would be useful for much more
than that). I can check against the blue and green spheres as parts of the
struct. However, how can I check for collision against the red sphere? In
fact, how do I know there aren't other objects in the scene that aren't part
of the struct? I'd like a method for POV-Ray to let me *see* them (but not
necessarily change them) and their internal data.
--
...Chambers
http://www.geocities.com/bdchambers79
Post a reply to this message
|
|