Class GeomFactory1dfx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.AbstractGeomFactoryBase
-
- org.arakhne.afc.math.geometry.d1.AbstractGeomFactory1D<Vector1dfx,Point1dfx>
-
- org.arakhne.afc.math.geometry.d1.dfx.GeomFactory1dfx
-
- All Implemented Interfaces:
GeomFactory1afp<Point1dfx,Vector1dfx,Segment1D<?,?>,Rectangle1dfx>
,GeomFactory1D<Vector1dfx,Point1dfx>
,GeomFactoryBase
public class GeomFactory1dfx extends AbstractGeomFactory1D<Vector1dfx,Point1dfx> implements GeomFactory1afp<Point1dfx,Vector1dfx,Segment1D<?,?>,Rectangle1dfx>
Factory of geometrical elements.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Field Summary
Fields Modifier and Type Field Description static GeomFactory1dfx
SINGLETON
The singleton of the factory.
-
Constructor Summary
Constructors Constructor Description GeomFactory1dfx()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point1dfx
convertToPoint(Point1D<?,?,?> pt)
Convert the given point if it is not of the right type.Point1dfx
convertToPoint(Vector1D<?,?,?> vector)
Convert the given vector if it is not of the right type.Vector1dfx
convertToVector(Point1D<?,?,?> pt)
Convert the given point.Vector1dfx
convertToVector(Vector1D<?,?,?> vector)
Convert the given vector.Rectangle1dfx
newBox(Segment1D<?,?> segment)
Create an empty bounding box.Rectangle1dfx
newBox(Segment1D<?,?> segment, double x, double y, double width, double height)
Create a bounding box.Point1dfx
newPoint(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Create a point with properties.Point1dfx
newPoint(Segment1D<?,?> segment)
Create a point.Point1dfx
newPoint(Segment1D<?,?> segment, double x, double y)
Create a point.Point1dfx
newPoint(Segment1D<?,?> segment, int x, int y)
Create a point.Vector1dfx
newVector(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Create a vector with properties.Vector1dfx
newVector(Segment1D<?,?> segment)
Create a vector.Vector1dfx
newVector(Segment1D<?,?> segment, double x, double y)
Create a vector.Vector1dfx
newVector(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 GeomFactory1dfx SINGLETON
The singleton of the factory.
-
-
Method Detail
-
convertToPoint
public Point1dfx convertToPoint(Point1D<?,?,?> pt)
Description copied from interface:GeomFactory1D
Convert the given point if it is not of the right type.- Specified by:
convertToPoint
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
pt
- the point to convert.- Returns:
p
if it is of typeP
, or a copy ofp
.
-
convertToPoint
public Point1dfx convertToPoint(Vector1D<?,?,?> vector)
Description copied from interface:GeomFactory1D
Convert the given vector if it is not of the right type.- Specified by:
convertToPoint
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
vector
- the point to convert.- Returns:
- the point.
-
convertToVector
public Vector1dfx convertToVector(Point1D<?,?,?> pt)
Description copied from interface:GeomFactory1D
Convert the given point.- Specified by:
convertToVector
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
pt
- the point to convert.- Returns:
- the vector.
-
convertToVector
public Vector1dfx convertToVector(Vector1D<?,?,?> vector)
Description copied from interface:GeomFactory1D
Convert the given vector.- Specified by:
convertToVector
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
vector
- the vector to convert.- Returns:
- the vector.
-
newPoint
public Point1dfx newPoint(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Create a point with properties.- Parameters:
segment
- the segment property.x
- the x property.y
- the y property.- Returns:
- the point.
-
newPoint
public Point1dfx newPoint(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1D
Create a point.- Specified by:
newPoint
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
segment
- the segment.- Returns:
- the point.
-
newPoint
public Point1dfx newPoint(Segment1D<?,?> segment, double x, double y)
Description copied from interface:GeomFactory1D
Create a point.- Specified by:
newPoint
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
segment
- the segment.x
- x coordinate of the point.y
- y coordinate of the point.- Returns:
- the point.
-
newPoint
public Point1dfx newPoint(Segment1D<?,?> segment, int x, int y)
Description copied from interface:GeomFactory1D
Create a point.- Specified by:
newPoint
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
segment
- the segment.x
- x coordinate of the point.y
- y coordinate of the point.- Returns:
- the point.
-
newVector
public Vector1dfx newVector(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Create a vector with properties.- Parameters:
segment
- the segment property.x
- the x property.y
- the y property.- Returns:
- the vector.
-
newVector
public Vector1dfx newVector(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1D
Create a vector.- Specified by:
newVector
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
segment
- the segment.- Returns:
- the vector.
-
newVector
public Vector1dfx newVector(Segment1D<?,?> segment, double x, double y)
Description copied from interface:GeomFactory1D
Create a vector.- Specified by:
newVector
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
segment
- the segment.x
- x coordinate of the vector.y
- y coordinate of the vector.- Returns:
- the vector.
-
newVector
public Vector1dfx newVector(Segment1D<?,?> segment, int x, int y)
Description copied from interface:GeomFactory1D
Create a vector.- Specified by:
newVector
in interfaceGeomFactory1D<Vector1dfx,Point1dfx>
- Parameters:
segment
- the segment.x
- x coordinate of the vector.y
- y coordinate of the vector.- Returns:
- the vector.
-
newBox
public Rectangle1dfx newBox(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1afp
Create an empty bounding box.- Specified by:
newBox
in interfaceGeomFactory1afp<Point1dfx,Vector1dfx,Segment1D<?,?>,Rectangle1dfx>
- Parameters:
segment
- the segment.- Returns:
- the box.
-
newBox
public Rectangle1dfx newBox(Segment1D<?,?> segment, double x, double y, double width, double height)
Description copied from interface:GeomFactory1afp
Create a bounding box.- Specified by:
newBox
in interfaceGeomFactory1afp<Point1dfx,Vector1dfx,Segment1D<?,?>,Rectangle1dfx>
- 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.
-
-