public class Point_3D
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
float |
x
The x, y, z coordinates.
|
float |
y
The x, y, z coordinates.
|
float |
z
The x, y, z coordinates.
|
Constructor and Description |
---|
Point_3D()
Null constructor
|
Point_3D(float _x,
float _y,
float _z)
Constructor based on values
|
Point_3D(Point_3D p)
Copy Constructor based on values
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Checks if the two points are the same or not.
|
float |
getX()
Get value of x.
|
float |
getY()
Get value of y.
|
float |
getZ()
Get value of z.
|
int |
hashCode()
Returns the hash code for the object.
|
void |
set(Point_3D p)
Set the values based on the given point.
|
void |
setX(float f)
Set value of x.
|
void |
setY(float f)
Set value of y.
|
void |
setZ(float f)
Set value of z.
|
java.lang.String |
toString()
Returns the string representation of a 3D point
|
public float x
public float y
public float z
public Point_3D()
public Point_3D(float _x, float _y, float _z)
public Point_3D(Point_3D p)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public float getX()
public float getY()
public float getZ()
public void setX(float f)
f
- The x coordinate.public void setY(float f)
f
- The y coordinate.public void setZ(float f)
z
- The z coordinate.public void set(Point_3D p)
p
- The input Point_3D object.