Class PathElement3i.CurvePathElement3i
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.i.PathElement3i
-
- org.arakhne.afc.math.geometry.d3.i.PathElement3i.CurvePathElement3i
-
- All Implemented Interfaces:
Serializable,Cloneable,PathElement3ai,PathElement3D
- Enclosing class:
- PathElement3i
static class PathElement3i.CurvePathElement3i extends PathElement3i
An element of the path that represents aCURVE_TO.- 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.arakhne.afc.math.geometry.d3.i.PathElement3i
PathElement3i.ClosePathElement3i, PathElement3i.CurvePathElement3i, PathElement3i.LinePathElement3i, PathElement3i.MovePathElement3i, PathElement3i.QuadPathElement3i
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d3.i.PathElement3i
toX, toY, toZ, type
-
-
Constructor Summary
Constructors Constructor Description CurvePathElement3i(int fromx, int fromy, int fromz, int ctrlx1, int ctrly1, int ctrlz1, int ctrlx2, int ctrly2, int ctrlz2, int tox, int toy, int toz)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetCtrlX1()Replies the x coordinate of the first control point.intgetCtrlX2()Replies the x coordinate of the second control point.intgetCtrlY1()Replies the y coordinate of the first control point.intgetCtrlY2()Replies the y coordinate of the second control point.intgetCtrlZ1()Replies the z coordinate of the first control point.intgetCtrlZ2()Replies the z coordinate of the second control point.intgetFromX()Replies the x coordinate of the starting point.intgetFromY()Replies the y coordinate of the starting point.intgetFromZ()Replies the z coordinate of the starting point.inthashCode()booleanisDrawable()Replies if the element is not empty and is drawable.booleanisEmpty()Replies if the element is empty, ie. the points are the same.int[]toArray()Copy the coords into an array, except the source point.voidtoArray(double[] array)Copy the coords into the given array, except the source point.voidtoArray(int[] array)Copy the coords into the given array, except the source point.
-
-
-
Constructor Detail
-
CurvePathElement3i
CurvePathElement3i(int fromx, int fromy, int fromz, int ctrlx1, int ctrly1, int ctrlz1, int ctrlx2, int ctrly2, int ctrlz2, int tox, int toy, int toz)Constructor.- Parameters:
fromx- x coordinate of the origin point.fromy- y coordinate of the origin point.fromz- z coordinate of the origin point.ctrlx1- x coordinate of the first control point.ctrly1- y coordinate of the first control point.ctrlz1- z coordinate of the first control point.ctrlx2- x coordinate of the second control point.ctrly2- y coordinate of the second control point.ctrlz2- z coordinate of the second control point.tox- x coordinate of the target point.toy- y coordinate of the target point.toz- z coordinate of the target point.
-
-
Method Detail
-
equals
@Pure public boolean equals(Object obj)
- Specified by:
equalsin classPathElement3i
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classPathElement3i
-
isEmpty
@Pure public boolean isEmpty()
Description copied from interface:PathElement3DReplies if the element is empty, ie. the points are the same.- Returns:
trueif the points are the same; otherwisefalse.
-
isDrawable
@Pure public boolean isDrawable()
Description copied from interface:PathElement3DReplies if the element is not empty and is drawable.Only the path elements that may produce pixels on the screen must reply
truein this function.- Returns:
trueif the path element is drawable; otherwisefalse.
-
toArray
public void toArray(int[] array)
Description copied from interface:PathElement3aiCopy the coords into the given array, except the source point.- Parameters:
array- the output array.
-
toArray
public void toArray(double[] array)
Description copied from interface:PathElement3aiCopy the coords into the given array, except the source point.- Parameters:
array- the output array.
-
toArray
@Pure public int[] toArray()
Description copied from class:PathElement3iCopy the coords into an array, except the source point.- Specified by:
toArrayin classPathElement3i- Returns:
- the array of the points, except the source point.
-
getFromX
public int getFromX()
Description copied from interface:PathElement3aiReplies the x coordinate of the starting point.- Returns:
- the x coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO.
-
getFromY
public int getFromY()
Description copied from interface:PathElement3aiReplies the y coordinate of the starting point.- Returns:
- the y coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO.
-
getFromZ
public int getFromZ()
Description copied from interface:PathElement3aiReplies the z coordinate of the starting point.- Returns:
- the z coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO.
-
getCtrlX1
public int getCtrlX1()
Description copied from interface:PathElement3aiReplies the x coordinate of the first control point.- Returns:
- the x coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO, orPathElementType.CLOSE.
-
getCtrlY1
public int getCtrlY1()
Description copied from interface:PathElement3aiReplies the y coordinate of the first control point.- Returns:
- the y coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO, orPathElementType.CLOSE.
-
getCtrlZ1
public int getCtrlZ1()
Description copied from interface:PathElement3aiReplies the z coordinate of the first control point.- Returns:
- the z coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO, orPathElementType.CLOSE.
-
getCtrlX2
public int getCtrlX2()
Description copied from interface:PathElement3aiReplies the x coordinate of the second control point.- Returns:
- the x coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO,PathElementType.QUAD_TO, orPathElementType.CLOSE.
-
getCtrlY2
public int getCtrlY2()
Description copied from interface:PathElement3aiReplies the y coordinate of the second control point.- Returns:
- the y coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO,PathElementType.QUAD_TO, orPathElementType.CLOSE.
-
getCtrlZ2
public int getCtrlZ2()
Description copied from interface:PathElement3aiReplies the z coordinate of the second control point.- Returns:
- the z coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO,PathElementType.QUAD_TO, orPathElementType.CLOSE.
-
-