Exemple #1
0
 public bool Collides(BoundingBox o,Vector3 pos1, Vector3 pos2)
 {
     Vector3 dist = (pos2 - pos1);
     float d = dist.Length - this.radij - o.radij;
     if (d > this.radij + o.radij)
         return false;
     return true;
 }
Exemple #2
0
        public bool Collides(BoundingBox o)
        {
            if (this.max.X < o.min.X || this.min.X > o.max.X) return false;
            if (this.max.Y < o.min.Y || this.min.Y > o.max.Y) return false;
            if (this.max.Z < o.min.Z || this.min.Z > o.max.Z) return false;

            return true;
        }