Class GeomFactory3dfx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.AbstractGeomFactoryBase
-
- org.arakhne.afc.math.geometry.d3.AbstractGeomFactory3D<Vector3dfx,Point3dfx>
-
- org.arakhne.afc.math.geometry.d3.dfx.GeomFactory3dfx
-
- All Implemented Interfaces:
GeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
,GeomFactory3D<Vector3dfx,Point3dfx>
,GeomFactoryBase
public class GeomFactory3dfx extends AbstractGeomFactory3D<Vector3dfx,Point3dfx> implements GeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
Factory of geometrical elements.- Since:
- 13.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 GeomFactory3dfx
SINGLETON
The singleton of the factory.
-
Constructor Summary
Constructors Constructor Description GeomFactory3dfx()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point3dfx
convertToPoint(Point3D<?,?> pt)
Convert the given point if it is not of the right type.Point3dfx
convertToPoint(Vector3D<?,?> v)
Convert the given vector.Vector3dfx
convertToVector(Point3D<?,?> pt)
Convert the given point.Vector3dfx
convertToVector(Vector3D<?,?> v)
Convert the given vector.RectangularPrism3dfx
newBox()
Create an empty bounding box.RectangularPrism3dfx
newBox(double x, double y, double z, double width, double height, double depth)
Create a bounding box.PathElement3dfx
newClosePathElement(double lastPointX, double lastPointY, double lastPointZ, double firstPointX, double firstPointY, double firstPointZ)
Create a close path element.PathElement3dfx
newCurvePathElement(double startX, double startY, double startZ, double controlX, double controlY, double controlZ, double targetX, double targetY, double targetZ)
Create a quadratic curve path element to the given point through the given control point.PathElement3dfx
newCurvePathElement(double startX, double startY, double startZ, double controlX1, double controlY1, double controlZ1, double controlX2, double controlY2, double controlZ2, double targetX, double targetY, double targetZ)
Create a curve path element to the given point through the two given control points.PathElement3dfx
newLinePathElement(double startX, double startY, double startZ, double targetX, double targetY, double targetZ)
Create a line-to path element to the given point.PathElement3dfx
newMovePathElement(double x, double y, double z)
Create a move-to path element to the given point.MultiShape3dfx<?>
newMultiShape()
Create an empty multishape.Path3afp<?,?,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
newPath(PathWindingRule rule)
Create an empty path with the given winding rule.Point3dfx
newPoint()
Create a point.Point3dfx
newPoint(double x, double y, double z)
Create a point.Point3dfx
newPoint(int x, int y, int z)
Create a point.Point3dfx
newPoint(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y, javafx.beans.property.DoubleProperty z)
Create a point with properties.Quaternion
newQuaternion(double attitude, double bank, double heading)
Creates a Quaternion.Quaternion
newQuaternion(Vector3D<?,?> axis, double angle)
Creates a Quaternion.Segment3dfx
newSegment(double x1, double y1, double z1, double x2, double y2, double z2)
Create a segment.Vector3dfx
newVector()
Create a vector.Vector3dfx
newVector(double x, double y, double z)
Create a vector.Vector3dfx
newVector(int x, int y, int z)
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.d3.afp.GeomFactory3afp
convert
-
Methods inherited from interface org.arakhne.afc.math.geometry.GeomFactoryBase
getSplineApproximationRatio, setSplineApproximationRatio
-
-
-
-
Field Detail
-
SINGLETON
public static final GeomFactory3dfx SINGLETON
The singleton of the factory.
-
-
Method Detail
-
convertToPoint
public Point3dfx convertToPoint(Point3D<?,?> pt)
Description copied from interface:GeomFactory3D
Convert the given point if it is not of the right type.- Specified by:
convertToPoint
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
pt
- the point to convert.- Returns:
p
if it is of typeP
, or a copy ofp
.
-
convertToPoint
public Point3dfx convertToPoint(Vector3D<?,?> v)
Description copied from interface:GeomFactory3D
Convert the given vector.- Specified by:
convertToPoint
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
v
- the vector to convert.- Returns:
- the point.
-
convertToVector
public Vector3dfx convertToVector(Point3D<?,?> pt)
Description copied from interface:GeomFactory3D
Convert the given point.- Specified by:
convertToVector
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
pt
- the point to convert.- Returns:
- the vector.
-
convertToVector
public Vector3dfx convertToVector(Vector3D<?,?> v)
Description copied from interface:GeomFactory3D
Convert the given vector.- Specified by:
convertToVector
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
v
- the vector to convert.- Returns:
- the vector.
-
newPoint
public Point3dfx newPoint(double x, double y, double z)
Description copied from interface:GeomFactory3D
Create a point.- Specified by:
newPoint
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
x
- x coordinate of the point.y
- y coordinate of the point.z
- z coordinate of the point.- Returns:
- the point.
-
newPoint
public Point3dfx newPoint(int x, int y, int z)
Description copied from interface:GeomFactory3D
Create a point.- Specified by:
newPoint
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
x
- x coordinate of the point.y
- y coordinate of the point.z
- z coordinate of the point.- Returns:
- the point.
-
newPoint
public Point3dfx newPoint(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y, javafx.beans.property.DoubleProperty z)
Create a point with properties.- Parameters:
x
- the x property.y
- the y property.z
- the z property.- Returns:
- the vector.
-
newPoint
public Point3dfx newPoint()
Description copied from interface:GeomFactory3D
Create a point.- Specified by:
newPoint
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Returns:
- the point.
-
newVector
public Vector3dfx newVector(double x, double y, double z)
Description copied from interface:GeomFactory3D
Create a vector.- Specified by:
newVector
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
x
- x coordinate of the vector.y
- y coordinate of the vector.z
- z coordinate of the vector.- Returns:
- the vector.
-
newVector
public Vector3dfx newVector(int x, int y, int z)
Description copied from interface:GeomFactory3D
Create a vector.- Specified by:
newVector
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
x
- x coordinate of the vector.y
- y coordinate of the vector.z
- z coordinate of the vector.- Returns:
- the vector.
-
newVector
public Vector3dfx newVector()
Description copied from interface:GeomFactory3D
Create a vector.- Specified by:
newVector
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Returns:
- the vector.
-
newBox
public RectangularPrism3dfx newBox()
Description copied from interface:GeomFactory3afp
Create an empty bounding box.- Specified by:
newBox
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the box.
-
newBox
public RectangularPrism3dfx newBox(double x, double y, double z, double width, double height, double depth)
Description copied from interface:GeomFactory3afp
Create a bounding box.- Specified by:
newBox
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x
- the x coordinate of the front lower corner.y
- the y coordinate of the front lower corner.z
- the z coordinate of the front lower corner.width
- the width of the box.height
- the height of the box.depth
- the depth of the box.- Returns:
- the box.
-
newPath
public Path3afp<?,?,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx> newPath(PathWindingRule rule)
Description copied from interface:GeomFactory3afp
Create an empty path with the given winding rule.- Specified by:
newPath
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
rule
- the rule.- Returns:
- the new path.
-
newMovePathElement
public PathElement3dfx newMovePathElement(double x, double y, double z)
Description copied from interface:GeomFactory3afp
Create a move-to path element to the given point.- Specified by:
newMovePathElement
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x
- x coordinate of the target point.y
- y coordinate of the target point.z
- z coordinate of the target point.- Returns:
- the path element.
-
newLinePathElement
public PathElement3dfx newLinePathElement(double startX, double startY, double startZ, double targetX, double targetY, double targetZ)
Description copied from interface:GeomFactory3afp
Create a line-to path element to the given point.- Specified by:
newLinePathElement
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
startX
- x coordinate of the start point.startY
- y coordinate of the start point.startZ
- z coordinate of the start point.targetX
- x coordinate of the target point.targetY
- y coordinate of the target point.targetZ
- z coordinate of the target point.- Returns:
- the path element.
-
newClosePathElement
public PathElement3dfx newClosePathElement(double lastPointX, double lastPointY, double lastPointZ, double firstPointX, double firstPointY, double firstPointZ)
Description copied from interface:GeomFactory3afp
Create a close path element.- Specified by:
newClosePathElement
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
lastPointX
- x coordinate of the last point on the path.lastPointY
- y coordinate of the last point on the path.lastPointZ
- z coordinate of the last point on the path.firstPointX
- x coordinate of the first point on the path.firstPointY
- y coordinate of the first point on the path.firstPointZ
- z coordinate of the first point on the path.- Returns:
- the path element.
-
newCurvePathElement
public PathElement3dfx newCurvePathElement(double startX, double startY, double startZ, double controlX, double controlY, double controlZ, double targetX, double targetY, double targetZ)
Description copied from interface:GeomFactory3afp
Create a quadratic curve path element to the given point through the given control point.- Specified by:
newCurvePathElement
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
startX
- x coordinate of the start point.startY
- y coordinate of the start point.startZ
- z coordinate of the start point.controlX
- x coordinate of the control point.controlY
- y coordinate of the control point.controlZ
- z coordinate of the control point.targetX
- x coordinate of the target point.targetY
- y coordinate of the target point.targetZ
- z coordinate of the target point.- Returns:
- the path element.
-
newCurvePathElement
public PathElement3dfx newCurvePathElement(double startX, double startY, double startZ, double controlX1, double controlY1, double controlZ1, double controlX2, double controlY2, double controlZ2, double targetX, double targetY, double targetZ)
Description copied from interface:GeomFactory3afp
Create a curve path element to the given point through the two given control points.- Specified by:
newCurvePathElement
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
startX
- x coordinate of the start point.startY
- y coordinate of the start point.startZ
- z coordinate of the start point.controlX1
- x coordinate of the control point.controlY1
- y coordinate of the control point.controlZ1
- z coordinate of the control point.controlX2
- x coordinate of the control point.controlY2
- y coordinate of the control point.controlZ2
- z coordinate of the control point.targetX
- x coordinate of the target point.targetY
- y coordinate of the target point.targetZ
- z coordinate of the target point.- Returns:
- the path element.
-
newMultiShape
public MultiShape3dfx<?> newMultiShape()
Description copied from interface:GeomFactory3afp
Create an empty multishape.- Specified by:
newMultiShape
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the new multishape.
-
newSegment
public Segment3dfx newSegment(double x1, double y1, double z1, double x2, double y2, double z2)
Description copied from interface:GeomFactory3afp
Create a segment.- Specified by:
newSegment
in interfaceGeomFactory3afp<PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x1
- the x coordinate of the first point of the segment.y1
- the y coordinate of the first point of the segment.z1
- the z coordinate of the first point of the segment.x2
- the x coordinate of the second point of the segment.y2
- the y coordinate of the second point of the segment.z2
- the z coordinate of the second point of the segment.- Returns:
- the new segment.
-
newQuaternion
public Quaternion newQuaternion(Vector3D<?,?> axis, double angle)
Description copied from interface:GeomFactory3D
Creates a Quaternion.- Specified by:
newQuaternion
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
axis
- the axis of the quaternion.angle
- the angle of the quaternion.- Returns:
- the quaternion.
-
newQuaternion
public Quaternion newQuaternion(double attitude, double bank, double heading)
Description copied from interface:GeomFactory3D
Creates a Quaternion.- Specified by:
newQuaternion
in interfaceGeomFactory3D<Vector3dfx,Point3dfx>
- Parameters:
attitude
- the attitude of the quaternionbank
- the bank of the quaternionheading
- the heading of the quaternion- Returns:
- the quaternion
-
-