AABB b2 = new AABB(new Vec3D(100, 30.1f, 0), new Vec3D(10, 10, 10));
assertEquals(box.intersectsBox(b2), false);
}
public void testAABBNormal() {
AABB box = new AABB(new Vec3D(100, 100, 100), new Vec3D(100, 100, 100));
Vec3D p = new Vec3D(100, 300, 100);
assertEquals(Vec3D.Y_AXIS, box.getNormalForPoint(p));
p.set(100, -300, 100);
assertEquals(Vec3D.Y_AXIS.getInverted(), box.getNormalForPoint(p));
p.set(300, 100, 100);
assertEquals(Vec3D.X_AXIS, box.getNormalForPoint(p));
p.set(-300, 100, 100);
assertEquals(Vec3D.X_AXIS.getInverted(), box.getNormalForPoint(p));
p.set(100, 100, 300);
assertEquals(Vec3D.Z_AXIS, box.getNormalForPoint(p));
p.set(100, 100, -300);
assertEquals(Vec3D.Z_AXIS.getInverted(), box.getNormalForPoint(p));
}