Package com.google.common.geometry
Class S2LaxPolygonShape.SimpleList
- java.lang.Object
-
- com.google.common.geometry.S2ShapeAspect.ChainAspect.Simple
-
- com.google.common.geometry.S2LaxPolygonShape.SimpleList
-
- All Implemented Interfaces:
S2LaxPolygonShape
,S2Shape
,S2ShapeAspect.ChainAspect
,S2ShapeAspect.EdgeAspect
,S2ShapeAspect.EdgeAspect.Closed
,S2ShapeAspect.Mixed
,S2ShapeAspect.TopoAspect
,S2ShapeAspect.VertexAspect
- Enclosing interface:
- S2LaxPolygonShape
public static class S2LaxPolygonShape.SimpleList extends S2ShapeAspect.ChainAspect.Simple implements S2LaxPolygonShape
A simple polygon with vertices referenced from aList
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.geometry.S2ShapeAspect.ChainAspect.Simple
S2ShapeAspect.ChainAspect.Simple.Array, S2ShapeAspect.ChainAspect.Simple.Packed, S2ShapeAspect.ChainAspect.Simple.Snapped
-
Nested classes/interfaces inherited from interface com.google.common.geometry.S2LaxPolygonShape
S2LaxPolygonShape.Coder, S2LaxPolygonShape.MultiArray, S2LaxPolygonShape.MultiList, S2LaxPolygonShape.MultiPacked, S2LaxPolygonShape.MultiSnapped, S2LaxPolygonShape.SimpleArray, S2LaxPolygonShape.SimpleList, S2LaxPolygonShape.SimplePacked, S2LaxPolygonShape.SimpleSnapped
-
Nested classes/interfaces inherited from interface com.google.common.geometry.S2Shape
S2Shape.MutableEdge, S2Shape.ReferencePoint
-
Nested classes/interfaces inherited from interface com.google.common.geometry.S2ShapeAspect.ChainAspect
S2ShapeAspect.ChainAspect.Multi, S2ShapeAspect.ChainAspect.Simple
-
Nested classes/interfaces inherited from interface com.google.common.geometry.S2ShapeAspect.EdgeAspect
S2ShapeAspect.EdgeAspect.Closed, S2ShapeAspect.EdgeAspect.Open
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<S2Point>
vertices
-
Fields inherited from interface com.google.common.geometry.S2LaxPolygonShape
CURRENT_ENCODING_VERSION, EMPTY, FULL
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SimpleList(java.util.List<S2Point> vertices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
numVertices()
Returns the number of vertices.S2Point
vertex(int vertexId)
Returns a vertex of this shape, from 0 (inclusive) toS2ShapeAspect.VertexAspect.numVertices()
(exclusive).-
Methods inherited from class com.google.common.geometry.S2ShapeAspect.ChainAspect.Simple
chainId, edgeId, getChainLength, getChainStart, numChains
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.common.geometry.S2LaxPolygonShape
containsOrigin, dimension, getReferencePoint, hasInterior, isEmpty, isFull, readResolve
-
Methods inherited from interface com.google.common.geometry.S2Shape
chain, chains, getChainLength, getChainStart, numChains
-
Methods inherited from interface com.google.common.geometry.S2ShapeAspect.ChainAspect
chainId, edgeId, getChainLength, getChainStart, numChains
-
Methods inherited from interface com.google.common.geometry.S2ShapeAspect.EdgeAspect
getChainEdge, getChainVertex, getEdge, numEdges
-
Methods inherited from interface com.google.common.geometry.S2ShapeAspect.EdgeAspect.Closed
adjustChains, getChainEdge, getChainVertex, getEdge, numEdges, vertexId
-
Methods inherited from interface com.google.common.geometry.S2ShapeAspect.TopoAspect
containsOrigin, dimension, hasInterior
-
Methods inherited from interface com.google.common.geometry.S2ShapeAspect.VertexAspect
vertices
-
-
-
-
Field Detail
-
vertices
private final java.util.List<S2Point> vertices
-
-
Constructor Detail
-
SimpleList
private SimpleList(java.util.List<S2Point> vertices)
-
-
Method Detail
-
numVertices
public int numVertices()
Description copied from interface:S2ShapeAspect.VertexAspect
Returns the number of vertices. May be different fromS2Shape.numEdges()
.- Specified by:
numVertices
in interfaceS2ShapeAspect.VertexAspect
-
vertex
public S2Point vertex(int vertexId)
Description copied from interface:S2ShapeAspect.VertexAspect
Returns a vertex of this shape, from 0 (inclusive) toS2ShapeAspect.VertexAspect.numVertices()
(exclusive).- Specified by:
vertex
in interfaceS2ShapeAspect.VertexAspect
-
-