Interface GeomFactory2afp<E extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,E,P,V,B>>
-
- Type Parameters:
E
- the types of the path elements.P
- is the type of the points.V
- is the type of the vectors.B
- is the type of the bounding boxes.
- All Superinterfaces:
GeomFactory2D<V,P>
,GeomFactoryBase
- All Known Implementing Classes:
GeomFactory2d
,GeomFactory2dfx
public interface GeomFactory2afp<E extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,E,P,V,B>> extends GeomFactory2D<V,P>
Factory of geometrical elements.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PathIterator2afp<?>
convert(PathIterator2D<?> iterator)
Replies thePathIterator2afp
that is corresponding to the given element.E
newArcPathElement(double startX, double startY, double targetX, double targetY, double radiusX, double radiusY, double xAxisRotation, boolean largeArcFlag, boolean sweepFlag)
Create an arc-to path element to the given point by following an ellipse arc.B
newBox()
Create an empty bounding box.B
newBox(double x, double y, double width, double height)
Create a bounding box.E
newClosePathElement(double lastPointX, double lastPointy, double firstPointX, double firstPointY)
Create a close path element.E
newCurvePathElement(double startX, double startY, double controlX, double controlY, double targetX, double targetY)
Create a quadratic curve path element to the given point through the given control point.E
newCurvePathElement(double startX, double startY, double controlX1, double controlY1, double controlX2, double controlY2, double targetX, double targetY)
Create a curve path element to the given point through the two given control points.E
newLinePathElement(double startX, double startY, double targetX, double targetY)
Create a line-to path element to the given point.E
newMovePathElement(double x, double y)
Create a move-to path element to the given point.MultiShape2afp<?,?,?,E,P,V,B>
newMultiShape()
Create an empty multishape.Path2afp<?,?,E,P,V,B>
newPath(PathWindingRule rule)
Create an empty path with the given winding rule.Segment2afp<?,?,E,P,V,B>
newSegment(double x1, double y1, double x2, double y2)
Create a segment.Triangle2afp<?,?,E,P,V,B>
newTriangle(double x1, double y1, double x2, double y2, double x3, double y3)
Create a triangle.-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.GeomFactory2D
convertToPoint, convertToPoint, convertToVector, convertToVector, newPoint, newPoint, newPoint, newVector, newVector, newVector
-
Methods inherited from interface org.arakhne.afc.math.geometry.GeomFactoryBase
getSplineApproximationRatio, setSplineApproximationRatio
-
-
-
-
Method Detail
-
newPath
Path2afp<?,?,E,P,V,B> newPath(PathWindingRule rule)
Create an empty path with the given winding rule.- Parameters:
rule
- the rule.- Returns:
- the new path.
-
newMultiShape
MultiShape2afp<?,?,?,E,P,V,B> newMultiShape()
Create an empty multishape.- Returns:
- the new multishape.
-
newBox
B newBox()
Create an empty bounding box.- Returns:
- the box.
-
newBox
B newBox(double x, double y, double width, double height)
Create a bounding box.- Parameters:
x
- the x coordinate of the lower corner.y
- the y coordinate of the lower corner.width
- the width of the box.height
- the height of the box.- Returns:
- the box.
-
newMovePathElement
E newMovePathElement(double x, double y)
Create a move-to path element to the given point.- Parameters:
x
- x coordinate of the target point.y
- y coordinate of the target point.- Returns:
- the path element.
-
newLinePathElement
E newLinePathElement(double startX, double startY, double targetX, double targetY)
Create a line-to path element to the given point.- Parameters:
startX
- x coordinate of the start point.startY
- y coordinate of the start point.targetX
- x coordinate of the target point.targetY
- y coordinate of the target point.- Returns:
- the path element.
-
newClosePathElement
E newClosePathElement(double lastPointX, double lastPointy, double firstPointX, double firstPointY)
Create a close path element.- Parameters:
lastPointX
- x coordinate of the last point on the pathlastPointy
- y coordinate of the last point on the pathfirstPointX
- x coordinate of the first point on the path.firstPointY
- y coordinate of the first point on the path.- Returns:
- the path element.
-
newCurvePathElement
E newCurvePathElement(double startX, double startY, double controlX, double controlY, double targetX, double targetY)
Create a quadratic curve path element to the given point through the given control point.- Parameters:
startX
- x coordinate of the start point.startY
- y coordinate of the start point.controlX
- x coordinate of the control point.controlY
- y coordinate of the control point.targetX
- x coordinate of the target point.targetY
- y coordinate of the target point.- Returns:
- the path element.
-
newCurvePathElement
E newCurvePathElement(double startX, double startY, double controlX1, double controlY1, double controlX2, double controlY2, double targetX, double targetY)
Create a curve path element to the given point through the two given control points.- Parameters:
startX
- x coordinate of the start point.startY
- y coordinate of the start point.controlX1
- x coordinate of the control point.controlY1
- y coordinate of the control point.controlX2
- x coordinate of the control point.controlY2
- y coordinate of the control point.targetX
- x coordinate of the target point.targetY
- y coordinate of the target point.- Returns:
- the path element.
-
newArcPathElement
E newArcPathElement(double startX, double startY, double targetX, double targetY, double radiusX, double radiusY, double xAxisRotation, boolean largeArcFlag, boolean sweepFlag)
Create an arc-to path element to the given point by following an ellipse arc.- Parameters:
startX
- x coordinate of the start point.startY
- y coordinate of the start point.targetX
- x coordinate of the target point.targetY
- y coordinate of the target point.radiusX
- the X radius of the tilted ellipse.radiusY
- the Y radius of the tilted ellipse.xAxisRotation
- the angle of tilt of the ellipse.largeArcFlag
-true
iff the path will sweep the long way around the ellipse.sweepFlag
-true
iff the path will sweep clockwise around the ellipse.- Returns:
- the path element.
-
newTriangle
Triangle2afp<?,?,E,P,V,B> newTriangle(double x1, double y1, double x2, double y2, double x3, double y3)
Create a triangle.- Parameters:
x1
- the x coordinate of the first point of the triangle.y1
- the y coordinate of the first point of the triangle.x2
- the x coordinate of the second point of the triangle.y2
- the y coordinate of the second point of the triangle.x3
- the x coordinate of the third point of the triangle.y3
- the y coordinate of the third point of the triangle.- Returns:
- the new triangle.
-
newSegment
Segment2afp<?,?,E,P,V,B> newSegment(double x1, double y1, double x2, double y2)
Create a segment.- Parameters:
x1
- the x coordinate of the first point of the segment.y1
- the y coordinate of the first point of the segment.x2
- the x coordinate of the second point of the segment.y2
- the y coordinate of the second point of the segment.- Returns:
- the new segment.
-
convert
default PathIterator2afp<?> convert(PathIterator2D<?> iterator)
Replies thePathIterator2afp
that is corresponding to the given element.If the given element is already a
PathIterator2afp
, returnsthis
.- Parameters:
iterator
- the iterator.- Returns:
- the iterator.
-
-