public abstract class Tuple3d
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
double |
x
The x coordinate.
|
double |
y
The y coordinate.
|
double |
z
The z coordinate.
|
Constructor and Description |
---|
Tuple3d()
Constructs and initializes a Tuple3d to (0,0,0).
|
Modifier and Type | Method and Description |
---|---|
void |
add(Tuple3d t1)
Sets the value of this tuple to the vector sum of itself and tuple t1.
|
void |
add2(Tuple3d t1,
Tuple3d t2)
Sets the value of this tuple to the vector sum of tuples t1 and t2.
|
(package private) static long |
doubleToLongBits0(double d) |
boolean |
equals(java.lang.Object t1)
Returns true if all of the data members of Tuple3d t1 are equal to the
corresponding data members in this
|
int |
hashCode()
Returns a hash number based on the data values in this object.
|
void |
scale(double s)
Sets the value of this tuple to the scalar multiplication of itself.
|
void |
scaleAdd(double s,
Tuple3d t1,
Tuple3d t2)
Sets the value of this tuple to the scalar multiplication of tuple t1 and
then adds tuple t2 (this = s*t1 + t2).
|
void |
set(double x,
double y,
double z)
Sets the value of this tuple to the specified xyz coordinates.
|
void |
setA(double[] t)
Sets the value of this tuple from the 3 values specified in the array.
|
void |
setT(Tuple3d t1)
Sets the value of this tuple to the value of the Tuple3d argument.
|
void |
sub(Tuple3d t1)
Sets the value of this tuple to the vector difference of itself and tuple
t1 (this = this - t1).
|
void |
sub2(Tuple3d t1,
Tuple3d t2)
Sets the value of this tuple to the vector difference of tuple t1 and t2
(this = t1 - t2).
|
java.lang.String |
toString()
Returns a string that contains the values of this Tuple3d.
|
public double x
public double y
public double z
public final void set(double x, double y, double z)
x
- the x coordinatey
- the y coordinatez
- the z coordinatepublic final void setA(double[] t)
t
- the array of length 3 containing xyz in orderpublic final void setT(Tuple3d t1)
t1
- the tuple to be copiedpublic final void add2(Tuple3d t1, Tuple3d t2)
t1
- the first tuplet2
- the second tuplepublic final void add(Tuple3d t1)
t1
- the other tuplepublic final void sub2(Tuple3d t1, Tuple3d t2)
t1
- the first tuplet2
- the second tuplepublic final void sub(Tuple3d t1)
t1
- the other tuplepublic final void scale(double s)
s
- the scalar valuepublic final void scaleAdd(double s, Tuple3d t1, Tuple3d t2)
s
- the scalar valuet1
- the tuple to be multipledt2
- the tuple to be addedpublic int hashCode()
hashCode
in class java.lang.Object
static long doubleToLongBits0(double d)
public boolean equals(java.lang.Object t1)
equals
in class java.lang.Object
t1
- the vector with which the comparison is made.public java.lang.String toString()
toString
in class java.lang.Object