java.io.Serializablepublic abstract class Tuple3f
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
float |
x |
The x coordinate.
|
float |
y |
The y coordinate.
|
float |
z |
The z coordinate.
|
| Constructor | Description |
|---|---|
Tuple3f() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(Tuple3f t1) |
Sets the value of this tuple to the vector sum of itself and tuple t1.
|
void |
add2(Tuple3f t1,
Tuple3f t2) |
Sets the value of this tuple to the vector sum of tuples t1 and t2.
|
boolean |
equals(java.lang.Object t1) |
Returns true if all of the data members of Tuple3f 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(float s) |
Sets the value of this tuple to the scalar multiplication of itself.
|
void |
scaleAdd(float s,
Tuple3f t1) |
Sets the value of this tuple to the scalar multiplication of itself and
then adds tuple t1 (this = s*this + t1).
|
void |
scaleAdd2(float s,
Tuple3f t1,
Tuple3f 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(float x,
float y,
float z) |
Sets the value of this tuple to the specified xyz coordinates.
|
void |
setA(float[] t) |
Sets the value of this tuple from the 3 values specified in the array.
|
void |
setT(Tuple3f t1) |
Sets the value of this tuple to the value of the Tuple3f argument.
|
void |
sub(Tuple3f t1) |
Sets the value of this tuple to the vector difference of itself and tuple
t1 (this = this - t1).
|
void |
sub2(Tuple3f t1,
Tuple3f 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 Tuple3f.
|
public float x
public float y
public float z
public final void set(float x,
float y,
float z)
x - the x coordinatey - the y coordinatez - the z coordinatepublic final void setA(float[] t)
t - the array of length 3 containing xyz in orderpublic final void setT(Tuple3f t1)
t1 - the tuple to be copiedpublic final void add2(Tuple3f t1, Tuple3f t2)
t1 - the first tuplet2 - the second tuplepublic final void add(Tuple3f t1)
t1 - the other tuplepublic final void sub2(Tuple3f t1, Tuple3f t2)
t1 - the first tuplet2 - the second tuplepublic final void sub(Tuple3f t1)
t1 - the other tuplepublic final void scale(float s)
s - the scalar valuepublic final void scaleAdd2(float s,
Tuple3f t1,
Tuple3f t2)
s - the scalar valuet1 - the tuple to be multipledt2 - the tuple to be addedpublic final void scaleAdd(float s,
Tuple3f t1)
s - the scalar valuet1 - the tuple to be addedpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object t1)
equals in class java.lang.Objectt1 - the vector with which the comparison is made.public java.lang.String toString()
toString in class java.lang.Object