- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.dfx.AbstractShape3dfx<Path3dfx>
-
- org.arakhne.afc.math.geometry.d3.dfx.Path3dfx
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Path3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
,Shape3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
,Shape3dfx<Path3dfx>
,Path3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
,Shape3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
,JsonableObject
public class Path3dfx extends AbstractShape3dfx<Path3dfx> implements Path3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
Path with 3 double precision floating-point FX properties.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND, Hamza JAFFALI, Thomas PIOTROWSKI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.afp.Path3afp
Path3afp.AbstractPathPathIterator<T extends PathElement3afp>, Path3afp.FlatteningPathIterator<T extends PathElement3afp>, Path3afp.PathPathIterator<T extends PathElement3afp>, Path3afp.PointCollection<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>, Path3afp.PointIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>, Path3afp.TransformedPathPathIterator<T extends PathElement3afp>
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.Path3D
Path3D.ArcType
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d3.dfx.AbstractShape3dfx
boundingBox
-
Fields inherited from interface org.arakhne.afc.math.geometry.d3.afp.Path3afp
DEFAULT_FLATENING_LIMIT, DEFAULT_WINDING_RULE, GROW_SIZE
-
-
Constructor Summary
Constructors Constructor Description Path3dfx()
Construct an empty path.Path3dfx(Iterator<PathElement3dfx> iterator)
Construct a path by copying the given elements.Path3dfx(Path3afp<?,?,?,?,?,?> path)
Constructor by copy.Path3dfx(PathWindingRule windingRule)
Construct a path with the given path winding rule.Path3dfx(PathWindingRule windingRule, Iterator<PathElement3dfx> iterator)
Construct a path by copying the given elements, and the given path winding rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ObjectProperty<RectangularPrism3dfx>
boundingBoxProperty()
Replies the property that contains the bounding box for this shape.void
clear()
Reset this shape to be equivalent to an just-created instance of this shape type.Path3dfx
clone()
Clone this shape.void
closePath()
Closes the current subpath by drawing a straight line back to the coordinates of the lastmoveTo
.boolean
containsControlPoint(Point3D<?,?> pt)
Replies if the given points exists in the coordinates of this path.javafx.beans.property.ObjectProperty<RectangularPrism3dfx>
controlPointBoundingBoxProperty()
Replies the property that corresponds to the bounding box of the control points.javafx.beans.property.ReadOnlyListProperty<Point3dfx>
coordinatesProperty()
Replies the coordinates property.void
curveTo(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3,y3)
, using the specified points(x1,y1)
and(x2,y2)
as Bézier control points.void
curveTo(Point3D<?,?> ctrl1, Point3D<?,?> ctrl2, Point3D<?,?> to)
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3,y3)
, using the specified points(x1,y1)
and(x2,y2)
as Bézier control points.double
getCoordAt(int index)
Replies the coordinate at the given index.Point3dfx
getCurrentPoint()
Replies the last point in the path.double
getCurrentX()
Replies the x coordinate of the last point in the path.double
getCurrentY()
Replies the y coordinate of the last point in the path.double
getCurrentZ()
Replies the z coordinate of the last point in the path.double
getLength()
Replies the total length of the path.int
getPathElementCount()
Replies the number of path elements in this path.PathElementType
getPathElementTypeAt(int index)
Replies the type of the path element at the given position in this path.Point3dfx
getPointAt(int index)
Replies the point at the given index.PathWindingRule
getWindingRule()
Replies the winding rule for the path.int
hashCode()
protected javafx.beans.property.ReadOnlyListWrapper<Point3dfx>
innerCoordinatesProperty()
Replies the private coordinates property.protected javafx.beans.property.ReadOnlyListWrapper<PathElementType>
innerTypesProperty()
Replies the private types property.boolean
isCurved()
Replies the path contains a curve..javafx.beans.property.BooleanProperty
isCurvedProperty()
Replies the isCurved property.boolean
isEmpty()
Replies if this shape is empty.javafx.beans.property.BooleanProperty
isEmptyProperty()
Replies the isEmpty property.boolean
isMultiParts()
Replies the path has multiple parts, i.e. multipleMOVE_TO
are inside.javafx.beans.property.BooleanProperty
isMultiPartsProperty()
Replies the isMultiParts property.boolean
isPolygon()
Replies the path is composed only by oneMOVE_TO
, a sequence ofLINE_TO
orQUAD_TO
orCURVE_TO
, and a singleCLOSE
primitives.javafx.beans.property.BooleanProperty
isPolygonProperty()
Replies the isPolygon property.boolean
isPolyline()
Replies the path is composed only by oneMOVE_TO
, and a sequence ofLINE_TO
primitives.javafx.beans.property.BooleanProperty
isPolylineProperty()
Replies the isPolyline property.javafx.beans.property.DoubleProperty
lengthProperty()
Replies the path length property.void
lineTo(double x, double y, double z)
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.void
lineTo(Point3D<?,?> to)
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.void
moveTo(double x, double y, double z)
Adds a point to the path by moving to the specified coordinates specified in double precision.void
moveTo(Point3D<?,?> position)
Adds a point to the path by moving to the specified coordinates specified in double precision.void
quadTo(double x1, double y1, double z1, double x2, double y2, double z2)
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2,y2)
, using the specified point(x1,y1)
as a quadratic parametric control point.void
quadTo(Point3D<?,?> ctrl, Point3D<?,?> to)
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2,y2)
, using the specified point(x1,y1)
as a quadratic parametric control point.boolean
remove(double x, double y, double z)
Remove the point with the given coordinates.boolean
remove(Point3D<?,?> point)
Remove the point from this path.void
removeLast()
Remove the last action.void
set(Path3dfx path)
Set this shape with the attributes of the given shape.void
setLastPoint(double x, double y, double z)
Change the coordinates of the last inserted point.void
setWindingRule(PathWindingRule rule)
Set the winding rule for the path.int
size()
Replies the number of points in the path.RectangularPrism3dfx
toBoundingBox()
Replies the bounding box of this shape.void
toBoundingBox(RectangularPrism3dfx box)
Replies the bounds of the shape.RectangularPrism3dfx
toBoundingBoxWithCtrlPoints()
Replies the bounding box of all the points added in this path.void
toBoundingBoxWithCtrlPoints(RectangularPrism3dfx box)
Compute the bounding box of all the points added in this path.double[]
toDoubleArray(Transform3D transform)
Replies the coordinates of this path in an array of double precision floating-point numbers.float[]
toFloatArray(Transform3D transform)
Replies the coordinates of this path in an array of single precision floating-point numbers.int[]
toIntArray(Transform3D transform)
Replies the coordinates of this path in an array of integer numbers.Point3dfx[]
toPointArray(Transform3D transform)
Replies the points of this path in an array.void
transform(Transform3D transform)
Transform the current path.void
translate(double dx, double dy, double dz)
Translate the shape.javafx.beans.property.ReadOnlyListProperty<PathElementType>
typesProperty()
Replies the types property.javafx.beans.property.ObjectProperty<PathWindingRule>
windingRuleProperty()
Replies the windingRule property.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.dfx.AbstractShape3dfx
equals, getGeomFactory, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Path3afp
add, contains, contains, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getLengthSquared, getPathIterator, getPathIterator, getPathIterator, intersects, intersects, intersects, intersects, intersects, intersects, set, setLastPoint, toCollection
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Path3D
toDoubleArray, toFloatArray, toIntArray, toPointArray
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Shape3afp
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Shape3D
equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Constructor Detail
-
Path3dfx
public Path3dfx()
Construct an empty path.
-
Path3dfx
public Path3dfx(Iterator<PathElement3dfx> iterator)
Construct a path by copying the given elements.- Parameters:
iterator
- the iterator that provides the elements to copy.
-
Path3dfx
public Path3dfx(PathWindingRule windingRule)
Construct a path with the given path winding rule.- Parameters:
windingRule
- the path winding rule.
-
Path3dfx
public Path3dfx(PathWindingRule windingRule, Iterator<PathElement3dfx> iterator)
Construct a path by copying the given elements, and the given path winding rule.- Parameters:
windingRule
- the path winding rule.iterator
- the iterator that provides the elements to copy.
-
Path3dfx
public Path3dfx(Path3afp<?,?,?,?,?,?> path)
Constructor by copy.- Parameters:
path
- the path to copy.
-
-
Method Detail
-
containsControlPoint
@Pure public boolean containsControlPoint(Point3D<?,?> pt)
Description copied from interface:Path3D
Replies if the given points exists in the coordinates of this path.- Specified by:
containsControlPoint
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
pt
- the point.- Returns:
true
if the point is a control point of the path.
-
clear
public void clear()
Description copied from interface:Shape3D
Reset this shape to be equivalent to an just-created instance of this shape type.- Specified by:
clear
in interfaceShape3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
-
clone
@Pure public Path3dfx clone()
Description copied from interface:Shape3D
Clone this shape.- Specified by:
clone
in interfaceShape3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Overrides:
clone
in classAbstractShape3dfx<Path3dfx>
- Returns:
- the clone.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape3dfx<Path3dfx>
-
translate
public void translate(double dx, double dy, double dz)
Description copied from interface:Shape3afp
Translate the shape.- Specified by:
translate
in interfaceShape3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
dx
- x translation.dy
- y translation.dz
- z translation.
-
transform
public void transform(Transform3D transform)
Description copied from interface:Path3afp
Transform the current path. This function changes the current path.- Specified by:
transform
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
transform
- is the affine transformation to apply.- See Also:
Shape3afp.createTransformedShape(org.arakhne.afc.math.geometry.d3.Transform3D)
-
isEmptyProperty
public javafx.beans.property.BooleanProperty isEmptyProperty()
Replies the isEmpty property.- Returns:
- the isEmpty property.
-
isEmpty
public boolean isEmpty()
Description copied from interface:Shape3D
Replies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.- Specified by:
isEmpty
in interfaceShape3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
true
if the shape is empty;false
otherwise.
-
toBoundingBox
public RectangularPrism3dfx toBoundingBox()
Description copied from interface:Shape3D
Replies the bounding box of this shape.- Specified by:
toBoundingBox
in interfaceShape3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
toBoundingBox
in interfaceShape3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the bounding box of this shape.
-
toBoundingBox
public void toBoundingBox(RectangularPrism3dfx box)
Description copied from interface:Shape3D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
toBoundingBox
in interfaceShape3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
box
- is set with the bounds of the shape.
-
windingRuleProperty
public javafx.beans.property.ObjectProperty<PathWindingRule> windingRuleProperty()
Replies the windingRule property.- Returns:
- the windingRule property.
-
getWindingRule
public PathWindingRule getWindingRule()
Description copied from interface:Path3D
Replies the winding rule for the path.- Specified by:
getWindingRule
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the winding rule for the path.
-
setWindingRule
public void setWindingRule(PathWindingRule rule)
Description copied from interface:Path3D
Set the winding rule for the path.- Specified by:
setWindingRule
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
rule
- is the winding rule for the path.
-
isPolylineProperty
public javafx.beans.property.BooleanProperty isPolylineProperty()
Replies the isPolyline property.- Returns:
- the isPolyline property.
-
isPolyline
public boolean isPolyline()
Description copied from interface:Path3D
Replies the path is composed only by oneMOVE_TO
, and a sequence ofLINE_TO
primitives.- Specified by:
isPolyline
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
isCurvedProperty
public javafx.beans.property.BooleanProperty isCurvedProperty()
Replies the isCurved property.- Returns:
- the isCurved property.
-
isCurved
public boolean isCurved()
Description copied from interface:Path3D
Replies the path contains a curve..- Specified by:
isCurved
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
isMultiPartsProperty
public javafx.beans.property.BooleanProperty isMultiPartsProperty()
Replies the isMultiParts property.- Returns:
- the isMultiParts property.
-
isMultiParts
public boolean isMultiParts()
Description copied from interface:Path3D
Replies the path has multiple parts, i.e. multipleMOVE_TO
are inside. primitives.- Specified by:
isMultiParts
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
true
if the path has multiple move-to primitive,false
otherwise.
-
isPolygonProperty
public javafx.beans.property.BooleanProperty isPolygonProperty()
Replies the isPolygon property.- Returns:
- the isPolygon property.
-
isPolygon
public boolean isPolygon()
Description copied from interface:Path3D
Replies the path is composed only by oneMOVE_TO
, a sequence ofLINE_TO
orQUAD_TO
orCURVE_TO
, and a singleCLOSE
primitives.- Specified by:
isPolygon
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
closePath
public void closePath()
Description copied from interface:Path3D
Closes the current subpath by drawing a straight line back to the coordinates of the lastmoveTo
. If the path is already closed or if the previous coordinates are for amoveTo
then this method has no effect.- Specified by:
closePath
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
-
toBoundingBoxWithCtrlPoints
public RectangularPrism3dfx toBoundingBoxWithCtrlPoints()
Description copied from interface:Path3D
Replies the bounding box of all the points added in this path.The replied bounding box includes the (invisible) control points.
- Specified by:
toBoundingBoxWithCtrlPoints
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the bounding box with the control points.
- See Also:
Shape3D.toBoundingBox()
-
toBoundingBoxWithCtrlPoints
public void toBoundingBoxWithCtrlPoints(RectangularPrism3dfx box)
Description copied from interface:Path3D
Compute the bounding box of all the points added in this path.The replied bounding box includes the (invisible) control points.
- Specified by:
toBoundingBoxWithCtrlPoints
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
box
- is the rectangle to set with the bounds.- See Also:
Shape3D.toBoundingBox()
-
toIntArray
public int[] toIntArray(Transform3D transform)
Description copied from interface:Path3D
Replies the coordinates of this path in an array of integer numbers.- Specified by:
toIntArray
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
transform
- is the transformation to apply to all the coordinates.- Returns:
- the coordinates.
-
toFloatArray
public float[] toFloatArray(Transform3D transform)
Description copied from interface:Path3D
Replies the coordinates of this path in an array of single precision floating-point numbers.- Specified by:
toFloatArray
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
transform
- is the transformation to apply to all the coordinates.- Returns:
- the coordinates.
-
toDoubleArray
public double[] toDoubleArray(Transform3D transform)
Description copied from interface:Path3D
Replies the coordinates of this path in an array of double precision floating-point numbers.- Specified by:
toDoubleArray
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
transform
- is the transformation to apply to all the coordinates.- Returns:
- the coordinates.
-
toPointArray
public Point3dfx[] toPointArray(Transform3D transform)
Description copied from interface:Path3D
Replies the points of this path in an array.- Specified by:
toPointArray
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
transform
- is the transformation to apply to all the points.- Returns:
- the points.
-
getPointAt
public Point3dfx getPointAt(int index)
Description copied from interface:Path3D
Replies the point at the given index. The index is in [0;Path3D.size()
).- Specified by:
getPointAt
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
index
- the index.- Returns:
- the point at the given index.
-
getCurrentX
@Pure public double getCurrentX()
Description copied from interface:Path3afp
Replies the x coordinate of the last point in the path.- Specified by:
getCurrentX
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the x coordinate of the last point in the path.
-
getCurrentY
@Pure public double getCurrentY()
Description copied from interface:Path3afp
Replies the y coordinate of the last point in the path.- Specified by:
getCurrentY
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the y coordinate of the last point in the path.
-
getCurrentZ
@Pure public double getCurrentZ()
Description copied from interface:Path3afp
Replies the z coordinate of the last point in the path.- Specified by:
getCurrentZ
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the z coordinate of the last point in the path.
-
getCurrentPoint
@Pure public Point3dfx getCurrentPoint()
Description copied from interface:Path3D
Replies the last point in the path.- Specified by:
getCurrentPoint
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
getCurrentPoint
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the last point.
-
size
public int size()
Description copied from interface:Path3D
Replies the number of points in the path.- Specified by:
size
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the number of points in the path.
-
removeLast
public void removeLast()
Description copied from interface:Path3D
Remove the last action.- Specified by:
removeLast
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
-
moveTo
public void moveTo(double x, double y, double z)
Description copied from interface:Path3afp
Adds a point to the path by moving to the specified coordinates specified in double precision.- Specified by:
moveTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x
- the specified X coordinatey
- the specified Y coordinatez
- the specified Y coordinate
-
moveTo
public void moveTo(Point3D<?,?> position)
Description copied from interface:Path3D
Adds a point to the path by moving to the specified coordinates specified in double precision.- Specified by:
moveTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
moveTo
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
position
- the new position.
-
lineTo
public void lineTo(double x, double y, double z)
Description copied from interface:Path3afp
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.- Specified by:
lineTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x
- the specified X coordinatey
- the specified Y coordinatez
- the specified Y coordinate
-
lineTo
public void lineTo(Point3D<?,?> to)
Description copied from interface:Path3D
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.- Specified by:
lineTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
lineTo
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
to
- the end point
-
quadTo
public void quadTo(double x1, double y1, double z1, double x2, double y2, double z2)
Description copied from interface:Path3afp
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2,y2)
, using the specified point(x1,y1)
as a quadratic parametric control point. All coordinates are specified in double precision.- Specified by:
quadTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x1
- the X coordinate of the quadratic control pointy1
- the Y coordinate of the quadratic control pointz1
- the Z coordinate of the quadratic control pointx2
- the X coordinate of the final end pointy2
- the Y coordinate of the final end pointz2
- the Y coordinate of the final end point
-
quadTo
public void quadTo(Point3D<?,?> ctrl, Point3D<?,?> to)
Description copied from interface:Path3D
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2,y2)
, using the specified point(x1,y1)
as a quadratic parametric control point. All coordinates are specified in double precision.- Specified by:
quadTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
quadTo
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
ctrl
- the quadratic control pointto
- the final end point
-
curveTo
public void curveTo(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
Description copied from interface:Path3afp
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3,y3)
, using the specified points(x1,y1)
and(x2,y2)
as Bézier control points. All coordinates are specified in double precision.- Specified by:
curveTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x1
- the X coordinate of the first Bézier control pointy1
- the Y coordinate of the first Bézier control pointz1
- the Z coordinate of the first Bézier control pointx2
- the X coordinate of the second Bézier control pointy2
- the Y coordinate of the second Bézier control pointz2
- the Z coordinate of the second Bézier control pointx3
- the X coordinate of the final end pointy3
- the Y coordinate of the final end pointz3
- the Z coordinate of the final end point
-
curveTo
public void curveTo(Point3D<?,?> ctrl1, Point3D<?,?> ctrl2, Point3D<?,?> to)
Description copied from interface:Path3D
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3,y3)
, using the specified points(x1,y1)
and(x2,y2)
as Bézier control points. All coordinates are specified in double precision.- Specified by:
curveTo
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
curveTo
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
ctrl1
- the first Bézier control pointctrl2
- the second Bézier control pointto
- the final end point
-
innerCoordinatesProperty
protected javafx.beans.property.ReadOnlyListWrapper<Point3dfx> innerCoordinatesProperty()
Replies the private coordinates property.- Returns:
- the private coordinates property.
-
coordinatesProperty
public javafx.beans.property.ReadOnlyListProperty<Point3dfx> coordinatesProperty()
Replies the coordinates property.- Returns:
- the coordinates property.
-
getCoordAt
public double getCoordAt(int index)
Description copied from interface:Path3afp
Replies the coordinate at the given index. The index is in [0;Path3D.size()
*2).- Specified by:
getCoordAt
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
index
- the index.- Returns:
- the coordinate at the given index.
-
setLastPoint
public void setLastPoint(double x, double y, double z)
Description copied from interface:Path3afp
Change the coordinates of the last inserted point.- Specified by:
setLastPoint
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x
- the new x coordinate of the last point.y
- the new y coordinate of the last point.z
- the new z coordinate of the last point.
-
remove
public boolean remove(double x, double y, double z)
Description copied from interface:Path3afp
Remove the point with the given coordinates.If the given coordinates do not match exactly a point in the path, nothing is removed.
- Specified by:
remove
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
x
- the x coordinate of the ponit to remove.y
- the y coordinate of the ponit to remove.z
- the z coordinate of the ponit to remove.- Returns:
true
if the point was removed;false
otherwise.
-
remove
public boolean remove(Point3D<?,?> point)
Remove the point from this path.If the given point do not match exactly a point in the path, nothing is removed.
- Parameters:
point
- the point to remove.- Returns:
true
if the point was removed;false
otherwise.
-
set
public void set(Path3dfx path)
Description copied from interface:Shape3D
Set this shape with the attributes of the given shape.- Specified by:
set
in interfaceShape3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
path
- the shape.
-
innerTypesProperty
protected javafx.beans.property.ReadOnlyListWrapper<PathElementType> innerTypesProperty()
Replies the private types property.- Returns:
- the private types property.
-
typesProperty
public javafx.beans.property.ReadOnlyListProperty<PathElementType> typesProperty()
Replies the types property.- Returns:
- the types property.
-
getPathElementCount
public int getPathElementCount()
Description copied from interface:Path3D
Replies the number of path elements in this path.- Specified by:
getPathElementCount
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the number of path elements.
- See Also:
Path3D.getPathElementTypeAt(int)
-
getPathElementTypeAt
public PathElementType getPathElementTypeAt(int index)
Description copied from interface:Path3D
Replies the type of the path element at the given position in this path.- Specified by:
getPathElementTypeAt
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Parameters:
index
- the index of the path element.- Returns:
- the type of the path element.
- See Also:
Path3D.getPathElementCount()
-
getLength
public double getLength()
Description copied from interface:Path3D
Replies the total length of the path.- Specified by:
getLength
in interfacePath3afp<Shape3dfx<?>,Path3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Specified by:
getLength
in interfacePath3D<Shape3dfx<?>,Path3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>
- Returns:
- the length of the path.
-
lengthProperty
public javafx.beans.property.DoubleProperty lengthProperty()
Replies the path length property.- Returns:
- the length property.
-
boundingBoxProperty
public javafx.beans.property.ObjectProperty<RectangularPrism3dfx> boundingBoxProperty()
Description copied from interface:Shape3dfx
Replies the property that contains the bounding box for this shape.- Specified by:
boundingBoxProperty
in interfaceShape3dfx<Path3dfx>
- Returns:
- the bounding box.
-
controlPointBoundingBoxProperty
public javafx.beans.property.ObjectProperty<RectangularPrism3dfx> controlPointBoundingBoxProperty()
Replies the property that corresponds to the bounding box of the control points.The replied box is not the one corresponding to the drawable elements, as replied by
boundingBoxProperty()
.- Returns:
- the bounding box of the control points.
-
-