public class Point3 extends Point2 implements Serializable
Modifier and Type | Field and Description |
---|---|
static Point3 |
NULL_POINT3
Specific point at (0,0,0).
|
private static long |
serialVersionUID |
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 . |
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.
|
String |
toString() |
private static final long serialVersionUID
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(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(double x, double y, double z)
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 moveZ(double dz)
public void scale(double sx, double sy, double sz)
public void scale(double scalar)
scalar
- The multiplier.public void setZ(double z)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses