Package org.arakhne.afc.math.geometry.d1
Class ImmutableGeomFactory<S extends Segment1D<?,?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.AbstractGeomFactoryBase
-
- org.arakhne.afc.math.geometry.d1.AbstractGeomFactory1D<ImmutableVector1D<S>,ImmutablePoint1D<S>>
-
- org.arakhne.afc.math.geometry.d1.ImmutableGeomFactory<S>
-
- Type Parameters:
S- is the type of the segments.
- All Implemented Interfaces:
GeomFactory1D<ImmutableVector1D<S>,ImmutablePoint1D<S>>,GeomFactoryBase
final class ImmutableGeomFactory<S extends Segment1D<?,?>> extends AbstractGeomFactory1D<ImmutableVector1D<S>,ImmutablePoint1D<S>>
Factory of immutable geometrical primitives.- Since:
- 14.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
-
-
Field Summary
Fields Modifier and Type Field Description static ImmutableGeomFactorySINGLETONSingleton of the factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePoint1D<S>convertToPoint(Point1D<?,?,?> pt)Convert the given point if it is not of the right type.ImmutablePoint1D<S>convertToPoint(Vector1D<?,?,?> v)Convert the given vector if it is not of the right type.ImmutableVector1D<S>convertToVector(Point1D<?,?,?> pt)Convert the given point.ImmutableVector1D<S>convertToVector(Vector1D<?,?,?> v)Convert the given vector.ImmutablePoint1D<S>newPoint(Segment1D<?,?> segment)Create a point.ImmutablePoint1D<S>newPoint(Segment1D<?,?> segment, double x, double y)Create a point.ImmutablePoint1D<S>newPoint(Segment1D<?,?> segment, int x, int y)Create a point.ImmutableVector1D<S>newVector(Segment1D<?,?> segment)Create a vector.ImmutableVector1D<S>newVector(Segment1D<?,?> segment, double x, double y)Create a vector.ImmutableVector1D<S>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 ImmutableGeomFactory SINGLETON
Singleton of the factory.
-
-
Method Detail
-
convertToPoint
public ImmutablePoint1D<S> convertToPoint(Point1D<?,?,?> pt)
Description copied from interface:GeomFactory1DConvert the given point if it is not of the right type.- Parameters:
pt- the point to convert.- Returns:
pif it is of typeP, or a copy ofp.
-
convertToPoint
public ImmutablePoint1D<S> convertToPoint(Vector1D<?,?,?> v)
Description copied from interface:GeomFactory1DConvert the given vector if it is not of the right type.- Parameters:
v- the point to convert.- Returns:
- the point.
-
convertToVector
public ImmutableVector1D<S> convertToVector(Point1D<?,?,?> pt)
Description copied from interface:GeomFactory1DConvert the given point.- Parameters:
pt- the point to convert.- Returns:
- the vector.
-
convertToVector
public ImmutableVector1D<S> convertToVector(Vector1D<?,?,?> v)
Description copied from interface:GeomFactory1DConvert the given vector.- Parameters:
v- the vector to convert.- Returns:
- the vector.
-
newPoint
public ImmutablePoint1D<S> newPoint(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1DCreate a point.- Parameters:
segment- the segment.- Returns:
- the point.
-
newPoint
public ImmutablePoint1D<S> newPoint(Segment1D<?,?> segment, double x, double y)
Description copied from interface:GeomFactory1DCreate a point.- Parameters:
segment- the segment.x- x coordinate of the point.y- y coordinate of the point.- Returns:
- the point.
-
newPoint
public ImmutablePoint1D<S> newPoint(Segment1D<?,?> segment, int x, int y)
Description copied from interface:GeomFactory1DCreate a point.- Parameters:
segment- the segment.x- x coordinate of the point.y- y coordinate of the point.- Returns:
- the point.
-
newVector
public ImmutableVector1D<S> newVector(Segment1D<?,?> segment)
Description copied from interface:GeomFactory1DCreate a vector.- Parameters:
segment- the segment.- Returns:
- the vector.
-
newVector
public ImmutableVector1D<S> newVector(Segment1D<?,?> segment, double x, double y)
Description copied from interface:GeomFactory1DCreate a vector.- Parameters:
segment- the segment.x- x coordinate of the vector.y- y coordinate of the vector.- Returns:
- the vector.
-
newVector
public ImmutableVector1D<S> newVector(Segment1D<?,?> segment, int x, int y)
Description copied from interface:GeomFactory1DCreate a vector.- Parameters:
segment- the segment.x- x coordinate of the vector.y- y coordinate of the vector.- Returns:
- the vector.
-
-