Are the classes Intersection and CollisionDetection very OO?

My editor works with more then one thread with no problem. I have a class that makes shore that the threads do not compete with each other.

That seems fair. I’ll add something too it, just a quick javadoc. Users can use more than one thread at a time using these classes, they just have to make sure the class is used only once at a time.

"abies" wrote:
Just to let you know why... <snip>

Fair enough. You'll find me usually more open to such... Personal life intruding on my forum postings... :(

An int is 4 bytes, and an object is 8 bytes. So the diffrerence between methods is



Old: 4(int)*6 + 8(int[] object) = 32 bytes

new: 4 bytes



Take a very modest size object of … 2,000 triangles. That object will have 3,999 Oriented Bounding Box’s if it is in an OBB Tree (each triangle has its box plus parent boxes). Now take a very modest scene of only 20 objects.



20 * 3,999 = 79,980 Oriented Bounding boxes.



The old method would use 32 * 79,980 = 2,559,360 bytes and the new method would use 4 * 79,980 = 319,920 bytes. To me, a savings of 2,239,440 or over 2 MB is more than just a few bytes. This is of course taking a modest game where users only need to test 20 objects for collisions. Expand that to the level of Quake3, and you’ve got mucho byto there.



I’m not for or against his idea, but it deserve looking into IMHO.



This is a real example of something that may appear like a tiny thing, but who knows when it will get stressed out later on. I’m of the opinion that we should encourage others to give improvments while the application is still in alpha. If anyone finds some of my code that could be improved, please e-mail me. I love learning new things.

Cep, you are missing my point entirely. I’m not saying it’s a bad idea or one we shouldn’t look into. There are dozens if not hundreds of such places where we can and need to tune the code. When we see one it’s great to bring it up as “when we can get to it, here’s another tuning point” (which is how I view abies post, right?) We are getting decent performance now and we are still missing several features on our feature list, so let’s get those features in! :slight_smile: As I understand it, we’ll have a whole version that’s tuning and tweaking in 2 more releases or so.