|
|
> clipka <ano### [at] anonymousorg> wrote a lot of great stuff:
>
> Whoa. That's a very interesting list of stuff.
> Very educational. I would have never thought of, and therefore never caught
> several of those.
>
> Sometimes I'd love to see a thread - or a section of the documentation - be
> devoted to showing how SDL can get buggy or do unexpected things, and how best
> to avoid or unravel it.
>
> I'm curious if there's a way to determine if the media is inside an object, or
> the camera is inside the mesh you mentioned. Is there an inside/outside test
> that can return a value?
>
> Something like isenclosed(myObject) would be mighty handy.
> It could return yes/no true/false, or the type of object that it is "most
> directly" inside. (if MySphere were in a box that was in a cylinder,
> isenclosed(MySphere) would return "box".
> I'm sure that's one of those things that's nearly impossible to do.
>
> There's still SO much I don't know about what can and can't be done in POV-Ray.
>
>
If you wrap your whole scene, minus the camera, into an union, you can
make an insideness test on that union from the camera's location.
If the result is zero (no/false), the camera is outside all of the
scene's objects. If the result is one (on/true), then the camera is
inside something, but you don't know what object.
There is no way that I'm aware of that can directly return whitch object
you are inside of. For that, you need to declare all objects, translate
them to the final location, then, in a loop, individualy test your point
against all of the objects of your scene.
Alain
Post a reply to this message
|
|