Package org.arakhne.afc.math.geometry.d3
Interface Tuple3D<RT extends Tuple3D<? super RT>>
-
- Type Parameters:
RT- is the type of data that can be added or substracted to this tuple.
- All Superinterfaces:
Cloneable,JsonableObject,Serializable
- All Known Subinterfaces:
OrientedPoint3D<RP,RV>,Point3D<RP,RV>,UnmodifiablePoint3D<RP,RV>,UnmodifiableTuple3D<RT>,UnmodifiableVector3D<RV,RP>,Vector3D<RV,RP>
- All Known Implementing Classes:
ESRIPoint,ImmutablePoint3D,ImmutableVector3D,InnerComputationPoint3afp,InnerComputationPoint3ai,InnerComputationVector3afp,InnerComputationVector3ai,OrientedPoint3d,OrientedPoint3dfx,OrientedPoint3i,OrientedPoint3ifx,Point3d,Point3dfx,Point3i,Point3ifx,Tuple3d,Tuple3dfx,Tuple3i,Tuple3ifx,Vector3d,Vector3dfx,Vector3i,Vector3ifx
public interface Tuple3D<RT extends Tuple3D<? super RT>> extends Cloneable, Serializable, JsonableObject
3D tuple.- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidabsolute()Sets each component of this tuple to its absolute value.default voidabsolute(Tuple3D<?> tuple)Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.default voidadd(double x, double y, double z)Sets the value of this tuple to the sum of itself and x and y.default voidadd(int x, int y, int z)Sets the value of this tuple to the sum of itself and x and y.default voidaddX(double x)Sets the x value of this tuple to the sum of itself and x.default voidaddX(int x)Sets the x value of this tuple to the sum of itself and x.default voidaddY(double y)Sets the y value of this tuple to the sum of itself and y.default voidaddY(int y)Sets the y value of this tuple to the sum of itself and y.default voidaddZ(double z)Sets the z value of this tuple to the sum of itself and z.default voidaddZ(int z)Sets the z value of this tuple to the sum of itself and z.default voidclamp(double min, double max)Clamps this tuple to the range [low, high].default voidclamp(double min, double max, Tuple3D<?> tuple)Clamps the tuple parameter to the range [low, high] and places the values into this tuple.default voidclamp(int min, int max)Clamps this tuple to the range [low, high].default voidclamp(int min, int max, Tuple3D<?> tuple)Clamps the tuple parameter to the range [low, high] and places the values into this tuple.default voidclampMax(double max)Clamps the maximum value of this tuple to the max parameter.default voidclampMax(double max, Tuple3D<?> tuple)Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.default voidclampMax(int max)Clamps the maximum value of this tuple to the max parameter.default voidclampMax(int max, Tuple3D<?> tuple)Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.default voidclampMin(double min)Clamps the minimum value of this tuple to the min parameter.default voidclampMin(double min, Tuple3D<?> tuple)Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.default voidclampMin(int min)Clamps the minimum value of this tuple to the min parameter.default voidclampMin(int min, Tuple3D<?> tuple)Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.RTclone()Clone this point.default booleanepsilonEquals(Tuple3D<?> tuple, double epsilon)Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false.booleanequals(Object t1)Returns true if the Object t1 is of type Tuple2f and all of the data members of t1 are equal to the corresponding data members in this Tuple2f.default booleanequals(Tuple3D<?> tuple)Returns true if all of the data members of Tuple2f t1 are equal to the corresponding data members in this Tuple2f.default voidget(double[] tuple)Copies the value of the elements of this tuple into the array tuple.default voidget(int[] tuple)Copies the value of the elements of this tuple into the array tuple.default voidget(Tuple3D<?> tuple)Copies the values of this tuple into the tuple tuple.doublegetX()Get the x coordinate.doublegetY()Get the y coordinate.doublegetZ()Get the z coordinate.inthashCode()Returns a hash code value based on the data values in this object.default voidinterpolate(Tuple3D<?> 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 voidinterpolate(Tuple3D<?> tuple1, Tuple3D<?> tuple2, double alpha)Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.intix()Get the x coordinate.intiy()Get the y coordinate.intiz()Get the z coordinate.default voidnegate()Negates the value of this tuple in place.default voidnegate(Tuple3D<?> tuple)Sets the value of this tuple to the negation of tuple t1.default voidscale(double scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.default voidscale(double scale, Tuple3D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.default voidscale(int scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.default voidscale(int scale, Tuple3D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.default voidset(double[] tuple)Sets the value of this tuple from the 2 values specified in the array.default voidset(double x, double y, double z)Sets the value of this tuple to the specified x and y and z coordinates.default voidset(int[] tuple)Sets the value of this tuple from the 3 values specified in the array.default voidset(int x, int y, int z)Sets the value of this tuple to the specified x and y and z coordinates.default voidset(Tuple3D<?> tuple)Sets the value of this tuple to the value of tuple t1.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.voidsetZ(double z)Set the z coordinate.voidsetZ(int z)Set the z coordinate.default voidsub(double x, double y, double z)Sets the value of this tuple to the difference of itself and x, y and z.default voidsub(int x, int y, int z)Sets the value of this tuple to the difference of itself and x, y and z.default voidsubX(double x)Sets the x value of this tuple to the difference of itself and x.default voidsubX(int x)Sets the x value of this tuple to the difference of itself and x.default voidsubY(double y)Sets the y value of this tuple to the difference of itself and y.default voidsubY(int y)Sets the y value of this tuple to the difference of itself and y.default voidsubZ(double z)Sets the z value of this tuple to the difference of itself and z.default voidsubZ(int z)Sets the z value of this tuple to the difference of itself and z.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
-
-
-
Method Detail
-
clone
@Pure RT clone()
Clone this point.- Returns:
- the clone.
-
absolute
default void absolute()
Sets each component of this tuple to its absolute value.
-
absolute
default void absolute(Tuple3D<?> tuple)
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.- Parameters:
tuple- the source tuple, which will not be modified
-
add
default void add(int x, int y, int z)Sets the value of this tuple to the sum of itself and x and y.- Parameters:
x- x coordinate to add.y- y coordinate to add.z- z coordinate to add.
-
add
default void add(double x, double y, double z)Sets the value of this tuple to the sum of itself and x and y.- Parameters:
x- x coordinate to add.y- y coordinate to add.z- z coordinate to add.
-
addX
default void addX(int x)
Sets the x value of this tuple to the sum of itself and x.- Parameters:
x- x coordinate to add.
-
addX
default void addX(double x)
Sets the x value of this tuple to the sum of itself and x.- Parameters:
x- x coordinate to add.
-
addY
default void addY(int y)
Sets the y value of this tuple to the sum of itself and y.- Parameters:
y- y coordinate to add.
-
addY
default void addY(double y)
Sets the y value of this tuple to the sum of itself and y.- Parameters:
y- y coordinate to add.
-
addZ
default void addZ(int z)
Sets the z value of this tuple to the sum of itself and z.- Parameters:
z- z coordinate to add.
-
addZ
default void addZ(double z)
Sets the z value of this tuple to the sum of itself and z.- Parameters:
z- z coordinate to add.
-
clamp
default void clamp(int min, int max)Clamps this tuple to the range [low, high].- Parameters:
min- the lowest value in this tuple after clampingmax- the highest value in this tuple after clamping
-
clamp
default void clamp(int min, int max, Tuple3D<?> tuple)Clamps the tuple parameter to the range [low, high] and places the values into this tuple.- Parameters:
min- the lowest value in the tuple after clampingmax- the highest value in the tuple after clampingtuple- the source tuple, which will not be modified
-
clamp
default void clamp(double min, double max)Clamps this tuple to the range [low, high].- Parameters:
min- the lowest value in this tuple after clampingmax- the highest value in this tuple after clamping
-
clamp
default void clamp(double min, double max, Tuple3D<?> tuple)Clamps the tuple parameter to the range [low, high] and places the values into this tuple.- Parameters:
min- the lowest value in the tuple after clampingmax- the highest value in the tuple after clampingtuple- the source tuple, which will not be modified
-
clampMin
default void clampMin(int min)
Clamps the minimum value of this tuple to the min parameter.- Parameters:
min- the lowest value in this tuple after clamping
-
clampMin
default void clampMin(double min)
Clamps the minimum value of this tuple to the min parameter.- Parameters:
min- the lowest value in this tuple after clamping
-
clampMin
default void clampMin(int min, Tuple3D<?> tuple)Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.- Parameters:
min- the lowest value in the tuple after clampingtuple- the source tuple, which will not be modified
-
clampMin
default void clampMin(double min, Tuple3D<?> tuple)Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.- Parameters:
min- the lowest value in the tuple after clampingtuple- the source tuple, which will not be modified
-
clampMax
default void clampMax(int max)
Clamps the maximum value of this tuple to the max parameter.- Parameters:
max- the highest value in the tuple after clamping
-
clampMax
default void clampMax(double max)
Clamps the maximum value of this tuple to the max parameter.- Parameters:
max- the highest value in the tuple after clamping
-
clampMax
default void clampMax(int max, Tuple3D<?> tuple)Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.- Parameters:
max- the highest value in the tuple after clampingtuple- the source tuple, which will not be modified
-
clampMax
default void clampMax(double max, Tuple3D<?> tuple)Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.- Parameters:
max- the highest value in the tuple after clampingtuple- the source tuple, which will not be modified
-
get
default void get(Tuple3D<?> tuple)
Copies the values of this tuple into the tuple tuple.- Parameters:
tuple- is the target tuple
-
get
default void get(int[] tuple)
Copies the value of the elements of this tuple into the array tuple.- Parameters:
tuple- the array that will contain the values of the vector
-
get
default void get(double[] tuple)
Copies the value of the elements of this tuple into the array tuple.- Parameters:
tuple- the array that will contain the values of the vector
-
negate
default void negate(Tuple3D<?> tuple)
Sets the value of this tuple to the negation of tuple t1.- Parameters:
tuple- the source tuple
-
negate
default void negate()
Negates the value of this tuple in place.
-
scale
default void scale(int scale, Tuple3D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.- Parameters:
scale- the scalar valuetuple- the source tuple
-
scale
default void scale(double scale, Tuple3D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.- Parameters:
scale- the scalar valuetuple- the source tuple
-
scale
default void scale(int scale)
Sets the value of this tuple to the scalar multiplication of the scale factor with this.- Parameters:
scale- the scalar value
-
scale
default void scale(double scale)
Sets the value of this tuple to the scalar multiplication of the scale factor with this.- Parameters:
scale- the scalar value
-
set
default void set(Tuple3D<?> tuple)
Sets the value of this tuple to the value of tuple t1.- Parameters:
tuple- the tuple to be copied
-
set
default void set(int x, int y, int z)Sets the value of this tuple to the specified x and y and z coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate
-
set
default void set(double x, double y, double z)Sets the value of this tuple to the specified x and y and z coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate
-
set
default void set(int[] tuple)
Sets the value of this tuple from the 3 values specified in the array.- Parameters:
tuple- the array of length 2 containing xyz in order
-
set
default void set(double[] tuple)
Sets the value of this tuple from the 2 values specified in the array.- Parameters:
tuple- the array of length 2 containing xy in order
-
getX
@Pure double getX()
Get the x coordinate.- Returns:
- the x coordinate.
-
ix
@Pure int ix()
Get the x coordinate.- Returns:
- the x coordinate.
-
setX
void setX(int x)
Set the x coordinate.- Parameters:
x- value to x coordinate.
-
setX
void setX(double x)
Set the x coordinate.- Parameters:
x- value to x coordinate.
-
getY
@Pure double getY()
Get the y coordinate.- Returns:
- the y coordinate.
-
iy
@Pure int iy()
Get the y coordinate.- Returns:
- the y coordinate.
-
setY
void setY(int y)
Set the y coordinate.- Parameters:
y- value to y coordinate.
-
setY
void setY(double y)
Set the y coordinate.- Parameters:
y- value to y coordinate.
-
getZ
@Pure double getZ()
Get the z coordinate.- Returns:
- the z coordinate.
-
iz
@Pure int iz()
Get the z coordinate.- Returns:
- the z coordinate.
-
setZ
void setZ(int z)
Set the z coordinate.- Parameters:
z- value to z coordinate.
-
setZ
void setZ(double z)
Set the z coordinate.- Parameters:
z- value to z coordinate.
-
sub
default void sub(int x, int y, int z)Sets the value of this tuple to the difference of itself and x, y and z.- Parameters:
x- x coordinate to substract.y- y coordinate to substract.z- y coordinate to substract.
-
sub
default void sub(double x, double y, double z)Sets the value of this tuple to the difference of itself and x, y and z.- Parameters:
x- x coordinate to substract.y- y coordinate to substract.z- y coordinate to substract.
-
subX
default void subX(int x)
Sets the x value of this tuple to the difference of itself and x.- Parameters:
x- x coordinate to substract.
-
subX
default void subX(double x)
Sets the x value of this tuple to the difference of itself and x.- Parameters:
x- x coordinate to substract.
-
subY
default void subY(int y)
Sets the y value of this tuple to the difference of itself and y.- Parameters:
y- y coordinate to substract.
-
subY
default void subY(double y)
Sets the y value of this tuple to the difference of itself and y.- Parameters:
y- y coordinate to substract.
-
subZ
default void subZ(int z)
Sets the z value of this tuple to the difference of itself and z.- Parameters:
z- y coordinate to substract.
-
subZ
default void subZ(double z)
Sets the z value of this tuple to the difference of itself and z.- Parameters:
z- y coordinate to substract.
-
interpolate
default void interpolate(Tuple3D<?> tuple1, Tuple3D<?> tuple2, double alpha)
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.- Parameters:
tuple1- the first tupletuple2- the second tuplealpha- the alpha interpolation parameter
-
interpolate
default void interpolate(Tuple3D<?> tuple, double alpha)
Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.- Parameters:
tuple- the first tuplealpha- the alpha interpolation parameter
-
equals
@Pure default boolean equals(Tuple3D<?> tuple)
Returns true if all of the data members of Tuple2f t1 are equal to the corresponding data members in this Tuple2f.- Parameters:
tuple- the vector with which the comparison is made- Returns:
- true or false
-
equals
@Pure boolean equals(Object t1)
Returns true if the Object t1 is of type Tuple2f and all of the data members of t1 are equal to the corresponding data members in this Tuple2f.
-
epsilonEquals
@Pure default boolean epsilonEquals(Tuple3D<?> tuple, double epsilon)
Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Parameters:
tuple- the tuple to be compared to this tupleepsilon- the threshold value- Returns:
- true or false
-
hashCode
@Pure int hashCode()
Returns a hash code value based on the data values in this object. Two different Tuple2f objects with identical data values (i.e., Tuple2f.equals 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.
-
-