|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkeps.math.Tuple3
public class Tuple3
GENERAL CONTRACT FOR ALL MATH CLASSES. -- The destination of every method is assumed to be the object the method was called on. For example: c.add(a,b) means c = a + b. -- Whenever one operand of a binary operand is missing, it is assumed to be the object the method was called upon. For example: c.add(a) means c = c + a. Base class for 3d tuples (ie. points and vectors).
| Field Summary | |
|---|---|
double |
x
The x coordinate of the Tuple3. |
double |
y
The y coordinate of the Tuple3. |
double |
z
The z coordinate of the Tuple3. |
| Constructor Summary | |
|---|---|
Tuple3()
Default constructor. |
|
Tuple3(double newX,
double newY,
double newZ)
The explicit constructor. |
|
Tuple3(Tuple3 newTuple)
Copy constructor. |
|
| Method Summary | |
|---|---|
void |
scale(double op1)
Scale this Tuple3 by op1 |
void |
set(double inX,
double inY,
double inZ)
Set the value of this Tuple3 to the three input values |
void |
set(Tuple3 inTuple)
Sets this tuple to have the contents of another tuple. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double x
public double y
public double z
| Constructor Detail |
|---|
public Tuple3()
public Tuple3(Tuple3 newTuple)
newTuple - The vector to copy.
public Tuple3(double newX,
double newY,
double newZ)
newX - The x value of the new vector.newY - The y value of the new vector.newZ - The z value of the new vector.| Method Detail |
|---|
public void scale(double op1)
op1 - the scale factorpublic void set(Tuple3 inTuple)
inTuple - the input tuple
public void set(double inX,
double inY,
double inZ)
inX - the new X valueinY - the new Y valueinZ - the new Z valuepublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||