public class Point3 extends Point2 implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static Point3 |
NULL_POINT3
Specific point at (0,0,0).
|
double |
z
Z axis value.
|
NULL_POINT2, x, y
Constructor and Description |
---|
Point3()
New 3D point at(0,0,0).
|
Point3(double[] data) |
Point3(double x,
double y)
New 3D point at (x,y,0).
|
Point3(double x,
double y,
double z)
New 3D point at(x,y,z).
|
Point3(float[] data) |
Point3(int start,
double[] data) |
Point3(int start,
float[] data) |
Point3(Point3 other)
New copy of other.
|
Point3(Vector3 vec) |
Modifier and Type | Method and Description |
---|---|
void |
copy(Point3 other)
Make this a copy of other.
|
void |
copy(Vector3 vec) |
double |
distance(double x,
double y,
double z)
Distance between this and point (x,y,z).
|
double |
distance(Point3 other)
Distance between this and
other . |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
Point3 |
interpolate(Point3 other,
double factor)
Create a new point linear interpolation of this and
other . |
boolean |
isZero()
Are all components to zero?.
|
void |
move(double dx,
double dy,
double dz)
Move of given vector(dx,dy,dz).
|
void |
move(Point3 p)
Move of given point
p . |
void |
move(Vector3 d)
Move of given vector d.
|
void |
moveTo(double x,
double y,
double z)
Move to absolute position (x,y,z).
|
void |
moveZ(double dz)
Move in depth of dz.
|
void |
scale(double scalar)
Scale by a given scalar.
|
void |
scale(double sx,
double sy,
double sz)
Scale of factor (sx,sy,sz).
|
void |
scale(Point3 s)
Scale by factor s.
|
void |
scale(Vector3 s)
Scale by factor s.
|
void |
set(double x,
double y,
double z)
Like #moveTo().
|
void |
setZ(double z)
Change only depth at absolute coordinate z.
|
void |
swap(Point3 other)
Exchange the values of this and other.
|
java.lang.String |
toString() |
public double z
public static final Point3 NULL_POINT3
public Point3()
public Point3(double x, double y)
public Point3(double x, double y, double z)
public Point3(Point3 other)
public Point3(Vector3 vec)
public Point3(float[] data)
public Point3(double[] data)
public Point3(int start, float[] data)
public Point3(int start, double[] data)
public Point3 interpolate(Point3 other, double factor)
other
. The
new point is located between this and other
if
factor
is between 0 and 1 (0 yields this point, 1 yields the
other
point).public double distance(Point3 other)
other
.public double distance(double x, double y, double z)
public void copy(Point3 other)
public void copy(Vector3 vec)
public void set(double x, double y, double z)
public void moveTo(double x, double y, double z)
public void move(double dx, double dy, double dz)
public void move(Point3 p)
p
.public void move(Vector3 d)
public void moveZ(double dz)
public void scale(double sx, double sy, double sz)
public void scale(Point3 s)
public void scale(Vector3 s)
public void scale(double scalar)
scalar
- The multiplier.public void setZ(double z)
public void swap(Point3 other)