Skip navigation links
WebARTS Design
Java Library

Version 0.10.2
2020-11-11 (Wed), 10:42:54
org.graphstream.ui.geom

## Class Point3

• All Implemented Interfaces:
Serializable

```public class Point3
extends Point2
implements Serializable```
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).
Since:
19990829
Version:
0.1
Author:
Antoine Dutot
See Also:
Serialized Form
• ### Field Summary

Fields
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.
• ### Fields inherited from class org.graphstream.ui.geom.Point2

`NULL_POINT2, x, y`
• ### Constructor Summary

Constructors
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)`
• ### Method Summary

All Methods
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()`
• ### 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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Field Detail

• #### serialVersionUID

`private static final long serialVersionUID`
See Also:
Constant Field Values
• #### z

`public double z`
Z axis value.
• #### NULL_POINT3

`public static final Point3 NULL_POINT3`
Specific point at (0,0,0).
• ### Constructor Detail

• #### Point3

`public Point3()`
New 3D point at(0,0,0).
• #### Point3

```public Point3(double x,
double y)```
New 3D point at (x,y,0).
• #### Point3

```public Point3(double x,
double y,
double z)```
New 3D point at(x,y,z).
• #### Point3

`public Point3(Point3 other)`
New copy of other.
• #### Point3

`public Point3(Vector3 vec)`
• #### Point3

`public Point3(float[] data)`
• #### Point3

`public Point3(double[] data)`
• #### Point3

```public Point3(int start,
float[] data)```
• #### Point3

```public Point3(int start,
double[] data)```
• ### Method Detail

• #### isZero

`public boolean isZero()`
Are all components to zero?.
Overrides:
`isZero` in class `Point2`
• #### interpolate

```public Point3 interpolate(Point3 other,
double factor)```
Create a new point linear interpolation of this and `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).
• #### distance

`public double distance(Point3 other)`
Distance between this and `other`.
• #### distance

```public double distance(double x,
double y,
double z)```
Distance between this and point (x,y,z).
• #### copy

`public void copy(Point3 other)`
Make this a copy of other.
• #### copy

`public void copy(Vector3 vec)`
• #### set

```public void set(double x,
double y,
double z)```
Like #moveTo().
• #### moveTo

```public void moveTo(double x,
double y,
double z)```
Move to absolute position (x,y,z).
• #### move

```public void move(double dx,
double dy,
double dz)```
Move of given vector(dx,dy,dz).
• #### move

`public void move(Point3 p)`
Move of given point `p`.
• #### move

`public void move(Vector3 d)`
Move of given vector d.
• #### moveZ

`public void moveZ(double dz)`
Move in depth of dz.
• #### scale

```public void scale(double sx,
double sy,
double sz)```
Scale of factor (sx,sy,sz).
• #### scale

`public void scale(Point3 s)`
Scale by factor s.
• #### scale

`public void scale(Vector3 s)`
Scale by factor s.
• #### scale

`public void scale(double scalar)`
Scale by a given scalar.
Parameters:
`scalar` - The multiplier.
• #### setZ

`public void setZ(double z)`
Change only depth at absolute coordinate z.
• #### swap

`public void swap(Point3 other)`
Exchange the values of this and other.
• #### toString

`public String toString()`
Overrides:
`toString` in class `Point2`
Skip navigation links
Copyright (C) 2001-2021, Tom B. Gutwin

WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses