All Packages Class Hierarchy This Package Previous Next Index
Class cynosurex.graphics3D.Point3D
java.lang.Object
|
+----cynosurex.graphics3D.Point3D
- public class Point3D
- extends Object
- implements CommonInterface
A point represented in 3D coordination space, e.g. (x, y, z).
-
x
- The x coordinate.
-
y
- The y coordinate.
-
z
- The z coordinate.
-
Point3D()
- Constructs and initializes a Point initialized with (0, 0, 0).
-
Point3D(double, double, double)
- Constructs and initializes a Point from the specified x, y, and z
coordinates.
-
Point3D(Point3D)
- Constructs and initializes a Point with the same location as
the specified Point3D.
-
equals(Object)
- Checks whether two pointers are equal.
-
getLocation()
-
-
hashCode()
- Returns the hashcode for this Point3D.
-
move(double, double, double)
- Changes the point to have the specified location.
-
setLocation(double, double, double)
- Changes the point to have the specificed location.
-
setLocation(Point3D)
- Changes the point to have the specificed location.
-
toString()
- Returns the String representation of this Point's coordinates.
-
translate(int, int, int)
- Translates the 3D point.
x
public double x
- The x coordinate.
y
public double y
- The y coordinate.
z
public double z
- The z coordinate.
Point3D
public Point3D()
- Constructs and initializes a Point initialized with (0, 0, 0).
Point3D
public Point3D(Point3D p)
- Constructs and initializes a Point with the same location as
the specified Point3D.
- Parameters:
- p - a point in 3D space
Point3D
public Point3D(double x,
double y,
double z)
- Constructs and initializes a Point from the specified x, y, and z
coordinates.
- Parameters:
- x - the x coordinate
- y - the y coordinate
- z - the z coordinate
equals
public boolean equals(Object obj)
- Checks whether two pointers are equal.
- Overrides:
- equals in class Object
getLocation
public Point3D getLocation()
hashCode
public int hashCode()
- Returns the hashcode for this Point3D.
- Overrides:
- hashCode in class Object
move
public void move(double x,
double y,
double z)
- Changes the point to have the specified location.
- Parameters:
- x - the x coordinate of the new location
- y - the y coordinate of the new location
- z - the z coordinate of the new location
setLocation
public void setLocation(Point3D p)
- Changes the point to have the specificed location.
This method is included for completeness, to parallel the
setLocation method of Component.
- Parameters:
- p - the Point3D containing the new location
setLocation
public void setLocation(double x,
double y,
double z)
- Changes the point to have the specificed location.
This method is included for completeness, to parallel the
setLocation method of Component.
- Parameters:
- x - the x coordinate of the new location
- y - the y coordinate of the new location
- z - the z coordinate of the new location
toString
public String toString()
- Returns the String representation of this Point's coordinates.
- Overrides:
- toString in class Object
translate
public void translate(int x,
int y,
int z)
- Translates the 3D point.
All Packages Class Hierarchy This Package Previous Next Index