Beta
Beta
boundBeta
depthBeta
indexBeta
originBeta
subregionBeta
verticesBeta
Beta
Beta
Beta
Beta
Returns the range of edge IDs corresponding to the given edge chain. Edge chains must form contiguous, non-overlapping ranges that cover the entire range of edge IDs.
Beta
Returns the edge at offset "offset" within edge chain "chainID". Equivalent to "shape.edge(shape.chain(chainID).start + offset)" but more efficient.
Beta
Finds the chain containing the given edge, and returns the position of that edge as a ChainPosition(chainID, offset) pair.
shape.chain(pos.chainID).start + pos.offset == edgeID shape.chain(pos.chainID+1).start > edgeID
where pos == shape.chainPosition(edgeID).
Beta
Reports whether given two loops whose boundaries do not cross (see compareBoundary), if this loop contains the boundary of the other loop. If reverse is true, the boundary of the other loop is reversed first (which only affects the result when there are shared edges). This method is cheaper than compareBoundary because it does not test for edge intersections.
This function requires that neither loop is empty, and that if the other is full, then reverse == false.
Beta
Beta
Returns the dimension of the geometry represented by this shape, either 0, 1 or 2 for point, polyline and polygon geometry respectively.
0 - Point geometry. Each point is represented as a degenerate edge.
1 - Polyline geometry. Polyline edges may be degenerate. A shape may represent any number of polylines. Polylines edges may intersect.
2 - Polygon geometry. Edges should be oriented such that the polygon interior is always on the left. In theory the edges may be returned in any order, but typically the edges are organized as a collection of edge chains where each chain represents one polygon loop. Polygons may have degeneracies (e.g., degenerate edges or sibling pairs consisting of an edge and its corresponding reversed edge). A polygon loop may also be full (containing all points on the sphere); by convention this is represented as a chain with no edges. (See laxPolygon for details.)
This method allows degenerate geometry of different dimensions to be distinguished, e.g. it allows a point to be distinguished from a polyline or polygon that has been simplified to a single point.
Beta
Returns the edge for the given edge index.
Beta
Beta
Beta
Beta
Beta
Reports whether the Shape contains no points. (Note that the full polygon is represented as a chain with zero edges.)
Beta
Beta
Reports whether the Shape contains all points on the sphere.
Beta
Beta
Beta
Beta
Reports the number of contiguous edge chains in the shape. For example, a shape whose edges are [AB, BC, CD, AE, EF] would consist of two chains (AB,BC,CD and AE,EF). Every chain is assigned a chain Id numbered sequentially starting from zero.
Note that it is always acceptable to implement this method by returning numEdges, i.e. every chain consists of a single edge, but this may reduce the efficiency of some algorithms.
Beta
Returns the number of edges in this shape.
Beta
Beta
We do not support implementations of this interface outside this package.
Beta
Returns an arbitrary reference point for the shape. (The containment boolean value must be false for shapes that do not have an interior.)
This reference point may then be used to compute the containment of other points by counting edge crossings.
Beta
Beta
Beta
Beta
Returns a value that can be used to identify the type of an encoded Shape.
Beta
Static
regularStatic
regular
Loop represents a simple spherical polygon. It consists of a sequence of vertices where the first vertex is implicitly connected to the last. All loops are defined to have a CCW orientation, i.e. the interior of the loop is on the left side of the edges. This implies that a clockwise loop enclosing a small area is interpreted to be a CCW loop enclosing a very large area.
Loops are not allowed to have any duplicate vertices (whether adjacent or not). Non-adjacent edges are not allowed to intersect, and furthermore edges of length 180 degrees are not allowed (i.e., adjacent vertices cannot be antipodal). Loops must have at least 3 vertices (except for the "empty" and "full" loops discussed below).
There are two special loops: the "empty" loop contains no points and the "full" loop contains all points. These loops do not have any edges, but to preserve the invariant that every loop can be represented as a vertex chain, they are defined as having exactly one vertex each (see EmptyLoop and FullLoop).
incomplete