Class Tuple3d<RT extends Tuple3d<? super RT>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.d.Tuple3d<RT>
-
- Type Parameters:
RT- is the type of the data returned by the tuple.
- All Implemented Interfaces:
Serializable,Cloneable,Tuple3D<RT>,JsonableObject
public class Tuple3d<RT extends Tuple3d<? super RT>> extends Object implements Tuple3D<RT>
3D tuple with 3 double precision floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description Tuple3d()Construct a zero tuple.Tuple3d(double[] tuple)Constructor.Tuple3d(double x, double y, double z)Construct a tuple with the given coordinates.Tuple3d(int[] tuple)Constructor.Tuple3d(int x, int y, int z)Construct a tuple with the given coordinates.Tuple3d(Tuple3D<?> tuple)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabsolute()Sets each component of this tuple to its absolute value.voidabsolute(Tuple3D<?> tuple)Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.voidadd(double x, double y, double z)Sets the value of this tuple to the sum of itself and x and y.voidadd(int x, int y, int z)Sets the value of this tuple to the sum of itself and x and y.voidaddX(double x)Sets the x value of this tuple to the sum of itself and x.voidaddX(int x)Sets the x value of this tuple to the sum of itself and x.voidaddY(double y)Sets the y value of this tuple to the sum of itself and y.voidaddY(int y)Sets the y value of this tuple to the sum of itself and y.voidaddZ(double z)Sets the z value of this tuple to the sum of itself and z.voidaddZ(int z)Sets the z value of this tuple to the sum of itself and z.RTclone()Clone this point.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.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.intix()Get the x coordinate.intiy()Get the y coordinate.intiz()Get the z coordinate.voidnegate()Negates the value of this tuple in place.voidnegate(Tuple3D<?> tuple)Sets the value of this tuple to the negation of tuple t1.voidscale(double scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.voidscale(double scale, Tuple3D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.voidscale(int scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.voidscale(int scale, Tuple3D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.voidset(double[] tuple)Sets the value of this tuple from the 2 values specified in the array.voidset(double x, double y, double z)Sets the value of this tuple to the specified x and y and z coordinates.voidset(int[] tuple)Sets the value of this tuple from the 3 values specified in the array.voidset(int x, int y, int z)Sets the value of this tuple to the specified x and y and z coordinates.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.voidsub(double x, double y, double z)Sets the value of this tuple to the difference of itself and x, y and z.voidsub(int x, int y, int z)Sets the value of this tuple to the difference of itself and x, y and z.voidsubX(double x)Sets the x value of this tuple to the difference of itself and x.voidsubX(int x)Sets the x value of this tuple to the difference of itself and x.voidsubY(double y)Sets the y value of this tuple to the difference of itself and y.voidsubY(int y)Sets the y value of this tuple to the difference of itself and y.voidsubZ(double z)Sets the z value of this tuple to the difference of itself and z.voidsubZ(int z)Sets the z value of this tuple to the difference of itself and z.voidtoJson(JsonBuffer buffer)Replies the Json representation of this node.StringtoString()
-
-
-
Constructor Detail
-
Tuple3d
public Tuple3d()
Construct a zero tuple.
-
Tuple3d
public Tuple3d(Tuple3D<?> tuple)
Constructor.- Parameters:
tuple- is the tuple to copy.
-
Tuple3d
public Tuple3d(int[] tuple)
Constructor.- Parameters:
tuple- is the tuple to copy.
-
Tuple3d
public Tuple3d(double[] tuple)
Constructor.- Parameters:
tuple- is the tuple to copy.
-
Tuple3d
public Tuple3d(int x, int y, int z)Construct a tuple with the given coordinates.- Parameters:
x- x coordinate.y- y coordinate.z- z coordinate.
-
Tuple3d
public Tuple3d(double x, double y, double z)Construct a tuple with the given coordinates.- Parameters:
x- x coordinate.y- y coordinate.z- z coordinate.
-
-
Method Detail
-
absolute
public void absolute()
Description copied from interface:Tuple3DSets each component of this tuple to its absolute value.
-
absolute
public void absolute(Tuple3D<?> tuple)
Description copied from interface:Tuple3DSets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
-
add
public void add(int x, int y, int z)Description copied from interface:Tuple3DSets the value of this tuple to the sum of itself and x and y.
-
add
public void add(double x, double y, double z)Description copied from interface:Tuple3DSets the value of this tuple to the sum of itself and x and y.
-
addX
public void addX(int x)
Description copied from interface:Tuple3DSets the x value of this tuple to the sum of itself and x.
-
addX
public void addX(double x)
Description copied from interface:Tuple3DSets the x value of this tuple to the sum of itself and x.
-
addY
public void addY(int y)
Description copied from interface:Tuple3DSets the y value of this tuple to the sum of itself and y.
-
addY
public void addY(double y)
Description copied from interface:Tuple3DSets the y value of this tuple to the sum of itself and y.
-
addZ
public void addZ(int z)
Description copied from interface:Tuple3DSets the z value of this tuple to the sum of itself and z.
-
addZ
public void addZ(double z)
Description copied from interface:Tuple3DSets the z value of this tuple to the sum of itself and z.
-
negate
public void negate(Tuple3D<?> tuple)
Description copied from interface:Tuple3DSets the value of this tuple to the negation of tuple t1.
-
negate
public void negate()
Description copied from interface:Tuple3DNegates the value of this tuple in place.
-
scale
public void scale(int scale, Tuple3D<?> tuple)Description copied from interface:Tuple3DSets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
public void scale(double scale, Tuple3D<?> tuple)Description copied from interface:Tuple3DSets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
public void scale(int scale)
Description copied from interface:Tuple3DSets the value of this tuple to the scalar multiplication of the scale factor with this.
-
scale
public void scale(double scale)
Description copied from interface:Tuple3DSets the value of this tuple to the scalar multiplication of the scale factor with this.
-
set
public void set(Tuple3D<?> tuple)
Description copied from interface:Tuple3DSets the value of this tuple to the value of tuple t1.
-
set
public void set(int x, int y, int z)Description copied from interface:Tuple3DSets the value of this tuple to the specified x and y and z coordinates.
-
set
public void set(double x, double y, double z)Description copied from interface:Tuple3DSets the value of this tuple to the specified x and y and z coordinates.
-
set
public void set(int[] tuple)
Description copied from interface:Tuple3DSets the value of this tuple from the 3 values specified in the array.
-
set
public void set(double[] tuple)
Description copied from interface:Tuple3DSets the value of this tuple from the 2 values specified in the array.
-
getX
@Pure public double getX()
Description copied from interface:Tuple3DGet the x coordinate.
-
ix
@Pure public int ix()
Description copied from interface:Tuple3DGet the x coordinate.
-
setX
public void setX(int x)
Description copied from interface:Tuple3DSet the x coordinate.
-
setX
public void setX(double x)
Description copied from interface:Tuple3DSet the x coordinate.
-
getY
@Pure public double getY()
Description copied from interface:Tuple3DGet the y coordinate.
-
iy
@Pure public int iy()
Description copied from interface:Tuple3DGet the y coordinate.
-
setY
public void setY(int y)
Description copied from interface:Tuple3DSet the y coordinate.
-
setY
public void setY(double y)
Description copied from interface:Tuple3DSet the y coordinate.
-
getZ
@Pure public double getZ()
Description copied from interface:Tuple3DGet the z coordinate.
-
iz
@Pure public int iz()
Description copied from interface:Tuple3DGet the z coordinate.
-
setZ
public void setZ(int z)
Description copied from interface:Tuple3DSet the z coordinate.
-
setZ
public void setZ(double z)
Description copied from interface:Tuple3DSet the z coordinate.
-
sub
public void sub(int x, int y, int z)Description copied from interface:Tuple3DSets the value of this tuple to the difference of itself and x, y and z.
-
sub
public void sub(double x, double y, double z)Description copied from interface:Tuple3DSets the value of this tuple to the difference of itself and x, y and z.
-
subX
public void subX(int x)
Description copied from interface:Tuple3DSets the x value of this tuple to the difference of itself and x.
-
subX
public void subX(double x)
Description copied from interface:Tuple3DSets the x value of this tuple to the difference of itself and x.
-
subY
public void subY(int y)
Description copied from interface:Tuple3DSets the y value of this tuple to the difference of itself and y.
-
subY
public void subY(double y)
Description copied from interface:Tuple3DSets the y value of this tuple to the difference of itself and y.
-
subZ
public void subZ(int z)
Description copied from interface:Tuple3DSets the z value of this tuple to the difference of itself and z.
-
subZ
public void subZ(double z)
Description copied from interface:Tuple3DSets the z value of this tuple to the difference of itself and z.
-
equals
@Pure public boolean equals(Object t1)
Description copied from interface:Tuple3DReturns 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.
-
hashCode
@Pure public int hashCode()
Description copied from interface:Tuple3DReturns 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.
-
toJson
public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Parameters:
buffer- the Json buffer.
-
-