示例#1
0
        /// <summary>
        /// Checks that all the points in this polyhedron are valid.
        /// </summary>
        /// <returns>True if the polyhedron is valid</returns>
        public bool IsValid()
        {
            const float epsilon = 0.5f;

            return(!GetCoplanarPolygons().Any() &&
                   !GetBackwardsPolygons(epsilon).Any() &&
                   Polygons.All(x => x.IsConvex() && x.IsValid()));
        }
示例#2
0
 /// <summary>
 ///     If true, then this Geometry represents the empty point set, Ø, for the coordinate space.
 /// </summary>
 /// <returns>Returns 'true' if this Geometry is the empty geometry</returns>
 public override bool IsEmpty()
 {
     if ((Polygons == null) || (Polygons.Count == 0))
     {
         return(true);
     }
     return(Polygons.All(polygon => polygon.IsEmpty()));
 }