public override bool intersectsAxisAligned(OrientedBoxCollider other, out Vector3 normal1, out Vector3 normal2) { normal1 = normal2 = Vector3.Up; return false; }
/// <summary> /// Determine whether this box contains, intersects, or is disjoint from /// the given other box. /// </summary> public ContainmentType Contains(ref OrientedBoxCollider other) { // Build the 3x3 rotation matrix that defines the orientation of 'other' relative to this box Quaternion invOrient; Quaternion.Conjugate(ref Orientation, out invOrient); Quaternion relOrient; Quaternion.Multiply(ref invOrient, ref other.Orientation, out relOrient); Matrix relTransform = Matrix.CreateFromQuaternion(relOrient); relTransform.Translation = Vector3.Transform(other.Center - Center, invOrient); return ContainsRelativeBox(ref HalfExtent, ref other.HalfExtent, ref relTransform); }
public override bool intersectsAxisAligned(OrientedBoxCollider other, out Vector3 normal1, out Vector3 normal2) { normal1 = normal2 = Vector3.Up; return Contains(ref other) != ContainmentType.Disjoint; }
public abstract bool intersectsAxisAligned(OrientedBoxCollider other, out Vector3 normal1, out Vector3 normal2);