Class Vector2ifx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.ifx.Tuple2ifx<Vector2ifx>
-
- org.arakhne.afc.math.geometry.d2.ifx.Vector2ifx
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Tuple2D<Vector2ifx>
,Vector2D<Vector2ifx,Point2ifx>
,JsonableObject
public class Vector2ifx extends Tuple2ifx<Vector2ifx> implements Vector2D<Vector2ifx,Point2ifx>
2D Vector with 2 integer FX properties.- Since:
- 13.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
-
-
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 Vector2ifx()
Construct a zero vector.Vector2ifx(double[] tuple)
Constructor by copy.Vector2ifx(double x, double y)
Construct a vector with the given coordinates.Vector2ifx(float x, float y)
Construct a vector with the given coordinates.Vector2ifx(int[] tuple)
Constructor by copy.Vector2ifx(int x, int y)
Construct a vector with the given coordinates.Vector2ifx(long x, long y)
Construct a vector with the given coordinates.Vector2ifx(javafx.beans.property.IntegerProperty xProperty, javafx.beans.property.IntegerProperty yProperty)
Construct a vector with the given properties for the coordinates.Vector2ifx(Tuple2D<?> tuple)
Constructor by copy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector2ifx
clone()
Clone this point.static Vector2ifx
convert(Tuple2D<?> tuple)
Convert the given tuple to a real Vector2ifx.GeomFactory2ifx
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.DoubleProperty
lengthProperty()
Replies the property that represents the length of the vector.javafx.beans.property.DoubleProperty
lengthSquaredProperty()
Replies the property that represents the length of the vector.static Vector2ifx
toOrientationVector(double angle)
Replies the orientation vector, which is corresponding to the given angle on a trigonometric circle.UnmodifiableVector2D<Vector2ifx,Point2ifx>
toUnmodifiable()
Replies an unmodifiable copy of this vector.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.ifx.Tuple2ifx
equals, getX, getY, hashCode, ix, iy, 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
-
Vector2ifx
public Vector2ifx()
Construct a zero vector.
-
Vector2ifx
public Vector2ifx(javafx.beans.property.IntegerProperty xProperty, javafx.beans.property.IntegerProperty yProperty)
Construct a vector with the given properties for the coordinates.- Parameters:
xProperty
- property for the x coordinate.yProperty
- property for the y coordinate.
-
Vector2ifx
public Vector2ifx(Tuple2D<?> tuple)
Constructor by copy.- Parameters:
tuple
- is the tuple to copy.
-
Vector2ifx
public Vector2ifx(int[] tuple)
Constructor by copy.- Parameters:
tuple
- is the tuple to copy.
-
Vector2ifx
public Vector2ifx(double[] tuple)
Constructor by copy.- Parameters:
tuple
- is the tuple to copy.
-
Vector2ifx
public Vector2ifx(int x, int y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
Vector2ifx
public Vector2ifx(float x, float y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
Vector2ifx
public Vector2ifx(double x, double y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
Vector2ifx
public Vector2ifx(long x, long y)
Construct a vector with the given coordinates.- Parameters:
x
- x coordinate.y
- y coordinate.
-
-
Method Detail
-
convert
public static Vector2ifx convert(Tuple2D<?> tuple)
Convert the given tuple to a real Vector2ifx.If the given tuple is already a Vector2ifx, it is replied.
- Parameters:
tuple
- the tuple.- Returns:
- the Vector2ifx.
- Since:
- 14.0
-
toOrientationVector
@Pure public static Vector2ifx 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 Vector2ifx clone()
Description copied from interface:Tuple2D
Clone this point.- Specified by:
clone
in interfaceTuple2D<Vector2ifx>
- Overrides:
clone
in classTuple2ifx<Vector2ifx>
- Returns:
- the clone.
-
getLength
public double getLength()
Description copied from interface:Vector2D
Returns the length of this vector.- Specified by:
getLength
in interfaceVector2D<Vector2ifx,Point2ifx>
- Returns:
- the length of this vector
-
lengthProperty
public javafx.beans.property.DoubleProperty 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<Vector2ifx,Point2ifx>
- Returns:
- the squared length of this vector
-
lengthSquaredProperty
public javafx.beans.property.DoubleProperty lengthSquaredProperty()
Replies the property that represents the length of the vector.- Returns:
- the length property
-
getGeomFactory
public GeomFactory2ifx getGeomFactory()
Description copied from interface:Vector2D
Replies the geometry factory associated to this point.- Specified by:
getGeomFactory
in interfaceVector2D<Vector2ifx,Point2ifx>
- Returns:
- the factory.
-
toUnmodifiable
@Pure public UnmodifiableVector2D<Vector2ifx,Point2ifx> toUnmodifiable()
Description copied from interface:Vector2D
Replies an unmodifiable copy of this vector.- Specified by:
toUnmodifiable
in interfaceVector2D<Vector2ifx,Point2ifx>
- Returns:
- an unmodifiable copy.
-
-