Hey norbo I am wondering what the best way would be to get the space that all objects are contained in but with a large margin...
So something like a hull surounding all of the bounding boxes put together with a margin of like 10 or something...
Basicly i want to be able to have a fast way to check wether a light is near any physics objects in the engine...
Any ideas?
Give me a yell if i didnt explain it well enough, it is a pretty bad explination...
A question about the world and object bounds
-
- Posts: 136
- Joined: Sun Jan 17, 2010 11:35 am
Re: A question about the world and object bounds
A GetEntities broadphase query with a BoundingSphere representing the light's volume could do the trick.
It's basically equivalent to checking if the light's position is contained within a margin-expanded area of physics objects, except a lot easier to manage
It's basically equivalent to checking if the light's position is contained within a margin-expanded area of physics objects, except a lot easier to manage
-
- Posts: 136
- Joined: Sun Jan 17, 2010 11:35 am
Re: A question about the world and object bounds
Works great
I was also suprised with the performance... Doing 64,000,000 checks against my entire (large) world takes only 4 seconds and reduces the abient occlution render time to less than a tenth of a percent of what it used to take.
Thanks.
I was also suprised with the performance... Doing 64,000,000 checks against my entire (large) world takes only 4 seconds and reduces the abient occlution render time to less than a tenth of a percent of what it used to take.
Thanks.