Interface UnmodifiableVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>>
-
- Type Parameters:
RV
- is the type of vector that can be returned by this tuple.RP
- is the type of point that can be returned by this tuple.
- All Superinterfaces:
Cloneable
,JsonableObject
,Serializable
,Tuple2D<RV>
,UnmodifiableTuple2D<RV>
,Vector2D<RV,RP>
- All Known Implementing Classes:
ImmutableVector2D
public interface UnmodifiableVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>> extends UnmodifiableTuple2D<RV>, Vector2D<RV,RP>
Unmodifiable 2D Vector.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.Vector2D
Vector2D.PowerResult<T extends Vector2D<? super T,?>>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
add(Vector2D<?,?> vector)
Sets the value of this tuple to the sum of itself and the given vector.default void
add(Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Sets the value of this tuple to the sum of tuples vector1 and vector2.default void
makeOrthogonal()
Change the coordinates of this vector to make it an orthogonal vector to the original coordinates.default void
normalize()
Normalizes this vector in place.default void
normalize(Vector2D<?,?> vector)
Sets the value of this vector to the normalization of vector vector.default void
operator_add(Vector2D<?,?> v)
Add a vector to this vector:this += v
.default void
operator_remove(Vector2D<?,?> v)
Substract a vector to this vector:this -= v
.default void
scaleAdd(double scale, Vector2D<?,?> vector)
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple vector (this = s*this + vector).default void
scaleAdd(double scale, Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Sets the value of this tuple to the scalar multiplication of the tuple vector1 plus the tuple vector2 (this = s*vector1 + vector2).default void
scaleAdd(int scale, Vector2D<?,?> vector)
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple vector (this = s*this + vector).default void
scaleAdd(int scale, Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).default void
setLength(double newLength)
Change the length of the vector.default void
sub(Point2D<?,?> point1, Point2D<?,?> point2)
Sets the value of this tuple to the difference of tuples point1 and point2 (this = point1 - point2).default void
sub(Vector2D<?,?> vector1)
Sets the value of this tuple to the difference of itself and vector (this = this - vector).default void
sub(Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Sets the value of this tuple to the difference of tuples vector1 and vector2 (this = vector1 - vector2).default UnmodifiableVector2D<RV,RP>
toUnmodifiable()
Replies an unmodifiable copy of this vector.default void
turn(double angle)
Turn this vector about the given rotation angle.default void
turn(double angle, Vector2D<?,?> vectorToTurn)
Turn the given vector about the given rotation angle, and set this vector with the result.default void
turnLeft(double angle)
Turn this vector on the left when the given rotation angle is positive.default void
turnLeft(double angle, Vector2D<?,?> vectorToTurn)
Turn the given vector on the left, and set this vector with the result.default void
turnRight(double angle)
Turn this vector on the right when the given rotation angle is positive.default void
turnRight(double angle, Vector2D<?,?> vectorToTurn)
Turn this vector on the right when the given rotation angle is positive.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Tuple2D
clone, epsilonEquals, equals, equals, get, get, get, getX, getY, hashCode, ix, iy
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.UnmodifiableTuple2D
absolute, absolute, add, add, addX, addX, addY, addY, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, interpolate, interpolate, 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, angle, dot, getGeomFactory, getLength, getLengthSquared, getOrientationAngle, isOrthogonal, isUnitVector, 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_upTo, perp, power, signedAngle, toColinearVector, toOrthogonalVector, toUnitVector, turnLeft
-
-
-
-
Method Detail
-
add
default void add(Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Description copied from interface:Vector2D
Sets the value of this tuple to the sum of tuples vector1 and vector2.
-
add
default void add(Vector2D<?,?> vector)
Description copied from interface:Vector2D
Sets the value of this tuple to the sum of itself and the given vector.
-
scaleAdd
default void scaleAdd(int scale, Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Description copied from interface:Vector2D
Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).
-
scaleAdd
default void scaleAdd(double scale, Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Description copied from interface:Vector2D
Sets the value of this tuple to the scalar multiplication of the tuple vector1 plus the tuple vector2 (this = s*vector1 + vector2).
-
scaleAdd
default void scaleAdd(int scale, Vector2D<?,?> vector)
Description copied from interface:Vector2D
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple vector (this = s*this + vector).
-
scaleAdd
default void scaleAdd(double scale, Vector2D<?,?> vector)
Description copied from interface:Vector2D
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple vector (this = s*this + vector).
-
sub
default void sub(Vector2D<?,?> vector1, Vector2D<?,?> vector2)
Description copied from interface:Vector2D
Sets the value of this tuple to the difference of tuples vector1 and vector2 (this = vector1 - vector2).
-
sub
default void sub(Point2D<?,?> point1, Point2D<?,?> point2)
Description copied from interface:Vector2D
Sets the value of this tuple to the difference of tuples point1 and point2 (this = point1 - point2).
-
sub
default void sub(Vector2D<?,?> vector1)
Description copied from interface:Vector2D
Sets the value of this tuple to the difference of itself and vector (this = this - vector).
-
makeOrthogonal
default void makeOrthogonal()
Description copied from interface:Vector2D
Change the coordinates of this vector to make it an orthogonal vector to the original coordinates.The orthogonal vector is always the one obtain after a clockwise rotation of this vector.
The orthogonal vector does not depends on the current coordinate system.
-
normalize
default void normalize(Vector2D<?,?> vector)
Description copied from interface:Vector2D
Sets the value of this vector to the normalization of vector vector.
-
normalize
default void normalize()
Description copied from interface:Vector2D
Normalizes this vector in place.If the length of the vector is zero, x and y are set to zero.
-
turn
default void turn(double angle)
Description copied from interface:Vector2D
Turn this vector about the given rotation angle.The rotation is done according to the trigonometric coordinate. A positive rotation angle corresponds to a left or right rotation according to the current
CoordinateSystem2D
.- Specified by:
turn
in interfaceVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>>
- Parameters:
angle
- is the rotation angle in radians.- See Also:
Vector2D.turn(double, Vector2D)
,Vector2D.turnLeft(double)
,Vector2D.turnRight(double)
-
turn
default void turn(double angle, Vector2D<?,?> vectorToTurn)
Description copied from interface:Vector2D
Turn the given vector about the given rotation angle, and set this vector with the result.The rotation is done according to the trigonometric coordinate. A positive rotation angle corresponds to a left or right rotation according to the current
CoordinateSystem2D
.- Specified by:
turn
in interfaceVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>>
- Parameters:
angle
- is the rotation angle in radians.vectorToTurn
- the vector to turn.- See Also:
Vector2D.turn(double)
,Vector2D.turnLeft(double)
,Vector2D.turnRight(double)
-
turnLeft
default void turnLeft(double angle)
Description copied from interface:Vector2D
Turn this vector on the left when the given rotation angle is positive.A positive rotation angle corresponds to a left or right rotation according to the current
CoordinateSystem2D
.- Specified by:
turnLeft
in interfaceVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>>
- Parameters:
angle
- is the rotation angle in radians.- See Also:
CoordinateSystem2D
,Vector2D.turnLeft(double, Vector2D)
,Vector2D.turn(double)
,Vector2D.turnRight(double)
-
turnLeft
default void turnLeft(double angle, Vector2D<?,?> vectorToTurn)
Description copied from interface:Vector2D
Turn the given vector on the left, and set this vector with the result.A positive rotation angle corresponds to a left or right rotation according to the current
CoordinateSystem2D
.- Specified by:
turnLeft
in interfaceVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>>
- Parameters:
angle
- is the rotation angle in radians.vectorToTurn
- the vector to turn.- See Also:
CoordinateSystem2D
,Vector2D.turnLeft(double, Vector2D)
,Vector2D.turn(double)
,Vector2D.turnRight(double)
-
turnRight
default void turnRight(double angle)
Description copied from interface:Vector2D
Turn this vector on the right when the given rotation angle is positive.A positive rotation angle corresponds to a left or right rotation according to the current
CoordinateSystem2D
.- Specified by:
turnRight
in interfaceVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>>
- Parameters:
angle
- is the rotation angle in radians.- See Also:
CoordinateSystem2D
,Vector2D.turn(double)
,Vector2D.turnLeft(double)
-
turnRight
default void turnRight(double angle, Vector2D<?,?> vectorToTurn)
Description copied from interface:Vector2D
Turn this vector on the right when the given rotation angle is positive.A positive rotation angle corresponds to a left or right rotation according to the current
CoordinateSystem2D
.- Specified by:
turnRight
in interfaceVector2D<RV extends Vector2D<? super RV,? super RP>,RP extends Point2D<? super RP,? super RV>>
- Parameters:
angle
- is the rotation angle in radians.vectorToTurn
- the vector to turn.- See Also:
CoordinateSystem2D
,Vector2D.turn(double)
,Vector2D.turnLeft(double)
-
setLength
default void setLength(double newLength)
Description copied from interface:Vector2D
Change the length of the vector. The direction of the vector is unchanged.
-
toUnmodifiable
default UnmodifiableVector2D<RV,RP> toUnmodifiable()
Description copied from interface:Vector2D
Replies an unmodifiable copy of this vector.
-
operator_add
default void operator_add(Vector2D<?,?> v)
Description copied from interface:Vector2D
Add a vector to this vector:this += v
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
-
operator_remove
default void operator_remove(Vector2D<?,?> v)
Description copied from interface:Vector2D
Substract a vector to this vector:this -= v
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
-
-