|
|
> I just played around a bit, since collision detection would be a nice thing. It
> seems that intersections of solid objects gives a finite bounding box if there
> is an intersection and an infinity one
>
> box { <-10000000000,10000000000> }
>
> if there is no intersection. May be one of the more experienced users here knows
> the answer. It seems to work with spheres and boxes.
>
> But one has to store all objects in an Array since one has to test every new one
> against all existing. In special cases there are optimisations. May be you would
> like to study the code of Jonathan Hunts "pebbles". You find the link within the
> POV Hall of Fame.
>
> Best regards,
> Michael
>
>
>
A simple one is to put all base objects in a single union. Those are
your environment.
Test the randomly placed objects against that union.
If you have many objects to place, after about 100, make an union with
those. Now, you only test for the static objects and that union. That
test will be much faster than testing every individual objects.
You can also use the trace function in some cases.
Post a reply to this message
|
|