Package org.arakhne.afc.math.geometry
Class AbstractGeomFactoryBase
- java.lang.Object
-
- org.arakhne.afc.math.geometry.AbstractGeomFactoryBase
-
- All Implemented Interfaces:
GeomFactoryBase
- Direct Known Subclasses:
AbstractGeomFactory1D
,AbstractGeomFactory2D
,AbstractGeomFactory3D
public abstract class AbstractGeomFactoryBase extends Object implements GeomFactoryBase
Abstract implementation of a factory of geometric 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
-
-
Constructor Summary
Constructors Constructor Description AbstractGeomFactoryBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
getGlobalSplineApproximationRatio()
The maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.double
getSplineApproximationRatio()
The maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.static void
setGlobalSplineApproximationRatio(Double distance)
Change the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.void
setSplineApproximationRatio(Double distance)
Change the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.
-
-
-
Method Detail
-
getGlobalSplineApproximationRatio
@Pure public static double getGlobalSplineApproximationRatio()
The maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.The replied value is the one shared (and may be overridden) by the geometry factories.
The default value of the ratio is specified by
GeomConstants.SPLINE_APPROXIMATION_RATIO
.- Returns:
- the maximal distance for approximating curves with segments.
- Since:
- 14.0
- See Also:
GeomConstants.SPLINE_APPROXIMATION_RATIO
-
setGlobalSplineApproximationRatio
public static void setGlobalSplineApproximationRatio(Double distance)
Change the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.The replied value is the one shared (and may be overridden) by the geometry factories.
The default value of the ratio is specified by
GeomConstants.SPLINE_APPROXIMATION_RATIO
.- Parameters:
distance
- the maximal distance for approximating curves with segments. If the argument value isnull
or NaN, the default value is assumed.- Since:
- 14.0
- See Also:
GeomConstants.SPLINE_APPROXIMATION_RATIO
-
getSplineApproximationRatio
@Pure public double getSplineApproximationRatio()
Description copied from interface:GeomFactoryBase
The maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.The replied value is one of:
- the ratio specifically defined within this factory, by a call to
GeomFactoryBase.setSplineApproximationRatio(Double)
. - the global ratio (shared among all the factories) replied by
getGlobalSplineApproximationRatio()
and defined by a call tosetGlobalSplineApproximationRatio(Double)
. - the value defined by
GeomConstants.SPLINE_APPROXIMATION_RATIO
.
- Specified by:
getSplineApproximationRatio
in interfaceGeomFactoryBase
- Returns:
- the maximal distance for approximating curves with segments.
- the ratio specifically defined within this factory, by a call to
-
setSplineApproximationRatio
public void setSplineApproximationRatio(Double distance)
Description copied from interface:GeomFactoryBase
Change the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.This function changes the ratio defined within the current factory. The other factories and the global value are not changed. For changing the global value, you must call
setGlobalSplineApproximationRatio(Double)
.- Specified by:
setSplineApproximationRatio
in interfaceGeomFactoryBase
- Parameters:
distance
- the maximal distance for approximating curves with segments. If the argument value isnull
or NaN, the global definition of the ratio is used by this factory.
-
-