Class LinePath.SimplifiedLinePath
java.lang.Object
org.apache.commons.geometry.euclidean.twod.path.LinePath
org.apache.commons.geometry.euclidean.twod.path.LinePath.SimplifiedLinePath
- All Implemented Interfaces:
BoundarySource<LineConvexSubset>
,Sized
,BoundarySource2D
,Linecastable2D
- Enclosing class:
LinePath
Internal class returned when a line path is simplified to remove unnecessary line subset divisions.
The
simplify()
method on this class simply returns the same instance.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.geometry.euclidean.twod.path.LinePath
LinePath.Builder
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SimplifiedLinePath
(List<LineConvexSubset> elements) Create a new instance containing the given line subsets. -
Method Summary
Modifier and TypeMethodDescriptionsimplify()
Simplify this path, if possible, by combining adjacent elements that lie on the same line (as determined byLine.equals(Object)
).Methods inherited from class org.apache.commons.geometry.euclidean.twod.path.LinePath
boundaryStream, builder, empty, from, from, fromVertexLoop, fromVertices, fromVertices, getElements, getEnd, getSize, getStart, getVertexSequence, isClosed, isEmpty, isFinite, isInfinite, reverse, toString, transform
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.geometry.euclidean.twod.BoundarySource2D
getBounds, linecast, linecastFirst, toList, toTree
Methods inherited from interface org.apache.commons.geometry.euclidean.twod.Linecastable2D
linecast, linecastFirst
-
Constructor Details
-
SimplifiedLinePath
Create a new instance containing the given line subsets. No validation is performed on the inputs. Caller must ensure that the given line subsets represent a valid, simplified path.- Parameters:
elements
- line subsets comprising the path
-
-
Method Details
-
simplify
Simplify this path, if possible, by combining adjacent elements that lie on the same line (as determined byLine.equals(Object)
).
-