- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.d.PathElement3d
-
- All Implemented Interfaces:
Serializable
,Cloneable
,PathElement3afp
,PathElement3D
- Direct Known Subclasses:
PathElement3d.ClosePathElement3d
,PathElement3d.CurvePathElement3d
,PathElement3d.LinePathElement3d
,PathElement3d.MovePathElement3d
,PathElement3d.QuadPathElement3d
public abstract class PathElement3d extends Object implements PathElement3afp
An element of the path with 2 double precision floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PathElement3d.ClosePathElement3d
An element of the path that represents aCLOSE
.(package private) static class
PathElement3d.CurvePathElement3d
An element of the path that represents aCURVE_TO
.(package private) static class
PathElement3d.LinePathElement3d
An element of the path that represents aLINE_TO
.(package private) static class
PathElement3d.MovePathElement3d
An element of the path that represents aMOVE_TO
.(package private) static class
PathElement3d.QuadPathElement3d
An element of the path that represents aQUAD_TO
.
-
Field Summary
Fields Modifier and Type Field Description protected double
toX
Target point.protected double
toY
Target point.protected double
toZ
Target point.protected PathElementType
type
Type of the element.
-
Constructor Summary
Constructors Constructor Description PathElement3d(PathElementType type, double tox, double toy, double toz)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
equals(Object obj)
double
getToX()
Replies the x coordinate of the target point.double
getToY()
Replies the y coordinate of the target point.double
getToZ()
Replies the z coordinate of the target point.PathElementType
getType()
Replies the type of the element.abstract int
hashCode()
abstract double[]
toArray()
Copy the coords into an array, except the source point.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.PathElement3afp
getCtrlX1, getCtrlX2, getCtrlY1, getCtrlY2, getCtrlZ1, getCtrlZ2, getFromX, getFromY, getFromZ, toArray, toArray
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.PathElement3D
isDrawable, isEmpty
-
-
-
-
Field Detail
-
type
protected final PathElementType type
Type of the element.
-
toX
protected final double toX
Target point.
-
toY
protected final double toY
Target point.
-
toZ
protected final double toZ
Target point.
-
-
Constructor Detail
-
PathElement3d
PathElement3d(PathElementType type, double tox, double toy, double toz)
Constructor.- Parameters:
type
- is the type of the element.tox
- the x coordinate of the target point.toy
- the y coordinate of the target point.toz
- the z coordinate of the target point.
-
-
Method Detail
-
getToX
@Pure public final double getToX()
Description copied from interface:PathElement3afp
Replies the x coordinate of the target point.- Specified by:
getToX
in interfacePathElement3afp
- Returns:
- the x coordinate.
-
getToY
@Pure public final double getToY()
Description copied from interface:PathElement3afp
Replies the y coordinate of the target point.- Specified by:
getToY
in interfacePathElement3afp
- Returns:
- the y coordinate.
-
getToZ
@Pure public final double getToZ()
Description copied from interface:PathElement3afp
Replies the z coordinate of the target point.- Specified by:
getToZ
in interfacePathElement3afp
- Returns:
- the z coordinate.
-
getType
@Pure public final PathElementType getType()
Description copied from interface:PathElement3D
Replies the type of the element.- Specified by:
getType
in interfacePathElement3afp
- Specified by:
getType
in interfacePathElement3D
- Returns:
true
if the points are the same; otherwisefalse
.
-
toArray
@Pure public abstract double[] toArray()
Copy the coords into an array, except the source point.- Returns:
- the array of the points, except the source point.
-
-