public bool Intersects(BoundingSphere3 boundingSphere)
        {
            Vec3 clampedLocation;

            if (boundingSphere.center.x > max.x)
            {
                clampedLocation.x = max.x;
            }
            else if (boundingSphere.center.x < min.x)
            {
                clampedLocation.x = min.x;
            }
            else
            {
                clampedLocation.x = boundingSphere.center.x;
            }

            if (boundingSphere.center.y > max.y)
            {
                clampedLocation.y = max.y;
            }
            else if (boundingSphere.center.y < min.y)
            {
                clampedLocation.y = min.y;
            }
            else
            {
                clampedLocation.y = boundingSphere.center.y;
            }

            if (boundingSphere.center.z > max.z)
            {
                clampedLocation.z = max.z;
            }
            else if (boundingSphere.center.z < min.z)
            {
                clampedLocation.z = min.z;
            }
            else
            {
                clampedLocation.z = boundingSphere.center.z;
            }

            return(clampedLocation.DistanceSquared(boundingSphere.center) <= (boundingSphere.radius * boundingSphere.radius));
        }
示例#2
0
 public static void Intersects(ref BoundingFrustum3 boundingFrustum, ref BoundingSphere3 boundingSphere, out bool result)
 {
     throw new NotImplementedException();
 }
示例#3
0
 public bool Intersects(BoundingSphere3 boundingSphere)
 {
     throw new NotImplementedException();
 }
示例#4
0
 public static void Contains(ref BoundingFrustum3 boundingFrustum, ref BoundingSphere3 boundingSphere, out ContainmentTypes result)
 {
     throw new NotImplementedException();
 }
示例#5
0
 public ContainmentTypes Contains(BoundingSphere3 boundingSphere)
 {
     throw new NotImplementedException();
 }