Class Tuple1dfx<RT extends Tuple1dfx<? super RT>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d1.dfx.Tuple1dfx<RT>
-
- Type Parameters:
RT- is the type of the data returned by the tuple.
- All Implemented Interfaces:
Serializable,Cloneable,Tuple2D<RT>,JsonableObject
- Direct Known Subclasses:
Point1dfx,Vector1dfx
public class Tuple1dfx<RT extends Tuple1dfx<? super RT>> extends Object implements Tuple2D<RT>
1.5D tuple with 2 double precision floating-point FX properties.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>>segmentsegment reference.(package private) javafx.beans.property.DoublePropertyxx coordinate.(package private) javafx.beans.property.DoublePropertyyy coordinate.
-
Constructor Summary
Constructors Constructor Description Tuple1dfx()Construct a zero tuple.Tuple1dfx(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)Construct a zero tuple.Tuple1dfx(Segment1D<?,?> segment)Construct a zero tuple.Tuple1dfx(Segment1D<?,?> segment, double[] tuple)Constructor.Tuple1dfx(Segment1D<?,?> segment, double x, double y)Construct a tuple with the given coordinates.Tuple1dfx(Segment1D<?,?> segment, int[] tuple)Constructor.Tuple1dfx(Segment1D<?,?> segment, int x, int y)Construct a tuple with the given coordinates.Tuple1dfx(Segment1D<?,?> segment, Tuple2D<?> tuple)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabsolute()Sets each component of this tuple to its absolute value.voidabsolute(Tuple2D<?> tuple)Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.voidadd(double x, double y)Sets the value of this tuple to the sum of itself and x and y.voidadd(int x, int y)Sets the value of this tuple to the sum of itself and x and y.voidaddX(double x)Sets the x value of this tuple to the sum of itself and x.voidaddX(int x)Sets the x value of this tuple to the sum of itself and x.voidaddY(double y)Sets the y value of this tuple to the sum of itself and y.voidaddY(int y)Sets the y value of this tuple to the sum of itself and y.RTclone()Clone this point.booleanequals(Object object)Returns true if the Object t1 is of type Tuple2D and all of the data members of t1 are equal to the corresponding data members in this Tuple2D.GeomFactory1D<Vector1dfx,Point1dfx>getGeomFactory()Replies the geometry factory.Segment1D<?,?>getSegment()Replies the segment.doublegetX()Get the x coordinate.doublegetY()Get the y coordinate.inthashCode()Returns a hash code value based on the data values in this object.intix()Get the x coordinate.intiy()Get the y coordinate.voidnegate()Negates the value of this tuple in place.voidnegate(Tuple2D<?> tuple)Sets the value of this tuple to the negation of tuple t1.voidscale(double scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.voidscale(double scale, Tuple2D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.voidscale(int scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.voidscale(int scale, Tuple2D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>>segmentProperty()Replies the segment property.voidset(double[] tuple)Sets the value of this tuple from the 2 values specified in the array.voidset(double x, double y)Sets the value of this tuple to the specified x and y coordinates.voidset(int[] tuple)Sets the value of this tuple from the 2 values specified in the array.voidset(int x, int y)Sets the value of this tuple to the specified x and y coordinates.(package private) voidset(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)Change the x and y properties.voidset(Segment1D<?,?> segment, double curviline, double shift)Change the attributes of the tuple.voidset(Tuple2D<?> tuple)Sets the value of this tuple to the value of tuple t1.voidsetSegment(Segment1D<?,?> segment)Set the segment.voidsetX(double x)Set the x coordinate.voidsetX(int x)Set the x coordinate.voidsetY(double y)Set the y coordinate.voidsetY(int y)Set the y coordinate.voidsub(double x, double y)Sets the value of this tuple to the difference of itself and x and y.voidsub(int x, int y)Sets the value of this tuple to the difference of itself and x and y.voidsubX(double x)Sets the x value of this tuple to the difference of itself and x.voidsubX(int x)Sets the x value of this tuple to the difference of itself and x.voidsubY(double y)Sets the y value of this tuple to the difference of itself and y.voidsubY(int y)Sets the y value of this tuple to the difference of itself and y.voidtoJson(JsonBuffer buffer)Replies the Json representation of this node.StringtoString()javafx.beans.property.DoublePropertyxProperty()Replies the x property.javafx.beans.property.DoublePropertyyProperty()Replies the y property.
-
-
-
Field Detail
-
segment
javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment
segment reference.
-
x
javafx.beans.property.DoubleProperty x
x coordinate.
-
y
javafx.beans.property.DoubleProperty y
y coordinate.
-
-
Constructor Detail
-
Tuple1dfx
public Tuple1dfx()
Construct a zero tuple.
-
Tuple1dfx
public Tuple1dfx(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Construct a zero tuple.- Parameters:
segment- the segment associated to the tuple.x- curviline coordinate.y- shift distance.
-
Tuple1dfx
public Tuple1dfx(Segment1D<?,?> segment)
Construct a zero tuple.- Parameters:
segment- the segment.
-
Tuple1dfx
public Tuple1dfx(Segment1D<?,?> segment, Tuple2D<?> tuple)
Constructor.- Parameters:
segment- the segment.tuple- is the tuple to copy.
-
Tuple1dfx
public Tuple1dfx(Segment1D<?,?> segment, int[] tuple)
Constructor.- Parameters:
segment- the segment.tuple- is the tuple to copy.
-
Tuple1dfx
public Tuple1dfx(Segment1D<?,?> segment, double[] tuple)
Constructor.- Parameters:
segment- the segment.tuple- is the tuple to copy.
-
Tuple1dfx
public Tuple1dfx(Segment1D<?,?> segment, int x, int y)
Construct a tuple with the given coordinates.- Parameters:
segment- the segment.x- x coordinate.y- y coordinate.
-
Tuple1dfx
public Tuple1dfx(Segment1D<?,?> segment, double x, double y)
Construct a tuple with the given coordinates.- Parameters:
segment- the segment.x- x coordinate.y- y coordinate.
-
-
Method Detail
-
segmentProperty
@Pure public javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segmentProperty()
Replies the segment property.- Returns:
- the segment property.
-
xProperty
@Pure public javafx.beans.property.DoubleProperty xProperty()
Replies the x property.- Returns:
- the x property.
-
yProperty
@Pure public javafx.beans.property.DoubleProperty yProperty()
Replies the y property.- Returns:
- the y property.
-
getSegment
@Pure public Segment1D<?,?> getSegment()
Replies the segment.- Returns:
- the segment or
nullif the weak reference has lost the segment.
-
getGeomFactory
public GeomFactory1D<Vector1dfx,Point1dfx> getGeomFactory()
Replies the geometry factory.- Returns:
- the factory.
-
setSegment
public void setSegment(Segment1D<?,?> segment)
Set the segment.- Parameters:
segment- is the segment.
-
set
void set(javafx.beans.property.ObjectProperty<WeakReference<Segment1D<?,?>>> segment, javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Change the x and y properties.- Parameters:
segment- the new segment property.x- the new x property.y- the new y property.
-
set
public void set(Segment1D<?,?> segment, double curviline, double shift)
Change the attributes of the tuple.- Parameters:
segment- the segment.curviline- the curviline coordinate.shift- the shift distance.
-
set
public void set(Tuple2D<?> tuple)
Description copied from interface:Tuple2DSets the value of this tuple to the value of tuple t1.
-
set
public void set(int x, int y)Description copied from interface:Tuple2DSets the value of this tuple to the specified x and y coordinates.
-
set
public void set(double x, double y)Description copied from interface:Tuple2DSets the value of this tuple to the specified x and y coordinates.
-
set
public void set(int[] tuple)
Description copied from interface:Tuple2DSets the value of this tuple from the 2 values specified in the array.
-
set
public void set(double[] tuple)
Description copied from interface:Tuple2DSets the value of this tuple from the 2 values specified in the array.
-
equals
@Pure public boolean equals(Object object)
Description copied from interface:Tuple2DReturns true if the Object t1 is of type Tuple2D and all of the data members of t1 are equal to the corresponding data members in this Tuple2D.
-
hashCode
@Pure public int hashCode()
Description copied from interface:Tuple2DReturns a hash code value based on the data values in this object. Two differentTuple2Dobjects with identical data values (i.e.,Tuple2D.equals(Object)returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.
-
toJson
public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Parameters:
buffer- the Json buffer.
-
getX
public double getX()
Description copied from interface:Tuple2DGet the x coordinate.
-
ix
public int ix()
Description copied from interface:Tuple2DGet the x coordinate.
-
setX
public void setX(int x)
Description copied from interface:Tuple2DSet the x coordinate.
-
setX
public void setX(double x)
Description copied from interface:Tuple2DSet the x coordinate.
-
getY
public double getY()
Description copied from interface:Tuple2DGet the y coordinate.
-
iy
public int iy()
Description copied from interface:Tuple2DGet the y coordinate.
-
setY
public void setY(int y)
Description copied from interface:Tuple2DSet the y coordinate.
-
setY
public void setY(double y)
Description copied from interface:Tuple2DSet the y coordinate.
-
absolute
public void absolute()
Description copied from interface:Tuple2DSets each component of this tuple to its absolute value.
-
absolute
public void absolute(Tuple2D<?> tuple)
Description copied from interface:Tuple2DSets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
-
add
public void add(int x, int y)Description copied from interface:Tuple2DSets the value of this tuple to the sum of itself and x and y.
-
add
public void add(double x, double y)Description copied from interface:Tuple2DSets the value of this tuple to the sum of itself and x and y.
-
addX
public void addX(int x)
Description copied from interface:Tuple2DSets the x value of this tuple to the sum of itself and x.
-
addX
public void addX(double x)
Description copied from interface:Tuple2DSets the x value of this tuple to the sum of itself and x.
-
addY
public void addY(int y)
Description copied from interface:Tuple2DSets the y value of this tuple to the sum of itself and y.
-
addY
public void addY(double y)
Description copied from interface:Tuple2DSets the y value of this tuple to the sum of itself and y.
-
negate
public void negate(Tuple2D<?> tuple)
Description copied from interface:Tuple2DSets the value of this tuple to the negation of tuple t1.
-
negate
public void negate()
Description copied from interface:Tuple2DNegates the value of this tuple in place.
-
scale
public void scale(int scale, Tuple2D<?> tuple)Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
public void scale(double scale, Tuple2D<?> tuple)Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
public void scale(int scale)
Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of the scale factor with this.
-
scale
public void scale(double scale)
Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of the scale factor with this.
-
sub
public void sub(int x, int y)Description copied from interface:Tuple2DSets the value of this tuple to the difference of itself and x and y.
-
sub
public void sub(double x, double y)Description copied from interface:Tuple2DSets the value of this tuple to the difference of itself and x and y.
-
subX
public void subX(int x)
Description copied from interface:Tuple2DSets the x value of this tuple to the difference of itself and x.
-
subX
public void subX(double x)
Description copied from interface:Tuple2DSets the x value of this tuple to the difference of itself and x.
-
subY
public void subY(int y)
Description copied from interface:Tuple2DSets the y value of this tuple to the difference of itself and y.
-
-