Exemplo n.º 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;
		}
Exemplo n.º 2
0
 public static float CompareLengths(LineSegment edge0, LineSegment edge1)
 {
     return - CompareLengths_MAX(edge0, edge1);
 }
Exemplo n.º 3
0
        /*
         * public List<LineSegment> DelaunayLinesForSite(Vector2f coord) {
         *      return DelaunayLinesForEdges(Edge.SelectEdgesForSitePoint(coord, edges));
         * }*/

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