public virtual void GetAabb(BroadphaseProxy proxy, out IndexedVector3 aabbMin, out IndexedVector3 aabbMax) { SimpleBroadphaseProxy sbp = GetSimpleProxyFromProxy(proxy); aabbMin = sbp.GetMinAABB(); aabbMax = sbp.GetMaxAABB(); }
public static bool AabbOverlap(SimpleBroadphaseProxy proxy0, SimpleBroadphaseProxy proxy1) { IndexedVector3 p0Min = proxy0.GetMinAABB(); IndexedVector3 p0Max = proxy0.GetMaxAABB(); IndexedVector3 p1Min = proxy1.GetMinAABB(); IndexedVector3 p1Max = proxy1.GetMaxAABB(); #if DEBUG if (BulletGlobals.g_streamWriter != null && BulletGlobals.debugBroadphase) { BulletGlobals.g_streamWriter.WriteLine("simple aabOverlap"); MathUtil.PrintVector3(BulletGlobals.g_streamWriter, "0min", p0Min); MathUtil.PrintVector3(BulletGlobals.g_streamWriter, "0max", p0Max); MathUtil.PrintVector3(BulletGlobals.g_streamWriter, "1min", p1Min); MathUtil.PrintVector3(BulletGlobals.g_streamWriter, "1max", p1Max); } #endif return(p0Min.X <= p1Max.X && p1Min.X <= p0Max.X && p0Min.Y <= p1Max.Y && p1Min.Y <= p0Max.Y && p0Min.Z <= p1Max.Z && p1Min.Z <= p0Max.Z); }