 					// (NOTE this will not be correct if the region should take up more than
 					// half of the bounds rect, for then we will have gone the wrong way
 					// around the bounds and included the smaller part rather than the larger)
+					// TODO check the clockwise/counterclockwise orientation of the polygon
 					var rightCheck:int = BoundsCheck.check(rightPoint, bounds);
 					var newCheck:int = BoundsCheck.check(newPoint, bounds);
 					var px:Number, py:Number;

				}
				connect(points, j, bounds);
			}
			// close up the polygon:
			connect(points, i, bounds, true);
			return points;
		}
		
		private function connect(points:Vector.<Point>, j:int, bounds:Rectangle, closingUp:Boolean = false):void
		{
			var rightPoint:Point = points[points.length - 1] as Point;
			var newEdge:Edge = _edges[j] as Edge;
			var newOrientation:LR = _edgeOrientations[j];
			// the point that  must be connected to rightPoint:

		
		private function reorderEdges():void
		{
			//trace("_edges:", _edges);
			var reorderer:EdgeReorderer = new EdgeReorderer(_edges, Vertex);
			_edges = reorderer.edges;
			//trace("reordered:", _edges);
			_edgeOrientations = reorderer.edgeOrientations;
			reorderer.dispose();
		}
