Module org.apache.lucene.spatial3d
Package org.apache.lucene.spatial3d.geom
Class GeoPolygonFactory.EdgeBuffer
java.lang.Object
org.apache.lucene.spatial3d.geom.GeoPolygonFactory.EdgeBuffer
- Enclosing class:
GeoPolygonFactory
Class representing a pool of unused edges, all linked together by vertices.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Set<GeoPolygonFactory.Edge> Full set of edgesprotected final Map<GeoPolygonFactory.Edge, GeoPolygonFactory.Edge> Map to next edgeprotected GeoPolygonFactory.EdgeStarting edgeprotected final Map<GeoPolygonFactory.Edge, GeoPolygonFactory.Edge> Map to previous edge -
Constructor Summary
ConstructorsConstructorDescriptionEdgeBuffer(List<GeoPoint> pointList, BitSet internalEdges, int startPlaneStartIndex, int startPlaneEndIndex, SidedPlane startPlane) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all edges.getNext(GeoPolygonFactory.Edge currentEdge) Get the next edge.getPrevious(GeoPolygonFactory.Edge currentEdge) Get the previous edge.iterator()Get an iterator to iterate over edges.pickOne()Return a first edge.voidreplace(List<GeoPolygonFactory.Edge> removeList, GeoPolygonFactory.Edge newEdge) Replace a list of edges with a new edge.intsize()Get the size of the edge buffer.
-
Field Details
-
oneEdge
Starting edge -
edges
Full set of edges -
previousEdges
Map to previous edge -
nextEdges
Map to next edge
-
-
Constructor Details
-
EdgeBuffer
public EdgeBuffer(List<GeoPoint> pointList, BitSet internalEdges, int startPlaneStartIndex, int startPlaneEndIndex, SidedPlane startPlane) Constructor.- Parameters:
pointList- is the list of points.internalEdges- is the list of edges that are internal (includes return edge)startPlaneStartIndex- is the index of the startPlane's starting pointstartPlaneEndIndex- is the index of the startPlane's ending pointstartPlane- is the starting plane
-
-
Method Details
-
getPrevious
Get the previous edge.- Parameters:
currentEdge- is the current edge.- Returns:
- the previous edge, if found.
-
getNext
Get the next edge.- Parameters:
currentEdge- is the current edge.- Returns:
- the next edge, if found.
-
replace
Replace a list of edges with a new edge.- Parameters:
removeList- is the list of edges to remove.newEdge- is the edge to add.
-
clear
public void clear()Clear all edges. -
size
public int size()Get the size of the edge buffer.- Returns:
- the size.
-
iterator
Get an iterator to iterate over edges.- Returns:
- the iterator.
-
pickOne
Return a first edge.- Returns:
- the edge.
-