internal OrderedSet <CollisionBroadPhase> CollisionInspection(PhysicsObject col) { Debug.Log("Check " + this.name); OrderedSet <CollisionBroadPhase> set = new OrderedSet <CollisionBroadPhase>(); if (!this.aabb.IsIntersects(col.DCollider)) { Debug.Log("CollisionInpection Returns null"); return(set); } if (!isLeaf) { foreach (QuadNode node in childNodes) { set.Add(node.CollisionInspection(col)); } } else { foreach (PhysicsObject obj in includedObjects) { if (obj.id == col.id) { continue; } if (obj.DCollider.IsIntersects(col.DCollider)) { CollisionBroadPhase tempCollision = new CollisionBroadPhase(col, obj); set.Add(tempCollision); } } } Debug.Log("CollisionInpection Returns : " + set); return(set); }
public override bool Equals(object obj) { if (obj is CollisionBroadPhase) { CollisionBroadPhase other = (CollisionBroadPhase)obj; if ((A.Equals(other.A) && B.Equals(other.B)) || (A.Equals(other.B) && B.Equals(other.A))) { return(true); } } return(false); }
internal static void ResolveCollision(CollisionBroadPhase broadCollision) { }