|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.ui.geom.Point2
org.graphstream.ui.geom.Point3
public class Point3
3D point. A Point3 is a 3D location in an affine space described by three values along the X, the Y and the Z axis. Note the difference with Vector3 wich is defined as an array and ensures that the three coordinates X, Y and Z are consecutive in memory. Here there are three separate attributes. Further, a point has no vector arithmetic bound to it (to points cannot be added, this would have no mathematical meaning).
Field Summary | |
---|---|
static Point3 |
NULL_POINT3
Specific point at (0,0,0). |
double |
z
Z axis value. |
Fields inherited from class org.graphstream.ui.geom.Point2 |
---|
NULL_POINT2, x, y |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class org.graphstream.ui.geom.Point2 |
---|
copy, distance, interpolate, make, move, move, moveTo, moveX, moveY, scale, scale, set, setX, setY, swap |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double z
public static final Point3 NULL_POINT3
Constructor Detail |
---|
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)
Method Detail |
---|
public boolean isZero()
isZero
in class Point2
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)
public String toString()
toString
in class Point2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |