POV-Ray : Newsgroups : povray.advanced-users : output an octree file : Re: output an octree file Server Time
1 Jul 2024 06:01:52 EDT (-0400)
  Re: output an octree file  
From: jazzman
Date: 17 Aug 2010 08:30:01
Message: <web.4c6a8013e632d53af7e4a8d00@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 13.08.2010 13:03, schrieb jazzman:
>
> > Actually, I need to know for every cube in the scene if it contains an object
> > (not for every square on the screen). So I need to perform N^3 tests anyways.
>
> I'd suggest to...
>
> - Test the scene objects one by one, unless they're very close to each
> other.
> - For each object, restrict your testing to the bounding box as given by
> min_extent() and max_extent().
> - Use 2x N^2 calls to trace() from two opposite sides of the bounding
> box, to further narrow down the subset of the bounding box where you
> have to use a series of inside() tests. (Obviously, you don't need to
> test on a line that doesn't intersect with the object anywhere.)

Is there some kind of function that can return a list of all the objects in the
scene? I would need this kind of function to find the bounding box of each
object because i want it to work on any scene.


Post a reply to this message

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