void fillSquare(PlanarSquare square, int contourIndex, int edgeMask, boolean reverseWinding) {
		int vPt = 0;
		boolean flip = reverseWinding;
		int nIntersect = 0;
		boolean newIntersect;
		for (int i = 0; i < 4; i++) {
			newIntersect = false;
			if ((edgeMask & (1 << i)) != 0) {
				triangleVertexList[vPt++] = square.vertexes[i];
			}
			// order here needs to be considered for when Edges(A)==Edges(B)
			// for proper winding -- isn't up to snuff

			if (flip && (edgeMask & (1 << (8 + i))) != 0) {
				nIntersect++;
				newIntersect = true;
				triangleVertexList[vPt++] = square.intersectionPoints[contourIndex + 1][i];
			}
			if ((edgeMask & (1 << (4 + i))) != 0) {
				nIntersect++;
				newIntersect = true;
				triangleVertexList[vPt++] = square.intersectionPoints[contourIndex][i];
			}
			if (!flip && (edgeMask & (1 << (8 + i))) != 0) {
				nIntersect++;
				newIntersect = true;
				triangleVertexList[vPt++] = square.intersectionPoints[contourIndex + 1][i];
			}
			if (nIntersect == 2 && newIntersect)
				flip = !flip;
		}
		/*
		 * Logger.debug("\nfillSquare (" + square.x + " " + square.y + ") " + contourIndex + " " +
		 * binaryString(edgeMask) + "\n"); Logger.debug("square vertexes:" + dumpIntArray(square.vertexes, 4));
		 * Logger.debug("square inters. pts:" + dumpIntArray(square.intersectionPoints[contourIndex], 4));
		 * Logger.debug(dumpIntArray(triangleVertexList, vPt));
		 */
		createTriangleSet(vPt);
	}