- java.lang.Object
-
- org.arakhne.afc.math.geometry.AbstractGeomFactoryBase
-
- org.arakhne.afc.math.geometry.d3.AbstractGeomFactory3D<Vector3i,Point3i>
-
- org.arakhne.afc.math.geometry.d3.i.GeomFactory3i
-
- All Implemented Interfaces:
GeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>,GeomFactory3D<Vector3i,Point3i>,GeomFactoryBase
public class GeomFactory3i extends AbstractGeomFactory3D<Vector3i,Point3i> implements GeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>
Factory of geometrical elements.- Since:
- 13.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 GeomFactory3iSINGLETONThe singleton of the factory.
-
Constructor Summary
Constructors Constructor Description GeomFactory3i()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point3iconvertToPoint(Point3D<?,?> point)Convert the given point if it is not of the right type.Point3iconvertToPoint(Vector3D<?,?> vector)Convert the given vector.Vector3iconvertToVector(Point3D<?,?> point)Convert the given point.Vector3iconvertToVector(Vector3D<?,?> vector)Convert the given vector.RectangularPrism3inewBox()Create an empty bounding box.RectangularPrism3inewBox(int x, int y, int z, int width, int height, int depth)Create a bounding box.PathElement3inewClosePathElement(int lastPointX, int lastPointY, int lastPointZ, int firstPointX, int firstPointY, int firstPointZ)Create a close path element.PathElement3inewCurvePathElement(int startX, int startY, int startZ, int controlX, int controlY, int controlZ, int targetX, int targetY, int targerZ)Create a quadratic curve path element to the given point through the given control point.PathElement3inewCurvePathElement(int startX, int startY, int startZ, int controlX1, int controlY1, int controlZ1, int controlX2, int controlY2, int controlZ2, int targetX, int targetY, int targetZ)Create a curve path element to the given point through the two given control points.PathElement3inewLinePathElement(int startX, int startY, int startZ, int targetX, int targetY, int targetZ)Create a line-to path element to the given point.PathElement3inewMovePathElement(int x, int y, int z)Create a move-to path element to the given point.MultiShape3i<?>newMultiShape()Create an empty bounding box.Path3inewPath(PathWindingRule rule)Create an empty path with the given winding rule.Point3inewPoint()Create a point.Point3inewPoint(double x, double y, double z)Create a point.Point3inewPoint(int x, int y, int z)Create a point.QuaternionnewQuaternion(double attitude, double bank, double heading)Creates a Quaternion.QuaternionnewQuaternion(Vector3D<?,?> axis, double angle)Creates a Quaternion.Segment3inewSegment(int x1, int y1, int z1, int x2, int y2, int z2)Create a segment.Vector3inewVector()Create a vector.Vector3inewVector(double x, double y, double z)Create a vector.Vector3inewVector(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.ai.GeomFactory3ai
convert
-
Methods inherited from interface org.arakhne.afc.math.geometry.GeomFactoryBase
getSplineApproximationRatio, setSplineApproximationRatio
-
-
-
-
Field Detail
-
SINGLETON
public static final GeomFactory3i SINGLETON
The singleton of the factory.
-
-
Method Detail
-
convertToPoint
public Point3i convertToPoint(Point3D<?,?> point)
Description copied from interface:GeomFactory3DConvert the given point if it is not of the right type.- Specified by:
convertToPointin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
point- the point to convert.- Returns:
pif it is of typeP, or a copy ofp.
-
convertToPoint
public Point3i convertToPoint(Vector3D<?,?> vector)
Description copied from interface:GeomFactory3DConvert the given vector.- Specified by:
convertToPointin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
vector- the vector to convert.- Returns:
- the point.
-
convertToVector
public Vector3i convertToVector(Point3D<?,?> point)
Description copied from interface:GeomFactory3DConvert the given point.- Specified by:
convertToVectorin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
point- the point to convert.- Returns:
- the vector.
-
convertToVector
public Vector3i convertToVector(Vector3D<?,?> vector)
Description copied from interface:GeomFactory3DConvert the given vector.- Specified by:
convertToVectorin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
vector- the vector to convert.- Returns:
- the vector.
-
newPoint
public Point3i newPoint(int x, int y, int z)
Description copied from interface:GeomFactory3DCreate a point.- Specified by:
newPointin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
x- x coordinate of the point.y- y coordinate of the point.z- z coordinate of the point.- Returns:
- the point.
-
newPoint
public Point3i newPoint()
Description copied from interface:GeomFactory3DCreate a point.- Specified by:
newPointin interfaceGeomFactory3D<Vector3i,Point3i>- Returns:
- the point.
-
newPoint
public Point3i newPoint(double x, double y, double z)
Description copied from interface:GeomFactory3DCreate a point.- Specified by:
newPointin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
x- x coordinate of the point.y- y coordinate of the point.z- z coordinate of the point.- Returns:
- the point.
-
newVector
public Vector3i newVector(int x, int y, int z)
Description copied from interface:GeomFactory3DCreate a vector.- Specified by:
newVectorin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
x- x coordinate of the vector.y- y coordinate of the vector.z- z coordinate of the vector.- Returns:
- the vector.
-
newVector
public Vector3i newVector(double x, double y, double z)
Description copied from interface:GeomFactory3DCreate a vector.- Specified by:
newVectorin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
x- x coordinate of the vector.y- y coordinate of the vector.z- z coordinate of the vector.- Returns:
- the vector.
-
newVector
public Vector3i newVector()
Description copied from interface:GeomFactory3DCreate a vector.- Specified by:
newVectorin interfaceGeomFactory3D<Vector3i,Point3i>- Returns:
- the vector.
-
newPath
public Path3i newPath(PathWindingRule rule)
Description copied from interface:GeomFactory3aiCreate an empty path with the given winding rule.- Specified by:
newPathin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
rule- the rule.- Returns:
- the new path.
-
newBox
public RectangularPrism3i newBox()
Description copied from interface:GeomFactory3aiCreate an empty bounding box.- Specified by:
newBoxin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the box.
-
newBox
public RectangularPrism3i newBox(int x, int y, int z, int width, int height, int depth)
Description copied from interface:GeomFactory3aiCreate a bounding box.- Specified by:
newBoxin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
x- the x coordinate of the lower corner.y- the y coordinate of the lower corner.z- the z coordinate of the lower corner.width- the width of the box.height- the height of the box.depth- the depth of the box.- Returns:
- the box.
-
newMovePathElement
public PathElement3i newMovePathElement(int x, int y, int z)
Description copied from interface:GeomFactory3aiCreate a move-to path element to the given point.- Specified by:
newMovePathElementin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- 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 PathElement3i newLinePathElement(int startX, int startY, int startZ, int targetX, int targetY, int targetZ)
Description copied from interface:GeomFactory3aiCreate a line-to path element to the given point.- Specified by:
newLinePathElementin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- 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 PathElement3i newClosePathElement(int lastPointX, int lastPointY, int lastPointZ, int firstPointX, int firstPointY, int firstPointZ)
Description copied from interface:GeomFactory3aiCreate a close path element.- Specified by:
newClosePathElementin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Parameters:
lastPointX- x coordinate of the last point on the pathlastPointY- y coordinate of the last point on the pathlastPointZ- z coordinate of the last point on the pathfirstPointX- 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 PathElement3i newCurvePathElement(int startX, int startY, int startZ, int controlX, int controlY, int controlZ, int targetX, int targetY, int targerZ)
Description copied from interface:GeomFactory3aiCreate a quadratic curve path element to the given point through the given control point.- Specified by:
newCurvePathElementin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- 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.targerZ- z coordinate of the target point.- Returns:
- the path element.
-
newCurvePathElement
public PathElement3i newCurvePathElement(int startX, int startY, int startZ, int controlX1, int controlY1, int controlZ1, int controlX2, int controlY2, int controlZ2, int targetX, int targetY, int targetZ)
Description copied from interface:GeomFactory3aiCreate a curve path element to the given point through the two given control points.- Specified by:
newCurvePathElementin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- 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.
-
newSegment
public Segment3i newSegment(int x1, int y1, int z1, int x2, int y2, int z2)
Description copied from interface:GeomFactory3aiCreate a segment.- Specified by:
newSegmentin interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- 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 y 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 y coordinate of the second point of the segment.- Returns:
- the new segment.
-
newMultiShape
public MultiShape3i<?> newMultiShape()
Description copied from interface:GeomFactory3aiCreate an empty bounding box.- Specified by:
newMultiShapein interfaceGeomFactory3ai<PathElement3i,Point3i,Vector3i,RectangularPrism3i>- Returns:
- the box.
-
newQuaternion
public Quaternion newQuaternion(Vector3D<?,?> axis, double angle)
Description copied from interface:GeomFactory3DCreates a Quaternion.- Specified by:
newQuaternionin interfaceGeomFactory3D<Vector3i,Point3i>- 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:GeomFactory3DCreates a Quaternion.- Specified by:
newQuaternionin interfaceGeomFactory3D<Vector3i,Point3i>- Parameters:
attitude- the attitude of the quaternionbank- the bank of the quaternionheading- the heading of the quaternion- Returns:
- the quaternion
-
-