|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcynosurex.graphics3D.Point3D
public class Point3D
A point represented in 3D coordination space, e.g. (x, y, z).
| Field Summary | |
|---|---|
double |
x
The x coordinate. |
double |
y
The y coordinate. |
double |
z
The z coordinate. |
| Fields inherited from interface cynosurex.internal.CommonInterface |
|---|
copyright, copyrightYears, notice, program, version |
| Fields inherited from interface cynosurex.internal.AuthorCommon |
|---|
author, copyrightSymbol, noticeMsg, rights |
| Fields inherited from interface cynosurex.internal.CompanyCommon |
|---|
company, email, website |
| Constructor Summary | |
|---|---|
Point3D()
Constructs and initializes a Point initialized with (0, 0, 0). |
|
Point3D(double x,
double y,
double z)
Constructs and initializes a Point from the specified x, y, and z coordinates. |
|
Point3D(Point3D p)
Constructs and initializes a Point with the same location as the specified Point3D. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Checks whether two pointers are equal. |
Point3D |
getLocation()
|
int |
hashCode()
Returns the hashcode for this Point3D. |
void |
move(double x,
double y,
double z)
Changes the point to have the specified location. |
void |
setLocation(double x,
double y,
double z)
Changes the point to have the specificed location. |
void |
setLocation(Point3D p)
Changes the point to have the specificed location. |
java.lang.String |
toString()
Returns the String representation of this Point's coordinates. |
void |
translate(int x,
int y,
int z)
Translates the 3D point. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double x
public double y
public double z
| Constructor Detail |
|---|
public Point3D()
public Point3D(Point3D p)
p - a point in 3D space
public Point3D(double x,
double y,
double z)
x - the x coordinatey - the y coordinatez - the z coordinate| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Point3D getLocation()
public int hashCode()
hashCode in class java.lang.Object
public void move(double x,
double y,
double z)
x - the x coordinate of the new locationy - the y coordinate of the new locationz - the z coordinate of the new locationpublic void setLocation(Point3D p)
p - the Point3D containing the new location
public void setLocation(double x,
double y,
double z)
x - the x coordinate of the new locationy - the y coordinate of the new locationz - the z coordinate of the new locationpublic java.lang.String toString()
toString in class java.lang.Object
public void translate(int x,
int y,
int z)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||