- java.lang.Object
-
- org.arakhne.afc.math.geometry.AbstractGeomFactoryBase
-
- org.arakhne.afc.math.geometry.d1.AbstractGeomFactory1D<Vector1d,Point1d>
-
- org.arakhne.afc.math.geometry.d1.d.GeomFactory1d
-
- All Implemented Interfaces:
GeomFactory1afp<Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>,GeomFactory1D<Vector1d,Point1d>,GeomFactoryBase
public class GeomFactory1d extends AbstractGeomFactory1D<Vector1d,Point1d> implements GeomFactory1afp<Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
Factory of geometrical elements.- Since:
- 14.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
-
-
Field Summary
Fields Modifier and Type Field Description static GeomFactory1dSINGLETONThe singleton of the factory.
-
Constructor Summary
Constructors Constructor Description GeomFactory1d()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point1dconvertToPoint(Point1D<?,?,?> pt)Convert the given point if it is not of the right type.Point1dconvertToPoint(Vector1D<?,?,?> vector)Convert the given vector if it is not of the right type.Vector1dconvertToVector(Point1D<?,?,?> pt)Convert the given point.Vector1dconvertToVector(Vector1D<?,?,?> vector)Convert the given vector.Rectangle1dnewBox(Segment1D<?,?> segment)Create an empty bounding box.Rectangle1dnewBox(Segment1D<?,?> segment, double x, double y, double width, double height)Create a bounding box.Point1dnewPoint(Segment1D<?,?> segment)Create a point.Point1dnewPoint(Segment1D<?,?> segment, double x, double y)Create a point.Point1dnewPoint(Segment1D<?,?> segment, int x, int y)Create a point.Vector1dnewVector(Segment1D<?,?> segment)Create a vector.Vector1dnewVector(Segment1D<?,?> segment, double x, double y)Create a vector.Vector1dnewVector(Segment1D<?,?> segment, int x, int y)Create a vector.-
Methods inherited from class org.arakhne.afc.math.geometry.AbstractGeomFactoryBase
getGlobalSplineApproximationRatio, getSplineApproximationRatio, setGlobalSplineApproximationRatio, setSplineApproximationRatio
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.GeomFactoryBase
getSplineApproximationRatio, setSplineApproximationRatio
-
-
-
-
Field Detail
-
SINGLETON
public static final GeomFactory1d SINGLETON
The singleton of the factory.
-
-
Method Detail
-
convertToPoint
public Point1d convertToPoint(Point1D<?,?,?> pt)
Description copied from interface:GeomFactory1DConvert the given point if it is not of the right type.- Specified by:
convertToPointin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
pt- the point to convert.- Returns:
pif it is of typeP, or a copy ofp.
-
convertToPoint
public Point1d convertToPoint(Vector1D<?,?,?> vector)
Description copied from interface:GeomFactory1DConvert the given vector if it is not of the right type.- Specified by:
convertToPointin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
vector- the point to convert.- Returns:
- the point.
-
convertToVector
public Vector1d convertToVector(Point1D<?,?,?> pt)
Description copied from interface:GeomFactory1DConvert the given point.- Specified by:
convertToVectorin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
pt- the point to convert.- Returns:
- the vector.
-
convertToVector
public Vector1d convertToVector(Vector1D<?,?,?> vector)
Description copied from interface:GeomFactory1DConvert the given vector.- Specified by:
convertToVectorin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
vector- the vector to convert.- Returns:
- the vector.
-
newPoint
public Point1d newPoint(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1DCreate a point.- Specified by:
newPointin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
segment- the segment.- Returns:
- the point.
-
newPoint
public Point1d newPoint(Segment1D<?,?> segment, double x, double y)
Description copied from interface:GeomFactory1DCreate a point.- Specified by:
newPointin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
segment- the segment.x- x coordinate of the point.y- y coordinate of the point.- Returns:
- the point.
-
newPoint
public Point1d newPoint(Segment1D<?,?> segment, int x, int y)
Description copied from interface:GeomFactory1DCreate a point.- Specified by:
newPointin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
segment- the segment.x- x coordinate of the point.y- y coordinate of the point.- Returns:
- the point.
-
newVector
public Vector1d newVector(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1DCreate a vector.- Specified by:
newVectorin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
segment- the segment.- Returns:
- the vector.
-
newVector
public Vector1d newVector(Segment1D<?,?> segment, double x, double y)
Description copied from interface:GeomFactory1DCreate a vector.- Specified by:
newVectorin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
segment- the segment.x- x coordinate of the vector.y- y coordinate of the vector.- Returns:
- the vector.
-
newVector
public Vector1d newVector(Segment1D<?,?> segment, int x, int y)
Description copied from interface:GeomFactory1DCreate a vector.- Specified by:
newVectorin interfaceGeomFactory1D<Vector1d,Point1d>- Parameters:
segment- the segment.x- x coordinate of the vector.y- y coordinate of the vector.- Returns:
- the vector.
-
newBox
public Rectangle1d newBox(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1afpCreate an empty bounding box.- Specified by:
newBoxin interfaceGeomFactory1afp<Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Parameters:
segment- the segment.- Returns:
- the box.
-
newBox
public Rectangle1d newBox(Segment1D<?,?> segment, double x, double y, double width, double height)
Description copied from interface:GeomFactory1afpCreate a bounding box.- Specified by:
newBoxin interfaceGeomFactory1afp<Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Parameters:
segment- the segment.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.
-
-