Class Segment3dfx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.dfx.AbstractShape3dfx<Segment3dfx>
-
- org.arakhne.afc.math.geometry.d3.dfx.Segment3dfx
-
- All Implemented Interfaces:
Serializable,Cloneable,Segment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>,Shape3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>,Shape3dfx<Segment3dfx>,Shape3D<Shape3dfx<?>,Segment3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>,JsonableObject
public class Segment3dfx extends AbstractShape3dfx<Segment3dfx> implements Segment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>
A 3D segment/line with 3 double precision FX properties.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Thomas PIOTROWSKI, Stéphane GALLAND, Hamza JAFFALI
- 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.Segment3afp
Segment3afp.SegmentPathIterator<T extends PathElement3afp>, Segment3afp.UncertainIntersection
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d3.dfx.AbstractShape3dfx
boundingBox
-
-
Constructor Summary
Constructors Constructor Description Segment3dfx()Construct an empty segment.Segment3dfx(double x1, double y1, double z1, double x2, double y2, double z2)Construct a segment with the two given points.Segment3dfx(Segment3afp<?,?,?,?,?,?> segment)Constructor by copy.Segment3dfx(Point3dfx p1, Point3dfx p2)Construct a segment with the two given points.Segment3dfx(Segment3dfx segment)Constructor by setting.Segment3dfx(Point3D<?,?> p1, Point3D<?,?> p2)Construct a segment with the two given points.
-
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.Segment3dfxclone()Clone this shape.Segment3dfxcreateTransformedShape(Transform3D transform)Apply the transformation to the shape and reply the result.Point3dfxgetP1()Replies the first point.Point3dfxgetP2()Replies the second point.doublegetX1()Replies the X of the first point.doublegetX2()Replies the X of the second point.doublegetY1()Replies the Y of the first point.doublegetY2()Replies the Y of the second point.doublegetZ1()Replies the Z of the first point.doublegetZ2()Replies the Z of the second point.inthashCode()voidset(double x1, double y1, double z1, double x2, double y2, double z2)Change the line.voidsetP1(double x, double y, double z)Change the first point.voidsetP1(Point3dfx point)Set the point as the first point of this segment.voidsetP1(Point3D<?,?> point)Change the first point.voidsetP2(double x, double y, double z)Change the first point.voidsetP2(Point3dfx point)Set the point as the second point of this segment.voidsetP2(Point3D<?,?> point)Change the second point.voidsetX1(double x)Sets a new value in the X of the first point.voidsetX2(double x)Sets a new value in the X of the second point.voidsetY1(double y)Sets a new value in the Y of the first point.voidsetY2(double y)Sets a new value in the Y of the second point.voidsetZ1(double z)Sets a new value in the Z of the first point.voidsetZ2(double z)Sets a new value in the Z of the second point.javafx.beans.property.DoublePropertyx1Property()Replies the property that is the x coordinate of the first segment point.javafx.beans.property.DoublePropertyx2Property()Replies the property that is the x coordinate of the second segment point.javafx.beans.property.DoublePropertyy1Property()Replies the property that is the y coordinate of the first segment point.javafx.beans.property.DoublePropertyy2Property()Replies the property that is the y coordinate of the second segment point.javafx.beans.property.DoublePropertyz1Property()Replies the property that is the z coordinate of the first segment point.javafx.beans.property.DoublePropertyz2Property()Replies the property that is the z coordinate of the second segment point.-
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.Segment3afp
clear, clipToRectangle, contains, contains, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getLength, getLengthSquared, getPathIterator, intersects, intersects, intersects, intersects, intersects, isEmpty, set, set, toBoundingBox, transform, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Shape3afp
contains, contains, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, 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
-
Segment3dfx
public Segment3dfx()
Construct an empty segment.
-
Segment3dfx
public Segment3dfx(Point3D<?,?> p1, Point3D<?,?> p2)
Construct a segment with the two given points.- Parameters:
p1- first point.p2- second point.
-
Segment3dfx
public Segment3dfx(Point3dfx p1, Point3dfx p2)
Construct a segment with the two given points.- Parameters:
p1- the point to set as the first point.p2- the point to set as the second point.
-
Segment3dfx
public Segment3dfx(Segment3afp<?,?,?,?,?,?> segment)
Constructor by copy.- Parameters:
segment- the segment to copy.
-
Segment3dfx
public Segment3dfx(Segment3dfx segment)
Constructor by setting.- Parameters:
segment- the segment to set.
-
Segment3dfx
public Segment3dfx(double x1, double y1, double z1, double x2, double y2, double z2)Construct a segment with the two given points.- Parameters:
x1- x coordinate of the first point.y1- y coordinate of the first point.z1- z coordinate of the first point.x2- x coordinate of the second point.y2- y coordinate of the second point.z2- z coordinate of the second point.
-
-
Method Detail
-
clone
public Segment3dfx clone()
Description copied from interface:Shape3DClone this shape.- Specified by:
clonein interfaceShape3D<Shape3dfx<?>,Segment3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Overrides:
clonein classAbstractShape3dfx<Segment3dfx>- Returns:
- the clone.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classAbstractShape3dfx<Segment3dfx>
-
createTransformedShape
@Pure public Segment3dfx createTransformedShape(Transform3D transform)
Description copied from interface:Shape3DApply the transformation to the shape and reply the result. This function does not change the current shape.- Specified by:
createTransformedShapein interfaceShape3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Specified by:
createTransformedShapein interfaceShape3D<Shape3dfx<?>,Segment3dfx,PathIterator3afp<PathElement3dfx>,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
transform- is the transformation to apply to the shape.- Returns:
- the result of the transformation.
-
set
public void set(double x1, double y1, double z1, double x2, double y2, double z2)Description copied from interface:Segment3afpChange the line.- Specified by:
setin interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
x1- x coordinate of the first point.y1- y coordinate of the first point.z1- z coordinate of the first point.x2- x coordinate of the second point.y2- y coordinate of the second point.z2- z coordinate of the second point.
-
setX1
public void setX1(double x)
Description copied from interface:Segment3afpSets a new value in the X of the first point.- Specified by:
setX1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
x- the new value double x
-
setY1
public void setY1(double y)
Description copied from interface:Segment3afpSets a new value in the Y of the first point.- Specified by:
setY1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
y- the new value double y
-
setZ1
public void setZ1(double z)
Description copied from interface:Segment3afpSets a new value in the Z of the first point.- Specified by:
setZ1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
z- the new value double z
-
setX2
public void setX2(double x)
Description copied from interface:Segment3afpSets a new value in the X of the second point.- Specified by:
setX2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
x- the new value double x
-
setY2
public void setY2(double y)
Description copied from interface:Segment3afpSets a new value in the Y of the second point.- Specified by:
setY2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
y- the new value double y
-
setZ2
public void setZ2(double z)
Description copied from interface:Segment3afpSets a new value in the Z of the second point.- Specified by:
setZ2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
z- the new value double z
-
getX1
@Pure public double getX1()
Description copied from interface:Segment3afpReplies the X of the first point.- Specified by:
getX1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the x of the first point.
-
x1Property
@Pure public javafx.beans.property.DoubleProperty x1Property()
Replies the property that is the x coordinate of the first segment point.- Returns:
- the x1 property.
-
getY1
@Pure public double getY1()
Description copied from interface:Segment3afpReplies the Y of the first point.- Specified by:
getY1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the y of the first point.
-
y1Property
@Pure public javafx.beans.property.DoubleProperty y1Property()
Replies the property that is the y coordinate of the first segment point.- Returns:
- the y1 property.
-
getZ1
@Pure public double getZ1()
Description copied from interface:Segment3afpReplies the Z of the first point.- Specified by:
getZ1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the z of the first point.
-
z1Property
@Pure public javafx.beans.property.DoubleProperty z1Property()
Replies the property that is the z coordinate of the first segment point.- Returns:
- the z1 property.
-
getX2
@Pure public double getX2()
Description copied from interface:Segment3afpReplies the X of the second point.- Specified by:
getX2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the x of the second point.
-
x2Property
@Pure public javafx.beans.property.DoubleProperty x2Property()
Replies the property that is the x coordinate of the second segment point.- Returns:
- the x2 property.
-
getY2
@Pure public double getY2()
Description copied from interface:Segment3afpReplies the Y of the second point.- Specified by:
getY2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the y of the second point.
-
y2Property
@Pure public javafx.beans.property.DoubleProperty y2Property()
Replies the property that is the y coordinate of the second segment point.- Returns:
- the y2 property.
-
getZ2
@Pure public double getZ2()
Description copied from interface:Segment3afpReplies the Z of the second point.- Specified by:
getZ2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the z of the second point.
-
z2Property
@Pure public javafx.beans.property.DoubleProperty z2Property()
Replies the property that is the z coordinate of the second segment point.- Returns:
- the z2 property.
-
getP1
public Point3dfx getP1()
Description copied from interface:Segment3afpReplies the first point.- Specified by:
getP1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the first point.
-
setP1
public void setP1(double x, double y, double z)Description copied from interface:Segment3afpChange the first point.- Specified by:
setP1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
x- x coordinate of the first point.y- y coordinate of the first point.z- z coordinate of the first point.
-
setP1
public void setP1(Point3D<?,?> point)
Description copied from interface:Segment3afpChange the first point.- Specified by:
setP1in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
point- the first point.
-
setP1
public void setP1(Point3dfx point)
Set the point as the first point of this segment.- Parameters:
point- the point to set.
-
getP2
public Point3dfx getP2()
Description copied from interface:Segment3afpReplies the second point.- Specified by:
getP2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Returns:
- the second point.
-
setP2
public void setP2(double x, double y, double z)Description copied from interface:Segment3afpChange the first point.- Specified by:
setP2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
x- x coordinate of the first point.y- y coordinate of the first point.z- z coordinate of the first point.
-
setP2
public void setP2(Point3D<?,?> point)
Description copied from interface:Segment3afpChange the second point.- Specified by:
setP2in interfaceSegment3afp<Shape3dfx<?>,Segment3dfx,PathElement3dfx,Point3dfx,Vector3dfx,RectangularPrism3dfx>- Parameters:
point- the second point.
-
setP2
public void setP2(Point3dfx point)
Set the point as the second point of this segment.- Parameters:
point- the point to set.
-
boundingBoxProperty
public javafx.beans.property.ObjectProperty<RectangularPrism3dfx> boundingBoxProperty()
Description copied from interface:Shape3dfxReplies the property that contains the bounding box for this shape.- Specified by:
boundingBoxPropertyin interfaceShape3dfx<Segment3dfx>- Returns:
- the bounding box.
-
-