POV-Ray : Newsgroups : povray.newusers : checking which objects are visible/occluded : Re: checking which objects are visible/occluded Server Time
29 Jul 2024 06:20:37 EDT (-0400)
  Re: checking which objects are visible/occluded  
From: curtmack
Date: 17 Jul 2006 10:25:01
Message: <web.44bb9c932286254193400c860@news.povray.org>
"Mutley2003" <nomail@nomail> wrote:
> Hi
> L'd like to write a little macro that gives me a diagnostic of which objects
> are visible in my scene (ie the observer can see, that are not occluded by
> other objects)
>
> It seems maybe I could use the direction vector (of the camera) and the
> trace() function coupled with min_extent() and max_extent(), with debug to
> print stuff out, but my feel for the SDL is not too good just yet
>
> a) how do I retrieve the direction vector? .. there does not seem to be any
> notation like camera.direction or camera$direction

I would do something like this:

#declare camloc = <whatever vector you want>;
#declare camlook = <blah blah blah>;
#declare camdir = camloc-camlook;

camera {
  location camloc
  look_at  camlook
}

and that way you have your direction vector neatly #declared.



> b) is there an accessible  collection of objects that I can iterate across?

That I'm not too sure about, sorry.


Post a reply to this message

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