- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.d.Tuple3d<Point3d>
-
- org.arakhne.afc.math.geometry.d3.d.Point3d
-
- All Implemented Interfaces:
Serializable,Cloneable,Point3D<Point3d,Vector3d>,Tuple3D<Point3d>,JsonableObject
- Direct Known Subclasses:
ESRIPoint,OrientedPoint3d
public class Point3d extends Tuple3d<Point3d> implements Point3D<Point3d,Vector3d>
3D Point with 3 double precision floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description Point3d()Construct a zero point.Point3d(double[] tuple)Constructor.Point3d(double x, double y, double z)Construct a point with the given coordinates.Point3d(float x, float y, float z)Construct a point with the given coordinates.Point3d(int[] tuple)Constructor.Point3d(int x, int y, int z)Construct a point with the given coordinates.Point3d(long x, long y, long z)Construct a point with the given coordinates.Point3d(Tuple3D<?> tuple)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Point3D<?,?> point, Vector3D<?,?> vector)Sets the value of this tuple to the sum of tuples t1 and t2.voidadd(Vector3D<?,?> vector)Sets the value of this tuple to the sum of itself and t1.voidadd(Vector3D<?,?> vector, Point3D<?,?> point)Sets the value of this tuple to the sum of tuples t1 and t2.static Point3dconvert(Tuple3D<?> tuple)Convert the given tuple to a real Point3d.doublegetDistance(Point3D<?,?> pt)Computes the distance between this point and point p1.doublegetDistanceL1(Point3D<?,?> pt)Computes the L-1 (Manhattan) distance between this point and point p1.doublegetDistanceLinf(Point3D<?,?> pt)Computes the L-infinite distance between this point and point p1.doublegetDistanceSquared(Point3D<?,?> pt)Computes the square of the distance between this point and point p1.GeomFactory3dgetGeomFactory()Replies the geometry factory associated to this point.intgetIdistanceL1(Point3D<?,?> pt)Computes the L-1 (Manhattan) distance between this point and point p1.intgetIdistanceLinf(Point3D<?,?> pt)Computes the L-infinite distance between this point and point p1.voidscaleAdd(double scale, Point3D<?,?> point, Vector3D<?,?> vector)Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).voidscaleAdd(double scale, Vector3D<?,?> vector)Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).voidscaleAdd(double scale, Vector3D<?,?> vector, Point3D<?,?> point)Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).voidscaleAdd(int scale, Point3D<?,?> point, Vector3D<?,?> vector)Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).voidscaleAdd(int scale, Vector3D<?,?> vector)Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).voidscaleAdd(int scale, Vector3D<?,?> vector, Point3D<?,?> point)Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).voidsub(Point3D<?,?> point, Vector3D<?,?> vector)Sets the value of this tuple to the difference of tuples t1 and t2 (this = t1 - t2).voidsub(Vector3D<?,?> vector)Sets the value of this tuple to the difference of itself and t1 (this = this - t1).UnmodifiablePoint3D<Point3d,Vector3d>toUnmodifiable()Replies an unmodifiable copy of this vector.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.d.Tuple3d
absolute, absolute, add, add, addX, addX, addY, addY, addZ, addZ, clone, equals, getX, getY, getZ, hashCode, ix, iy, iz, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, setZ, setZ, sub, sub, subX, subX, subY, subY, subZ, subZ, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Point3D
operator_add, operator_and, operator_elvis, operator_equals, operator_minus, operator_minus, operator_notEquals, operator_plus, operator_remove, operator_upTo, operator_upTo
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Tuple3D
absolute, absolute, add, add, addX, addX, addY, addY, addZ, addZ, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, get, getX, getY, getZ, hashCode, interpolate, interpolate, ix, iy, iz, negate, negate, scale, scale, scale, scale, set, set, set, set, set, setX, setX, setY, setY, setZ, setZ, sub, sub, subX, subX, subY, subY, subZ, subZ
-
-
-
-
Constructor Detail
-
Point3d
public Point3d()
Construct a zero point.
-
Point3d
public Point3d(Tuple3D<?> tuple)
Constructor.- Parameters:
tuple- is the tuple to copy.
-
Point3d
public Point3d(int[] tuple)
Constructor.- Parameters:
tuple- is the tuple to copy.
-
Point3d
public Point3d(double[] tuple)
Constructor.- Parameters:
tuple- is the tuple to copy.
-
Point3d
public Point3d(int x, int y, int z)Construct a point with the given coordinates.- Parameters:
x- x coordinate.y- y coordinate.z- z coordinate.
-
Point3d
public Point3d(float x, float y, float z)Construct a point with the given coordinates.- Parameters:
x- x coordinate.y- y coordinate.z- z coordinate.
-
Point3d
public Point3d(double x, double y, double z)Construct a point with the given coordinates.- Parameters:
x- x coordinate.y- y coordinate.z- z coordinate.
-
Point3d
public Point3d(long x, long y, long z)Construct a point with the given coordinates.- Parameters:
x- x coordinate.y- y coordinate.z- z coordinate.
-
-
Method Detail
-
convert
public static Point3d convert(Tuple3D<?> tuple)
Convert the given tuple to a real Point3d.If the given tuple is already a Point3d, it is replied.
- Parameters:
tuple- the tuple.- Returns:
- the Point3d.
- Since:
- 14.0
-
getGeomFactory
public GeomFactory3d getGeomFactory()
Description copied from interface:Point3DReplies the geometry factory associated to this point.- Specified by:
getGeomFactoryin interfacePoint3D<Point3d,Vector3d>- Returns:
- the factory.
-
getDistanceSquared
@Pure public double getDistanceSquared(Point3D<?,?> pt)
Description copied from interface:Point3DComputes the square of the distance between this point and point p1.- Specified by:
getDistanceSquaredin interfacePoint3D<Point3d,Vector3d>- Parameters:
pt- the other point- Returns:
- the distance.
-
getDistance
@Pure public double getDistance(Point3D<?,?> pt)
Description copied from interface:Point3DComputes the distance between this point and point p1.- Specified by:
getDistancein interfacePoint3D<Point3d,Vector3d>- Parameters:
pt- the other point- Returns:
- the distance.
-
getDistanceL1
@Pure public double getDistanceL1(Point3D<?,?> pt)
Description copied from interface:Point3DComputes the L-1 (Manhattan) distance between this point and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).- Specified by:
getDistanceL1in interfacePoint3D<Point3d,Vector3d>- Parameters:
pt- the other point- Returns:
- the distance.
-
getDistanceLinf
@Pure public double getDistanceLinf(Point3D<?,?> pt)
Description copied from interface:Point3DComputes the L-infinite distance between this point and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Specified by:
getDistanceLinfin interfacePoint3D<Point3d,Vector3d>- Parameters:
pt- the other point- Returns:
- the distance.
-
getIdistanceL1
@Pure public int getIdistanceL1(Point3D<?,?> pt)
Description copied from interface:Point3DComputes the L-1 (Manhattan) distance between this point and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2) + abs(z1-z2).- Specified by:
getIdistanceL1in interfacePoint3D<Point3d,Vector3d>- Parameters:
pt- the other point- Returns:
- the distance.
-
getIdistanceLinf
@Pure public int getIdistanceLinf(Point3D<?,?> pt)
Description copied from interface:Point3DComputes the L-infinite distance between this point and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Specified by:
getIdistanceLinfin interfacePoint3D<Point3d,Vector3d>- Parameters:
pt- the other point- Returns:
- the distance.
-
add
public void add(Point3D<?,?> point, Vector3D<?,?> vector)
Description copied from interface:Point3DSets the value of this tuple to the sum of tuples t1 and t2.
-
add
public void add(Vector3D<?,?> vector, Point3D<?,?> point)
Description copied from interface:Point3DSets the value of this tuple to the sum of tuples t1 and t2.
-
add
public void add(Vector3D<?,?> vector)
Description copied from interface:Point3DSets the value of this tuple to the sum of itself and t1.
-
scaleAdd
public void scaleAdd(int scale, Vector3D<?,?> vector, Point3D<?,?> point)Description copied from interface:Point3DSets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).
-
scaleAdd
public void scaleAdd(double scale, Vector3D<?,?> vector, Point3D<?,?> point)Description copied from interface:Point3DSets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).
-
scaleAdd
public void scaleAdd(int scale, Point3D<?,?> point, Vector3D<?,?> vector)Description copied from interface:Point3DSets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).
-
scaleAdd
public void scaleAdd(double scale, Point3D<?,?> point, Vector3D<?,?> vector)Description copied from interface:Point3DSets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).
-
scaleAdd
public void scaleAdd(int scale, Vector3D<?,?> vector)Description copied from interface:Point3DSets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).
-
scaleAdd
public void scaleAdd(double scale, Vector3D<?,?> vector)Description copied from interface:Point3DSets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).
-
sub
public void sub(Point3D<?,?> point, Vector3D<?,?> vector)
Description copied from interface:Point3DSets the value of this tuple to the difference of tuples t1 and t2 (this = t1 - t2).
-
sub
public void sub(Vector3D<?,?> vector)
Description copied from interface:Point3DSets the value of this tuple to the difference of itself and t1 (this = this - t1).
-
toUnmodifiable
@Pure public UnmodifiablePoint3D<Point3d,Vector3d> toUnmodifiable()
Description copied from interface:Point3DReplies an unmodifiable copy of this vector.- Specified by:
toUnmodifiablein interfacePoint3D<Point3d,Vector3d>- Returns:
- an unmodifiable copy.
-
-