Package org.arakhne.afc.math.geometry.d2
Interface GeomFactory2D<V extends Vector2D<? super V,? super P>,P extends Point2D<? super P,? super V>>
-
- Type Parameters:
V
- the types of the vectors.P
- is the type of the points.
- All Superinterfaces:
GeomFactoryBase
- All Known Subinterfaces:
GeomFactory2afp<E,P,V,B>
,GeomFactory2ai<E,P,V,B>
- All Known Implementing Classes:
AbstractGeomFactory2D
,GeomFactory2d
,GeomFactory2dfx
,GeomFactory2i
,GeomFactory2ifx
,ImmutableGeomFactory
,InnerComputationGeomFactory
,InnerComputationGeomFactory
public interface GeomFactory2D<V extends Vector2D<? super V,? super P>,P extends Point2D<? super P,? super V>> extends GeomFactoryBase
Factory of geometrical primitives.- 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description P
convertToPoint(Point2D<?,?> pt)
Convert the given point if it is not of the right type.P
convertToPoint(Vector2D<?,?> vector)
Convert the given vector.V
convertToVector(Point2D<?,?> pt)
Convert the given point.V
convertToVector(Vector2D<?,?> vector)
Convert the given vector.P
newPoint()
Create a point.P
newPoint(double x, double y)
Create a point.P
newPoint(int x, int y)
Create a point.V
newVector()
Create a vector.V
newVector(double x, double y)
Create a vector.V
newVector(int x, int y)
Create a vector.-
Methods inherited from interface org.arakhne.afc.math.geometry.GeomFactoryBase
getSplineApproximationRatio, setSplineApproximationRatio
-
-
-
-
Method Detail
-
convertToPoint
@Pure P convertToPoint(Point2D<?,?> pt)
Convert the given point if it is not of the right type.- Parameters:
pt
- the point to convert.- Returns:
p
if it is of typeP
, or a copy ofp
.
-
convertToPoint
@Pure P convertToPoint(Vector2D<?,?> vector)
Convert the given vector.- Parameters:
vector
- the vector to convert.- Returns:
- the point.
-
convertToVector
@Pure V convertToVector(Point2D<?,?> pt)
Convert the given point.- Parameters:
pt
- the point to convert.- Returns:
- the vector.
-
convertToVector
@Pure V convertToVector(Vector2D<?,?> vector)
Convert the given vector.- Parameters:
vector
- the vector to convert.- Returns:
- the vector.
-
newPoint
@Pure P newPoint()
Create a point.- Returns:
- the point.
-
newPoint
@Pure P newPoint(double x, double y)
Create a point.- Parameters:
x
- x coordinate of the point.y
- y coordinate of the point.- Returns:
- the point.
-
newPoint
@Pure P newPoint(int x, int y)
Create a point.- Parameters:
x
- x coordinate of the point.y
- y coordinate of the point.- Returns:
- the point.
-
newVector
@Pure V newVector()
Create a vector.- Returns:
- the vector.
-
newVector
@Pure V newVector(double x, double y)
Create a vector.- Parameters:
x
- x coordinate of the vector.y
- y coordinate of the vector.- Returns:
- the vector.
-
newVector
@Pure V newVector(int x, int y)
Create a vector.- Parameters:
x
- x coordinate of the vector.y
- y coordinate of the vector.- Returns:
- the vector.
-
-