Class Segment3ifx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.ifx.AbstractShape3ifx<Segment3ifx>
-
- org.arakhne.afc.math.geometry.d3.ifx.Segment3ifx
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Segment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
,Shape3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
,Shape3ifx<Segment3ifx>
,Shape3D<Shape3ifx<?>,Segment3ifx,PathIterator3ai<PathElement3ifx>,Point3ifx,Vector3ifx,RectangularPrism3ifx>
,JsonableObject
public class Segment3ifx extends AbstractShape3ifx<Segment3ifx> implements Segment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
A 3D segment/line with 3 integer FX properties.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Thomas PIOTROWSKI, Stéphane GALLAND
- 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.ai.Segment3ai
Segment3ai.AbstractSegmentPathIterator<IE extends PathElement3ai>, Segment3ai.BresenhamLineIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>, Segment3ai.SegmentPathIterator<IE extends PathElement3ai>, Segment3ai.TransformedSegmentPathIterator<IE extends PathElement3ai>
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d3.ifx.AbstractShape3ifx
boundingBox
-
-
Constructor Summary
Constructors Constructor Description Segment3ifx()
Construct an empty segment.Segment3ifx(int x1, int y1, int z1, int x2, int y2, int z2)
Construct a segment with the two given points.Segment3ifx(Segment3ai<?,?,?,?,?,?> segment)
Construct by copy.Segment3ifx(Point3ifx p1, Point3ifx p2)
Construct a segment by setting the two given points.Segment3ifx(Segment3ifx segment)
Construct by setting.Segment3ifx(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<RectangularPrism3ifx>
boundingBoxProperty()
Replies the property that contains the bounding box for this shape.Segment3ifx
clone()
Clone this shape.Shape3ifx<?>
createTransformedShape(Transform3D transform)
Apply the transformation to the shape and reply the result.Point3ifx
getP1()
Replies the first point.Point3ifx
getP2()
Replies the second point.int
getX1()
Replies the X of the first point.int
getX2()
Replies the X of the second point.int
getY1()
Replies the Y of the first point.int
getY2()
Replies the Y of the second point.int
getZ1()
Replies the Z of the first point.int
getZ2()
Replies the Z of the second point.int
hashCode()
void
set(int x1, int y1, int z1, int x2, int y2, int z2)
Change the line.void
setP1(int x, int y, int z)
Change the first point.void
setP1(Point3ifx point)
Set the point as the first point of this segment.void
setP1(Point3D<?,?> point)
Change the first point.void
setP2(int x, int y, int z)
Change the second point.void
setP2(Point3ifx point)
Set the point as the second point of this segment.void
setP2(Point3D<?,?> point)
Change the second point.void
setX1(int x)
Change the X of the first point.void
setX2(int x)
Change the X of the second point.void
setY1(int y)
Change the Y of the first point.void
setY2(int y)
Change the Y of the second point.void
setZ1(int z)
Change the Z of the first point.void
setZ2(int z)
Change the Z of the second point.javafx.beans.property.IntegerProperty
x1Property()
Replies the property that is the x coordinate of the first segment point.javafx.beans.property.IntegerProperty
x2Property()
Replies the property that is the x coordinate of the second segment point.javafx.beans.property.IntegerProperty
y1Property()
Replies the property that is the y coordinate of the first segment point.javafx.beans.property.IntegerProperty
y2Property()
Replies the property that is the y coordinate of the second segment point.javafx.beans.property.IntegerProperty
z1Property()
Replies the property that is the z coordinate of the first segment point.javafx.beans.property.IntegerProperty
z2Property()
Replies the property that is the z coordinate of the second segment point.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.ifx.AbstractShape3ifx
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.ai.Segment3ai
clear, clipToRectangle, contains, contains, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPointIterator, intersects, intersects, intersects, intersects, intersects, isEmpty, set, set, toBoundingBox, transform, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.ai.Shape3ai
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
-
Segment3ifx
public Segment3ifx()
Construct an empty segment.
-
Segment3ifx
public Segment3ifx(Point3D<?,?> p1, Point3D<?,?> p2)
Construct a segment with the two given points.- Parameters:
p1
- first point.p2
- second point.
-
Segment3ifx
public Segment3ifx(Point3ifx p1, Point3ifx p2)
Construct a segment by setting the two given points.- Parameters:
p1
- the point to set as the first point.p2
- the point to set as the second point.
-
Segment3ifx
public Segment3ifx(Segment3ai<?,?,?,?,?,?> segment)
Construct by copy.- Parameters:
segment
- the segment to copy.
-
Segment3ifx
public Segment3ifx(Segment3ifx segment)
Construct by setting.- Parameters:
segment
- the segment to set.
-
Segment3ifx
public Segment3ifx(int x1, int y1, int z1, int x2, int y2, int 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 Segment3ifx clone()
Description copied from interface:Shape3D
Clone this shape.- Specified by:
clone
in interfaceShape3D<Shape3ifx<?>,Segment3ifx,PathIterator3ai<PathElement3ifx>,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Overrides:
clone
in classAbstractShape3ifx<Segment3ifx>
- Returns:
- the clone.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape3ifx<Segment3ifx>
-
createTransformedShape
@Pure public Shape3ifx<?> createTransformedShape(Transform3D transform)
Description copied from interface:Shape3D
Apply the transformation to the shape and reply the result. This function does not change the current shape.- Specified by:
createTransformedShape
in interfaceShape3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Specified by:
createTransformedShape
in interfaceShape3D<Shape3ifx<?>,Segment3ifx,PathIterator3ai<PathElement3ifx>,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
transform
- is the transformation to apply to the shape.- Returns:
- the result of the transformation.
-
set
public void set(int x1, int y1, int z1, int x2, int y2, int z2)
Description copied from interface:Segment3ai
Change the line.- Specified by:
set
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- 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(int x)
Description copied from interface:Segment3ai
Change the X of the first point.- Specified by:
setX1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
x
- the x of the first point.
-
setY1
public void setY1(int y)
Description copied from interface:Segment3ai
Change the Y of the first point.- Specified by:
setY1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
y
- the y of the first point.
-
setZ1
public void setZ1(int z)
Description copied from interface:Segment3ai
Change the Z of the first point.- Specified by:
setZ1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
z
- the z of the first point.
-
setX2
public void setX2(int x)
Description copied from interface:Segment3ai
Change the X of the second point.- Specified by:
setX2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
x
- the x of the second point.
-
setY2
public void setY2(int y)
Description copied from interface:Segment3ai
Change the Y of the second point.- Specified by:
setY2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
y
- the y of the second point.
-
setZ2
public void setZ2(int z)
Description copied from interface:Segment3ai
Change the Z of the second point.- Specified by:
setZ2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
z
- the z of the second point.
-
getX1
@Pure public int getX1()
Description copied from interface:Segment3ai
Replies the X of the first point.- Specified by:
getX1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the x of the first point.
-
x1Property
@Pure public javafx.beans.property.IntegerProperty x1Property()
Replies the property that is the x coordinate of the first segment point.- Returns:
- the x1 property.
-
getY1
@Pure public int getY1()
Description copied from interface:Segment3ai
Replies the Y of the first point.- Specified by:
getY1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the y of the first point.
-
y1Property
@Pure public javafx.beans.property.IntegerProperty y1Property()
Replies the property that is the y coordinate of the first segment point.- Returns:
- the y1 property.
-
getZ1
@Pure public int getZ1()
Description copied from interface:Segment3ai
Replies the Z of the first point.- Specified by:
getZ1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the z of the first point.
-
z1Property
@Pure public javafx.beans.property.IntegerProperty z1Property()
Replies the property that is the z coordinate of the first segment point.- Returns:
- the z1 property.
-
getX2
@Pure public int getX2()
Description copied from interface:Segment3ai
Replies the X of the second point.- Specified by:
getX2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the x of the second point.
-
x2Property
@Pure public javafx.beans.property.IntegerProperty x2Property()
Replies the property that is the x coordinate of the second segment point.- Returns:
- the x2 property.
-
getY2
@Pure public int getY2()
Description copied from interface:Segment3ai
Replies the Y of the second point.- Specified by:
getY2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the y of the second point.
-
y2Property
@Pure public javafx.beans.property.IntegerProperty y2Property()
Replies the property that is the y coordinate of the second segment point.- Returns:
- the y2 property.
-
getZ2
@Pure public int getZ2()
Description copied from interface:Segment3ai
Replies the Z of the second point.- Specified by:
getZ2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the z of the second point.
-
z2Property
@Pure public javafx.beans.property.IntegerProperty z2Property()
Replies the property that is the z coordinate of the second segment point.- Returns:
- the z2 property.
-
getP1
public Point3ifx getP1()
Description copied from interface:Segment3ai
Replies the first point.- Specified by:
getP1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the first point.
-
setP1
public void setP1(int x, int y, int z)
Description copied from interface:Segment3ai
Change the first point.- Specified by:
setP1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- 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:Segment3ai
Change the first point.- Specified by:
setP1
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
point
- the first point.
-
setP1
public void setP1(Point3ifx point)
Set the point as the first point of this segment.- Parameters:
point
- the point to set.
-
getP2
public Point3ifx getP2()
Description copied from interface:Segment3ai
Replies the second point.- Specified by:
getP2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Returns:
- the second point.
-
setP2
public void setP2(int x, int y, int z)
Description copied from interface:Segment3ai
Change the second point.- Specified by:
setP2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
x
- x coordinate the second point.y
- y coordinate the second point.z
- z coordinate the second point.
-
setP2
public void setP2(Point3D<?,?> point)
Description copied from interface:Segment3ai
Change the second point.- Specified by:
setP2
in interfaceSegment3ai<Shape3ifx<?>,Segment3ifx,PathElement3ifx,Point3ifx,Vector3ifx,RectangularPrism3ifx>
- Parameters:
point
- the second point.
-
setP2
public void setP2(Point3ifx point)
Set the point as the second point of this segment.- Parameters:
point
- the point to set.
-
boundingBoxProperty
public javafx.beans.property.ObjectProperty<RectangularPrism3ifx> boundingBoxProperty()
Description copied from interface:Shape3ifx
Replies the property that contains the bounding box for this shape.- Specified by:
boundingBoxProperty
in interfaceShape3ifx<Segment3ifx>
- Returns:
- the bounding box.
-
-