Class Tuple2dfx<RT extends Tuple2dfx<? super RT>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.dfx.Tuple2dfx<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:
Point2dfx,Vector2dfx
public class Tuple2dfx<RT extends Tuple2dfx<? super RT>> extends Object implements Tuple2D<RT>
2D tuple with 2 double precision floating-point FX properties.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND, Olivier LAMOTTE, Hamza JAFFALI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Constructor Summary
Constructors Constructor Description Tuple2dfx()Construct a zero tuple.Tuple2dfx(double[] tuple)Constructor by copy.Tuple2dfx(double x, double y)Construct a tuple with the two given coordinates.Tuple2dfx(int[] tuple)Constructor by copy.Tuple2dfx(int x, int y)Construct a tuple with the two given coordinates.Tuple2dfx(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)Construct a tuple with the two given properties for its coordinates.Tuple2dfx(Tuple2D<?> tuple)Constructor by copy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RTclone()Clone this point.booleanequals(Object t1)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.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.(package private) voidset(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)Change the x and y properties.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.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.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Tuple2D
absolute, absolute, add, add, addX, addX, addY, addY, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, epsilonEquals, equals, get, get, get, interpolate, interpolate, negate, negate, scale, scale, scale, scale, set, set, set, set, set, sub, sub, subX, subX, subY, subY
-
-
-
-
Constructor Detail
-
Tuple2dfx
public Tuple2dfx()
Construct a zero tuple.
-
Tuple2dfx
public Tuple2dfx(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)Construct a tuple with the two given properties for its coordinates.- Parameters:
x- the property for the x coordinate.y- the property for the y coordinate.
-
Tuple2dfx
public Tuple2dfx(Tuple2D<?> tuple)
Constructor by copy.- Parameters:
tuple- is the tuple to copy.
-
Tuple2dfx
public Tuple2dfx(int[] tuple)
Constructor by copy.- Parameters:
tuple- is the tuple to copy.
-
Tuple2dfx
public Tuple2dfx(double[] tuple)
Constructor by copy.- Parameters:
tuple- is the tuple to copy.
-
Tuple2dfx
public Tuple2dfx(int x, int y)Construct a tuple with the two given coordinates.- Parameters:
x- x coordinate.y- y coordinate.
-
Tuple2dfx
public Tuple2dfx(double x, double y)Construct a tuple with the two given coordinates.- Parameters:
x- x coordinate.y- y coordinate.
-
-
Method Detail
-
set
void set(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)Change the x and y properties.- Parameters:
x- the new x property.y- the new y property.
-
equals
@Pure public boolean equals(Object t1)
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.
-
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.
-
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.
-
-