示例#1
0
		public static float CompareLengths_MAX(LineSegment segment0, LineSegment segment1) {
			float length0 = (segment0.p0 - segment0.p1).magnitude;
			float length1 = (segment1.p0 - segment1.p1).magnitude;
			if (length0 < length1) {
				return 1;
			}
			if (length0 > length1) {
				return -1;
			}
			return 0;
		}
示例#2
0
 public static float CompareLengths(LineSegment edge0, LineSegment edge1)
 {
     return - CompareLengths_MAX(edge0, edge1);
 }
示例#3
0
        /*
         * public List<LineSegment> DelaunayLinesForSite(Vector2f coord) {
         *      return DelaunayLinesForEdges(Edge.SelectEdgesForSitePoint(coord, edges));
         * }*/

        public List <LineSegment> VoronoiDiagram()
        {
            return(LineSegment.VisibleLineSegments(edges));
        }
示例#4
0
 public List <LineSegment> VoronoiBoundaryForSite(Vector2f coord)
 {
     return(LineSegment.VisibleLineSegments(Edge.SelectEdgesForSitePoint(coord, edges)));
 }
示例#5
0
 public static float CompareLengths(LineSegment edge0, LineSegment edge1)
 {
     return(-CompareLengths_MAX(edge0, edge1));
 }