public class Point3D

  1. Object
  2. 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

x double
The x-coord
y double
The y-coord
z double
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

x double
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

y double
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

z double
the z to set