Class Path3ai.FlatteningPathIterator<E extends PathElement3ai>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.ai.Path3ai.FlatteningPathIterator<E>
-
- Type Parameters:
E- the type of the path elements.
- All Implemented Interfaces:
Iterator<E>,PathIterator3ai<E>,PathIterator3D<E>
- Enclosing interface:
- Path3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Path3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
public static class Path3ai.FlatteningPathIterator<E extends PathElement3ai> extends Object implements PathIterator3ai<E>
A path iterator that is flattening the path. This iterator was copied from AWT FlatteningPathIterator.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description FlatteningPathIterator(Path3ai<?,?,E,?,?,?> path, PathIterator3ai<? extends E> pathIterator, double flatness, int limit)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeomFactory3ai<E,?,?,?>getGeomFactory()Replies the factory of geometrical elements.PathWindingRulegetWindingRule()Replies the winding rule for the path.booleanhasNext()booleanisCurved()Replies the path contains a curve.booleanisMultiParts()Replies the path has multiple parts, i.e. multipleMOVE_TOare inside.booleanisPolygon()Replies the path is composed only by oneMOVE_TO, a sequence ofLINE_TOorQUAD_TOorCURVE_TO, and a singleCLOSEprimitives.booleanisPolyline()Replies the path is composed only by oneMOVE_TO, and a sequence ofLINE_TOprimitives.Enext()voidremove()PathIterator3ai<E>restartIterations()Replies a reset instance of this iterator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
FlatteningPathIterator
public FlatteningPathIterator(Path3ai<?,?,E,?,?,?> path, PathIterator3ai<? extends E> pathIterator, double flatness, int limit)
Constructor.- Parameters:
path- is the path.pathIterator- is the path iterator that may be used to initialize the path.flatness- the maximum allowable distance between the control points and the flattened curvelimit- the maximum number of recursive subdivisions allowed for any curved segment
-
-
Method Detail
-
restartIterations
public PathIterator3ai<E> restartIterations()
Description copied from interface:PathIterator3DReplies a reset instance of this iterator.The reset instance enables to restart iterations with the replied iterator.
- Specified by:
restartIterationsin interfacePathIterator3ai<E extends PathElement3ai>- Specified by:
restartIterationsin interfacePathIterator3D<E extends PathElement3ai>- Returns:
- the reset iterator.
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<E extends PathElement3ai>
-
next
public E next()
- Specified by:
nextin interfaceIterator<E extends PathElement3ai>
-
remove
public void remove()
- Specified by:
removein interfaceIterator<E extends PathElement3ai>
-
getWindingRule
public PathWindingRule getWindingRule()
Description copied from interface:PathIterator3DReplies the winding rule for the path.- Specified by:
getWindingRulein interfacePathIterator3D<E extends PathElement3ai>- Returns:
- the winding rule for the path.
-
isPolyline
public boolean isPolyline()
Description copied from interface:PathIterator3DReplies the path is composed only by oneMOVE_TO, and a sequence ofLINE_TOprimitives.- Specified by:
isPolylinein interfacePathIterator3D<E extends PathElement3ai>- Returns:
trueif the path does not contain curve primitives,falseotherwise.
-
isCurved
public boolean isCurved()
Description copied from interface:PathIterator3DReplies the path contains a curve.- Specified by:
isCurvedin interfacePathIterator3D<E extends PathElement3ai>- Returns:
trueif the path contains curve primitives,falseotherwise.
-
isMultiParts
public boolean isMultiParts()
Description copied from interface:PathIterator3DReplies the path has multiple parts, i.e. multipleMOVE_TOare inside. primitives.- Specified by:
isMultiPartsin interfacePathIterator3D<E extends PathElement3ai>- Returns:
trueif the path has multiple move-to primitive,falseotherwise.
-
isPolygon
public boolean isPolygon()
Description copied from interface:PathIterator3DReplies the path is composed only by oneMOVE_TO, a sequence ofLINE_TOorQUAD_TOorCURVE_TO, and a singleCLOSEprimitives.- Specified by:
isPolygonin interfacePathIterator3D<E extends PathElement3ai>- Returns:
trueif the path does not contain curve primitives,falseotherwise.
-
getGeomFactory
public GeomFactory3ai<E,?,?,?> getGeomFactory()
Description copied from interface:PathIterator3aiReplies the factory of geometrical elements.- Specified by:
getGeomFactoryin interfacePathIterator3ai<E extends PathElement3ai>- Returns:
- the factory.
-
-