www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: Kernle 32DLL on April 24, 2011, 02:24:33 am
-
Hi there,
Just a quick question. Has the org vector in Object3D.calcMinDistance (http://www.jpct.net/doc/com/threed/jpct/Object3D.html#calcMinDistance%28com.threed.jpct.SimpleVector,%20com.threed.jpct.SimpleVector%29) 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
-
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
-
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?
-
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.
-
Please try the new beta. Object creations should be gone as long as you don't use a collision listener.
-
Oh, and just out of curiosity... What stands the AABB for in the Object3D.XXXIntersectsAABB functions for?
Axis Aligned Bounding Box