Example #1
0
        /// <summary>
        /// Intersection check between circle and box
        /// </summary>
        public bool Intersects(Circle3d c)
        {
            if (c.Center.IsInside(this))
            {
                return(true);
            }
            if (c.Center.DistanceTo(this) > c.R)
            {
                return(false);
            }

            foreach (Triangle triangle in ListOfTriangles)
            {
                if (c.Intersects(triangle))
                {
                    return(true);
                }
            }
            return(false);
        }
Example #2
0
        /// <summary>
        /// Intersection check between circle and box
        /// </summary>
        public bool Intersects(Circle3d c)
        {
            //if (c.Center.IsInside(this)) return true;
            double dist = c._point.DistanceTo(this);

            if (dist > c.R)
            {
                return(false);
            }
            if (dist < GeometRi3D.Tolerance)
            {
                return(true);
            }

            foreach (Triangle triangle in ListOfTriangles)
            {
                if (c.Intersects(triangle))
                {
                    return(true);
                }
            }
            return(false);
        }
Example #3
0
 /// <summary>
 /// Intersection check between circle and triangle
 /// </summary>
 public bool Intersects(Circle3d c)
 {
     return(c.Intersects(this));
 }