Package com.google.common.geometry
Class S2Shape.MutableEdge
java.lang.Object
com.google.common.geometry.S2Shape.MutableEdge
- Enclosing interface:
S2Shape
A simple receiver for the endpoints of an edge.
invalid input: '<'>The S2Edge class is not suitable for retrieving large numbers of edges, as it
often triggers allocations. This class is intended to allow fast retrieval of the endpoints in
a single call.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) S2PointEndpoints of this edge last set by passing this instance toS2Shape.getEdge(int, MutableEdge).(package private) S2Point -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnd()Returns the trailing point of the last edge retrieved viaS2Shape.getEdge(int, MutableEdge), or null if no edge has been retrieved.getStart()Returns the leading point of the last edge retrieved viaS2Shape.getEdge(int, MutableEdge), or null if no edge has been retrieved.booleanisEndpoint(S2Point point) Returns true iff 'point' is either endpoint of this edge.voidCalled by implementations ofS2Shape.getEdge(int, MutableEdge)to update the endpoints of this mutable edge to the given values.
-
Field Details
-
a
S2Point aEndpoints of this edge last set by passing this instance toS2Shape.getEdge(int, MutableEdge). -
b
S2Point b
-
-
Constructor Details
-
MutableEdge
public MutableEdge()
-
-
Method Details
-
getStart
Returns the leading point of the last edge retrieved viaS2Shape.getEdge(int, MutableEdge), or null if no edge has been retrieved. -
getEnd
Returns the trailing point of the last edge retrieved viaS2Shape.getEdge(int, MutableEdge), or null if no edge has been retrieved. -
isEndpoint
Returns true iff 'point' is either endpoint of this edge. -
set
Called by implementations ofS2Shape.getEdge(int, MutableEdge)to update the endpoints of this mutable edge to the given values.
-