public class Point3D
- Object
- Point3D
Encapsulates a point in 3D space.
Constructors
public Point3D(double x, double y, double z) | Creates a new point. |
Methods
public double getX() | Gets x coordinate. |
public void setX(double x) | Sets the x coordinate |
public double getY() | Gets the y-coordinate. |
public void setY(double y) | Sets the y coordinate. |
public double getZ() | Gets the z-coordinate. |
public void setZ(double z) | Sets the z-coordinate |
Inherited methods
Constructor details
Point3D
public Point3D(double x, double y, double z)Creates a new point.
Parameters
xdouble- The x-coord
ydouble- The y-coord
zdouble- The z-coord
Method details
getX
public double getX()Gets x coordinate.
Returns
the x
setX
public void setX(double x)Sets the x coordinate
Parameters
xdouble- the x to set
getY
public double getY()Gets the y-coordinate.
Returns
the y
setY
public void setY(double y)Sets the y coordinate.
Parameters
ydouble- the y to set
getZ
public double getZ()Gets the z-coordinate.
Returns
the z
setZ
public void setZ(double z)Sets the z-coordinate
Parameters
zdouble- the z to set