示例#1
0
 public override bool intersectsAxisAligned(OrientedBoxCollider other, out Vector3 normal1, out Vector3 normal2)
 {
     normal1 = normal2 = Vector3.Up;
     return false;
 }
示例#2
0
        /// <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);
        }
示例#3
0
 public override bool intersectsAxisAligned(OrientedBoxCollider other, out Vector3 normal1, out Vector3 normal2)
 {
     normal1 = normal2 = Vector3.Up;
     return Contains(ref other) != ContainmentType.Disjoint;
 }
示例#4
0
 public abstract bool intersectsAxisAligned(OrientedBoxCollider other, out Vector3 normal1, out Vector3 normal2);