Question about Object3D.calcMinDistance

Started by Kernle 32DLL, April 24, 2011, 02:24:33 AM

Previous topic - Next topic

Kernle 32DLL

Hi there,

Just a quick question. Has the org vector in Object3D.calcMinDistance to be world of local space? I dont have any suited environment to test this out right now.

Oh, and just out of curiosity... What stands the AABB for in the Object3D.XXXIntersectsAABB functions for?

So long,
Kernle

Kernle 32DLL

Nevermind, it's world space of course (silly me...) However, using calcMinDistance is not a good idea atm, as it allocated a lot of objects (Object3D[] and SimpleVectors).

So long,
Kernle

EgonOlsen

It does create a lot of objects? I'll look into it as It's basically nothing more than ray/polygon collision detection, which shouldn't create any objects at all. Have you tried without octree?

Kernle 32DLL

#3
Well, the allocation tracker gives me the creation of a two SimpleVectors (line 2717 and 2719 in Object3D.java) and one Object3D[] (line 2720 in Object3D.java) per calcMinDistance call. Makes quite a lot of allocations, if used a lot.

Oh, and I dont use an octree atm.

EgonOlsen

Please try the new beta. Object creations should be gone as long as you don't use a collision listener.

EgonOlsen

Quote from: Kernle 32DLL on April 24, 2011, 02:24:33 AM
Oh, and just out of curiosity... What stands the AABB for in the Object3D.XXXIntersectsAABB functions for?
Axis Aligned Bounding Box