Package org.arakhne.afc.math.geometry.d2
Interface UnmodifiableTuple2D<RT extends Tuple2D<? super RT>>
-
- Type Parameters:
RT
- is the type of data that can be returned by this tuple.
- All Superinterfaces:
Cloneable
,JsonableObject
,Serializable
,Tuple2D<RT>
- All Known Subinterfaces:
UnmodifiablePoint1D<RP,RV,RS>
,UnmodifiablePoint2D<RP,RV>
,UnmodifiableVector1D<RV,RP,RS>
,UnmodifiableVector2D<RV,RP>
- All Known Implementing Classes:
ImmutablePoint1D
,ImmutablePoint2D
,ImmutableVector1D
,ImmutableVector2D
public interface UnmodifiableTuple2D<RT extends Tuple2D<? super RT>> extends Tuple2D<RT>
Unmodifiable 2D tuple.- 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
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
absolute()
Sets each component of this tuple to its absolute value.default void
absolute(Tuple2D<?> tuple)
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.default void
add(double x, double y)
Sets the value of this tuple to the sum of itself and x and y.default void
add(int x, int y)
Sets the value of this tuple to the sum of itself and x and y.default void
addX(double x)
Sets the x value of this tuple to the sum of itself and x.default void
addX(int x)
Sets the x value of this tuple to the sum of itself and x.default void
addY(double y)
Sets the y value of this tuple to the sum of itself and y.default void
addY(int y)
Sets the y value of this tuple to the sum of itself and y.default void
clamp(double min, double max)
Clamps this tuple to the range [low, high].default void
clamp(double min, double max, Tuple2D<?> tuple)
Clamps the tuple parameter to the range [low, high] and places the values into this tuple.default void
clamp(int min, int max)
Clamps this tuple to the range [low, high].default void
clamp(int min, int max, Tuple2D<?> tuple)
Clamps the tuple parameter to the range [min, max] and places the values into this tuple.default void
clampMax(double max)
Clamps the maximum value of this tuple to the max parameter.default void
clampMax(double max, Tuple2D<?> tuple)
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.default void
clampMax(int max)
Clamps the maximum value of this tuple to the max parameter.default void
clampMax(int max, Tuple2D<?> tuple)
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.default void
clampMin(double min)
Clamps the minimum value of this tuple to the min parameter.default void
clampMin(double min, Tuple2D<?> tuple)
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.default void
clampMin(int min)
Clamps the minimum value of this tuple to the min parameter.default void
clampMin(int min, Tuple2D<?> tuple)
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.default void
interpolate(Tuple2D<?> tuple, double alpha)
Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.default void
interpolate(Tuple2D<?> tuple1, Tuple2D<?> tuple2, double alpha)
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.default void
negate()
Negates the value of this tuple in place.default void
negate(Tuple2D<?> tuple)
Sets the value of this tuple to the negation of tuple t1.default void
scale(double scale)
Sets the value of this tuple to the scalar multiplication of the scale factor with this.default void
scale(double scale, Tuple2D<?> tuple)
Sets the value of this tuple to the scalar multiplication of tuple t1.default void
scale(int scale)
Sets the value of this tuple to the scalar multiplication of the scale factor with this.default void
scale(int scale, Tuple2D<?> tuple)
Sets the value of this tuple to the scalar multiplication of tuple t1.default void
set(double[] tuple)
Sets the value of this tuple from the 2 values specified in the array.default void
set(double x, double y)
Sets the value of this tuple to the specified x and y coordinates.default void
set(int[] tuple)
Sets the value of this tuple from the 2 values specified in the array.default void
set(int x, int y)
Sets the value of this tuple to the specified x and y coordinates.default void
set(Tuple2D<?> tuple)
Sets the value of this tuple to the value of tuple t1.default void
setX(double x)
Set the x coordinate.default void
setX(int x)
Set the x coordinate.default void
setY(double y)
Set the y coordinate.default void
setY(int y)
Set the y coordinate.default void
sub(double x, double y)
Sets the value of this tuple to the difference of itself and x and y.default void
sub(int x, int y)
Sets the value of this tuple to the difference of itself and x and y.default void
subX(double x)
Sets the x value of this tuple to the difference of itself and x.default void
subX(int x)
Sets the x value of this tuple to the difference of itself and x.default void
subY(double y)
Sets the y value of this tuple to the difference of itself and y.default void
subY(int y)
Sets the y value of this tuple to the difference of itself and y.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
-
-
-
Method Detail
-
absolute
default void absolute()
Description copied from interface:Tuple2D
Sets each component of this tuple to its absolute value.
-
absolute
default void absolute(Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
-
add
default void add(int x, int y)
Description copied from interface:Tuple2D
Sets the value of this tuple to the sum of itself and x and y.
-
add
default void add(double x, double y)
Description copied from interface:Tuple2D
Sets the value of this tuple to the sum of itself and x and y.
-
addX
default void addX(int x)
Description copied from interface:Tuple2D
Sets the x value of this tuple to the sum of itself and x.
-
addX
default void addX(double x)
Description copied from interface:Tuple2D
Sets the x value of this tuple to the sum of itself and x.
-
addY
default void addY(int y)
Description copied from interface:Tuple2D
Sets the y value of this tuple to the sum of itself and y.
-
addY
default void addY(double y)
Description copied from interface:Tuple2D
Sets the y value of this tuple to the sum of itself and y.
-
clamp
default void clamp(int min, int max)
Description copied from interface:Tuple2D
Clamps this tuple to the range [low, high].
-
clamp
default void clamp(double min, double max)
Description copied from interface:Tuple2D
Clamps this tuple to the range [low, high].
-
clamp
default void clamp(int min, int max, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Clamps the tuple parameter to the range [min, max] and places the values into this tuple.
-
clamp
default void clamp(double min, double max, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
-
clampMin
default void clampMin(int min)
Description copied from interface:Tuple2D
Clamps the minimum value of this tuple to the min parameter.
-
clampMin
default void clampMin(double min)
Description copied from interface:Tuple2D
Clamps the minimum value of this tuple to the min parameter.
-
clampMin
default void clampMin(int min, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
-
clampMin
default void clampMin(double min, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
-
clampMax
default void clampMax(int max)
Description copied from interface:Tuple2D
Clamps the maximum value of this tuple to the max parameter.
-
clampMax
default void clampMax(double max)
Description copied from interface:Tuple2D
Clamps the maximum value of this tuple to the max parameter.
-
clampMax
default void clampMax(int max, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
-
clampMax
default void clampMax(double max, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
-
negate
default void negate(Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Sets the value of this tuple to the negation of tuple t1.
-
negate
default void negate()
Description copied from interface:Tuple2D
Negates the value of this tuple in place.
-
scale
default void scale(int scale, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Sets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
default void scale(double scale, Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Sets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
default void scale(int scale)
Description copied from interface:Tuple2D
Sets the value of this tuple to the scalar multiplication of the scale factor with this.
-
scale
default void scale(double scale)
Description copied from interface:Tuple2D
Sets the value of this tuple to the scalar multiplication of the scale factor with this.
-
set
default void set(Tuple2D<?> tuple)
Description copied from interface:Tuple2D
Sets the value of this tuple to the value of tuple t1.
-
set
default void set(int x, int y)
Description copied from interface:Tuple2D
Sets the value of this tuple to the specified x and y coordinates.
-
set
default void set(double x, double y)
Description copied from interface:Tuple2D
Sets the value of this tuple to the specified x and y coordinates.
-
set
default void set(int[] tuple)
Description copied from interface:Tuple2D
Sets the value of this tuple from the 2 values specified in the array.
-
set
default void set(double[] tuple)
Description copied from interface:Tuple2D
Sets the value of this tuple from the 2 values specified in the array.
-
setX
default void setX(int x)
Description copied from interface:Tuple2D
Set the x coordinate.
-
setX
default void setX(double x)
Description copied from interface:Tuple2D
Set the x coordinate.
-
setY
default void setY(int y)
Description copied from interface:Tuple2D
Set the y coordinate.
-
setY
default void setY(double y)
Description copied from interface:Tuple2D
Set the y coordinate.
-
sub
default void sub(int x, int y)
Description copied from interface:Tuple2D
Sets the value of this tuple to the difference of itself and x and y.
-
sub
default void sub(double x, double y)
Description copied from interface:Tuple2D
Sets the value of this tuple to the difference of itself and x and y.
-
subX
default void subX(int x)
Description copied from interface:Tuple2D
Sets the x value of this tuple to the difference of itself and x.
-
subX
default void subX(double x)
Description copied from interface:Tuple2D
Sets the x value of this tuple to the difference of itself and x.
-
subY
default void subY(int y)
Description copied from interface:Tuple2D
Sets the y value of this tuple to the difference of itself and y.
-
subY
default void subY(double y)
Description copied from interface:Tuple2D
Sets the y value of this tuple to the difference of itself and y.
-
interpolate
default void interpolate(Tuple2D<?> tuple1, Tuple2D<?> tuple2, double alpha)
Description copied from interface:Tuple2D
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.- Specified by:
interpolate
in interfaceTuple2D<RT extends Tuple2D<? super RT>>
- Parameters:
tuple1
- the first tupletuple2
- the second tuplealpha
- the alpha interpolation parameter (value in [0;1]).
-
interpolate
default void interpolate(Tuple2D<?> tuple, double alpha)
Description copied from interface:Tuple2D
Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.- Specified by:
interpolate
in interfaceTuple2D<RT extends Tuple2D<? super RT>>
- Parameters:
tuple
- the first tuplealpha
- the alpha interpolation parameter
-
-