use of com.bulletphysics.extras.gimpact.BoxCollision.AABB in project bdx by GoranM.
the class TriangleShapeEx method getAabb.
@Override
public void getAabb(Transform t, Vector3f aabbMin, Vector3f aabbMax) {
Stack stack = Stack.enter();
Vector3f tv0 = stack.alloc(vertices1[0]);
t.transform(tv0);
Vector3f tv1 = stack.alloc(vertices1[1]);
t.transform(tv1);
Vector3f tv2 = stack.alloc(vertices1[2]);
t.transform(tv2);
AABB trianglebox = stack.allocAABB();
trianglebox.init(tv0, tv1, tv2, collisionMargin);
aabbMin.set(trianglebox.min);
aabbMax.set(trianglebox.max);
stack.leave();
}
use of com.bulletphysics.extras.gimpact.BoxCollision.AABB in project bdx by GoranM.
the class Stack method allocAABB.
public AABB allocAABB() {
types[sp++] = TYPE_AABB;
int pos = stackPositions[TYPE_AABB]++;
if (aabbStack.size() <= pos) {
aabbStack.add(new AABB());
}
return aabbStack.get(pos);
}
Aggregations