Class Vector2dfx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.dfx.Tuple2dfx<Vector2dfx>
-
- org.arakhne.afc.math.geometry.d2.dfx.Vector2dfx
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Tuple2D<Vector2dfx>
,Vector2D<Vector2dfx,Point2dfx>
,JsonableObject
public class Vector2dfx extends Tuple2dfx<Vector2dfx> implements Vector2D<Vector2dfx,Point2dfx>
2D Vector 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.Vector2D
Vector2D.PowerResult<T extends Vector2D<? super T,?>>
-
-
Constructor Summary
Constructors Constructor Description Vector2dfx()
Construct a zero vector.Vector2dfx(double[] tuple)
Constructor by copy.Vector2dfx(double x, double y)
Construct a vector with the given coordinates.Vector2dfx(float x, float y)
Construct a vector with the given coordinates.Vector2dfx(int[] tuple)
Constructor by copy.Vector2dfx(int x, int y)
Construct a vector with the given coordinates.Vector2dfx(long x, long y)
Construct a vector with the given coordinates.Vector2dfx(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Construct a vector with the given coordinate properties.Vector2dfx(Tuple2D<?> tuple)
Constructor by copy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector2dfx
clone()
Clone this point.static Vector2dfx
convert(Tuple2D<?> tuple)
Convert the given tuple to a real Vector2dfx.GeomFactory2dfx
getGeomFactory()
Replies the geometry factory associated to this point.double
getLength()
Returns the length of this vector.double
getLengthSquared()
Returns the squared length of this vector.javafx.beans.property.ReadOnlyDoubleProperty
lengthProperty()
Replies the property that represents the length of the vector.javafx.beans.property.ReadOnlyDoubleProperty
lengthSquaredProperty()
Replies the property that represents the length of the vector.static Vector2dfx
toOrientationVector(double angle)
Replies the orientation vector, which is corresponding to the given angle on a trigonometric circle.UnmodifiableVector2D<Vector2dfx,Point2dfx>
toUnmodifiable()
Replies an unmodifiable copy of this vector.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.dfx.Tuple2dfx
equals, getX, getY, hashCode, ix, iy, set, setX, setX, setY, setY, toJson, toString, xProperty, yProperty
-
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.d2.Tuple2D
absolute, absolute, add, add, addX, addX, addY, addY, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, epsilonEquals, equals, equals, get, get, get, getX, getY, hashCode, interpolate, interpolate, ix, iy, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, sub, sub, subX, subX, subY, subY
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Vector2D
$div, $minus, $minus, $minus, $minus, $plus, $plus, $plus, $times, $times, $up, $up, add, add, angle, dot, getOrientationAngle, isOrthogonal, isUnitVector, makeOrthogonal, normalize, normalize, operator_add, operator_divide, operator_doubleDotLessThan, operator_elvis, operator_equals, operator_greaterThanDoubleDot, operator_minus, operator_minus, operator_minus, operator_minus, operator_multiply, operator_multiply, operator_notEquals, operator_plus, operator_plus, operator_plus, operator_power, operator_power, operator_remove, operator_upTo, perp, power, scaleAdd, scaleAdd, scaleAdd, scaleAdd, setLength, signedAngle, sub, sub, sub, toColinearVector, toOrthogonalVector, toUnitVector, turn, turn, turnLeft, turnLeft, turnLeft, turnRight, turnRight
-
-
-
-
Constructor Detail
-
Vector2dfx
public Vector2dfx()
Construct a zero vector.
-
Vector2dfx
public Vector2dfx(javafx.beans.property.DoubleProperty x, javafx.beans.property.DoubleProperty y)
Construct a vector with the given coordinate properties.- Parameters:
x
- the property for the x coordinate.y
- the property for the y coordinate.
-
Vector2dfx
public Vector2dfx(Tuple2D<?> tuple)
Constructor by copy.- Parameters:
tuple
- is the tuple to copy.
-
Vector2dfx
public Vector2dfx(int[] tuple)
Constructor by copy.- Parameters:
tuple
- is the tuple to copy.
-
Vector2dfx
public Vector2dfx(double[] tuple)
Constructor by copy.- Parameters:
tuple
- is the tuple to copy.
-
Vector2dfx
public Vector2dfx(int x, int y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
Vector2dfx
public Vector2dfx(float x, float y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
Vector2dfx
public Vector2dfx(double x, double y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
Vector2dfx
public Vector2dfx(long x, long y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
-
Method Detail
-
convert
public static Vector2dfx convert(Tuple2D<?> tuple)
Convert the given tuple to a real Vector2dfx.If the given tuple is already a Vector2dfx, it is replied.
- Parameters:
tuple
- the tuple.- Returns:
- the Vector2dfx.
- Since:
- 14.0
-
toOrientationVector
@Pure public static Vector2dfx toOrientationVector(double angle)
Replies the orientation vector, which is corresponding to the given angle on a trigonometric circle.- Parameters:
angle
- is the angle in radians to translate.- Returns:
- the orientation vector which is corresponding to the given angle.
-
clone
public Vector2dfx clone()
Description copied from interface:Tuple2D
Clone this point.- Specified by:
clone
in interfaceTuple2D<Vector2dfx>
- Overrides:
clone
in classTuple2dfx<Vector2dfx>
- Returns:
- the clone.
-
getLength
public double getLength()
Description copied from interface:Vector2D
Returns the length of this vector.- Specified by:
getLength
in interfaceVector2D<Vector2dfx,Point2dfx>
- Returns:
- the length of this vector
-
lengthProperty
public javafx.beans.property.ReadOnlyDoubleProperty lengthProperty()
Replies the property that represents the length of the vector.- Returns:
- the length property
-
getLengthSquared
public double getLengthSquared()
Description copied from interface:Vector2D
Returns the squared length of this vector.- Specified by:
getLengthSquared
in interfaceVector2D<Vector2dfx,Point2dfx>
- Returns:
- the squared length of this vector
-
lengthSquaredProperty
public javafx.beans.property.ReadOnlyDoubleProperty lengthSquaredProperty()
Replies the property that represents the length of the vector.- Returns:
- the length property
-
getGeomFactory
public GeomFactory2dfx getGeomFactory()
Description copied from interface:Vector2D
Replies the geometry factory associated to this point.- Specified by:
getGeomFactory
in interfaceVector2D<Vector2dfx,Point2dfx>
- Returns:
- the factory.
-
toUnmodifiable
public UnmodifiableVector2D<Vector2dfx,Point2dfx> toUnmodifiable()
Description copied from interface:Vector2D
Replies an unmodifiable copy of this vector.- Specified by:
toUnmodifiable
in interfaceVector2D<Vector2dfx,Point2dfx>
- Returns:
- an unmodifiable copy.
-
-