|
![](/i/fill.gif) |
clipka <ano### [at] anonymous org> 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
|
![](/i/fill.gif) |