Interface Point3D<RP extends Point3D<? super RP,? super RV>,RV extends Vector3D<? super RV,? super RP>>
-
- Type Parameters:
RP- is the type of point that can be returned by this tuple.RV- is the type of vector that can be returned by this tuple.
- All Superinterfaces:
Cloneable,JsonableObject,Serializable,Tuple3D<RP>
- All Known Subinterfaces:
OrientedPoint3D<RP,RV>,UnmodifiablePoint3D<RP,RV>
- All Known Implementing Classes:
ESRIPoint,ImmutablePoint3D,InnerComputationPoint3afp,InnerComputationPoint3ai,OrientedPoint3d,OrientedPoint3dfx,OrientedPoint3i,OrientedPoint3ifx,Point3d,Point3dfx,Point3i,Point3ifx
public interface Point3D<RP extends Point3D<? super RP,? super RV>,RV extends Vector3D<? super RV,? super RP>> extends Tuple3D<RP>
3D Point.- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Thomas PIOTROWSKI
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidadd(Point3D<?,?> point, Vector3D<?,?> vector)Sets the value of this tuple to the sum of tuples t1 and t2.default voidadd(Vector3D<?,?> vector)Sets the value of this tuple to the sum of itself and t1.default voidadd(Vector3D<?,?> point, Point3D<?,?> vector)Sets the value of this tuple to the sum of tuples t1 and t2.default doublegetDistance(Point3D<?,?> point)Computes the distance between this point and point p1.default doublegetDistanceL1(Point3D<?,?> point)Computes the L-1 (Manhattan) distance between this point and point p1.static doublegetDistanceL1PointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the L-1 (Manhattan) distance between 2 points.default doublegetDistanceLinf(Point3D<?,?> point)Computes the L-infinite distance between this point and point p1.static doublegetDistanceLinfPointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the L-infinite distance between 2 points.static doublegetDistancePointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the distance between 2 points.default doublegetDistanceSquared(Point3D<?,?> point)Computes the square of the distance between this point and point p1.static doublegetDistanceSquaredPointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the squared distance between 2 points.GeomFactory3D<RV,RP>getGeomFactory()Replies the geometry factory associated to this point.default intgetIdistanceL1(Point3D<?,?> point)Computes the L-1 (Manhattan) distance between this point and point p1.default intgetIdistanceLinf(Point3D<?,?> point)Computes the L-infinite distance between this point and point p1.static booleanisCollinearPoints(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)Replies if three points are colinear, ie. one the same line.default voidoperator_add(Vector3D<?,?> v)Increment this point with the given vector:this += vdefault booleanoperator_and(Shape3D<?,?,?,?,?,?> shape)Replies if the this point is inside the given shape:this && sdefault Point3D<? extends RP,? extends RV>operator_elvis(Point3D<? extends RP,? extends RV> pt)If this point is epsilon equal to zero then reply p else reply this:this ?: pdefault booleanoperator_equals(Tuple3D<?> v)Replies if the given vector is equal to this vector:this == vdefault RVoperator_minus(Point3D<?,?> pt)the p point to this point:this - pdefault RPoperator_minus(Vector3D<?,?> v)the v vector to this point:this - vdefault booleanoperator_notEquals(Tuple3D<?> v)Replies if the given vector is different than this vector:this != vdefault RPoperator_plus(Vector3D<?,?> v)Sum of this point and a vector:this + vdefault voidoperator_remove(Vector3D<?,?> v)the v vector to this:this -= vdefault doubleoperator_upTo(Point3D<?,?> pt)Replies if the distance between this and the p point:this .. pdefault doubleoperator_upTo(Shape3D<?,?,?,?,?,?> shape)Replies the distance between this point and the given shape:this .. sdefault 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).default 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).default 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).default 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).default 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).default 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).default voidsub(Point3D<?,?> point, Vector3D<?,?> vector)Sets the value of this tuple to the difference of tuples t1 and t2 (this = t1 - t2).default voidsub(Vector3D<?,?> vector)Sets the value of this tuple to the difference of itself and t1 (this = this - t1).UnmodifiablePoint3D<?,?>toUnmodifiable()Replies an unmodifiable copy of this vector.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
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
-
-
-
-
Method Detail
-
isCollinearPoints
@Pure static boolean isCollinearPoints(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)Replies if three points are colinear, ie. one the same line.Trival approach is: points are collinear iff |AB| + |AC| = |BC|, where A B C are the three points.
- Parameters:
x1- is the X coordinate of the first pointy1- is the Y coordinate of the first pointz1- is the Z coordinate of the first pointx2- is the X coordinate of the second pointy2- is the Y coordinate of the second pointz2- is the Z coordinate of the second pointx3- is the X coordinate of the third pointy3- is the Y coordinate of the third pointz3- is the Z coordinate of the third point- Returns:
trueif the three given points are colinear.- Since:
- 3.0
- See Also:
MathUtil.isEpsilonZero(double)
-
getDistancePointPoint
@Pure static double getDistancePointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the distance between 2 points.- Parameters:
x1- x position of the first point.y1- y position of the first point.z1- z position of the first point.x2- x position of the second point.y2- y position of the second point.z2- z position of the second point.- Returns:
- the distance between given points.
- See Also:
getDistanceSquaredPointPoint(double, double, double, double, double, double),getDistanceL1PointPoint(double, double, double, double, double, double)
-
getDistanceSquaredPointPoint
@Pure static double getDistanceSquaredPointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the squared distance between 2 points.- Parameters:
x1- x position of the first point.y1- y position of the first point.z1- z position of the first point.x2- x position of the second point.y2- y position of the second point.z2- z position of the second point.- Returns:
- the squared distance between given points.
- See Also:
getDistancePointPoint(double, double, double, double, double, double),getDistanceL1PointPoint(double, double, double, double, double, double)
-
getDistanceL1PointPoint
@Pure static double getDistanceL1PointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the L-1 (Manhattan) distance between 2 points. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2) + abs(z1-z2).- Parameters:
x1- x position of the first point.y1- y position of the first point.z1- z position of the first point.x2- x position of the second point.y2- y position of the second point.z2- z position of the second point.- Returns:
- the distance between given points.
- See Also:
getDistancePointPoint(double, double, double, double, double, double),getDistanceSquaredPointPoint(double, double, double, double, double, double)
-
getDistanceLinfPointPoint
@Pure static double getDistanceLinfPointPoint(double x1, double y1, double z1, double x2, double y2, double z2)Compute the L-infinite distance between 2 points. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)].- Parameters:
x1- x position of the first point.y1- y position of the first point.z1- z position of the first point.x2- x position of the second point.y2- y position of the second point.z2- z position of the second point.- Returns:
- the distance between given points.
- See Also:
getDistancePointPoint(double, double, double, double, double, double),getDistanceSquaredPointPoint(double, double, double, double, double, double)
-
getDistanceSquared
@Pure default double getDistanceSquared(Point3D<?,?> point)
Computes the square of the distance between this point and point p1.- Parameters:
point- the other point- Returns:
- the distance.
-
getDistance
@Pure default double getDistance(Point3D<?,?> point)
Computes the distance between this point and point p1.- Parameters:
point- the other point- Returns:
- the distance.
-
getDistanceL1
@Pure default double getDistanceL1(Point3D<?,?> point)
Computes the L-1 (Manhattan) distance between this point and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).- Parameters:
point- the other point- Returns:
- the distance.
-
getDistanceLinf
@Pure default double getDistanceLinf(Point3D<?,?> point)
Computes the L-infinite distance between this point and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Parameters:
point- the other point- Returns:
- the distance.
-
getIdistanceL1
@Pure default int getIdistanceL1(Point3D<?,?> point)
Computes 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).- Parameters:
point- the other point- Returns:
- the distance.
-
getIdistanceLinf
@Pure default int getIdistanceLinf(Point3D<?,?> point)
Computes the L-infinite distance between this point and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Parameters:
point- the other point- Returns:
- the distance.
-
add
default void add(Point3D<?,?> point, Vector3D<?,?> vector)
Sets the value of this tuple to the sum of tuples t1 and t2.- Parameters:
point- the first tuplevector- the second tuple
-
add
default void add(Vector3D<?,?> point, Point3D<?,?> vector)
Sets the value of this tuple to the sum of tuples t1 and t2.- Parameters:
vector- the first tuplepoint- the second tuple
-
add
default void add(Vector3D<?,?> vector)
Sets the value of this tuple to the sum of itself and t1.- Parameters:
vector- the other tuple
-
scaleAdd
default void scaleAdd(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).- Parameters:
scale- the scalar valuevector- the tuple to be multipledpoint- the tuple to be added
-
scaleAdd
default void scaleAdd(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).- Parameters:
scale- the scalar valuevector- the tuple to be multipledpoint- the tuple to be added
-
scaleAdd
default void scaleAdd(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).- Parameters:
scale- the scalar valuepoint- the tuple to be multipledvector- the tuple to be added
-
scaleAdd
default void scaleAdd(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).- Parameters:
scale- the scalar valuepoint- the tuple to be multipledvector- the tuple to be added
-
scaleAdd
default void scaleAdd(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).- Parameters:
scale- the scalar valuevector- the tuple to be added
-
scaleAdd
default void scaleAdd(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).- Parameters:
scale- the scalar valuevector- the tuple to be added
-
sub
default void sub(Point3D<?,?> point, Vector3D<?,?> vector)
Sets the value of this tuple to the difference of tuples t1 and t2 (this = t1 - t2).- Parameters:
point- the first tuplevector- the second tuple
-
sub
default void sub(Vector3D<?,?> vector)
Sets the value of this tuple to the difference of itself and t1 (this = this - t1).- Parameters:
vector- the other tuple
-
toUnmodifiable
@Pure UnmodifiablePoint3D<?,?> toUnmodifiable()
Replies an unmodifiable copy of this vector.- Returns:
- an unmodifiable copy.
-
getGeomFactory
@Pure GeomFactory3D<RV,RP> getGeomFactory()
Replies the geometry factory associated to this point.- Returns:
- the factory.
-
operator_plus
@Pure default RP operator_plus(Vector3D<?,?> v)
Sum of this point and a vector:this + vThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
v- the vector to add- Returns:
- the result.
- See Also:
add(Point3D, Vector3D)
-
operator_add
default void operator_add(Vector3D<?,?> v)
Increment this point with the given vector:this += vThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
v- the vector to add- See Also:
add(Vector3D)
-
operator_minus
@Pure default RP operator_minus(Vector3D<?,?> v)
the v vector to this point:this - vThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
v- the vector to substract.- Returns:
- the result.
- See Also:
sub(Point3D, Vector3D)
-
operator_minus
@Pure default RV operator_minus(Point3D<?,?> pt)
the p point to this point:this - pThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
pt- the point to substract- Returns:
- the vector from the p to this.
- See Also:
Vector3D.sub(Point3D, Point3D)
-
operator_remove
default void operator_remove(Vector3D<?,?> v)
the v vector to this:this -= vThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
v- the vector to substract.- See Also:
sub(Vector3D)
-
operator_equals
@Pure default boolean operator_equals(Tuple3D<?> v)
Replies if the given vector is equal to this vector:this == vThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
v- the vector.- Returns:
- test result.
- See Also:
Tuple3D.equals(Tuple3D)
-
operator_notEquals
@Pure default boolean operator_notEquals(Tuple3D<?> v)
Replies if the given vector is different than this vector:this != vThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
v- the vector.- Returns:
- test result.
- See Also:
Tuple3D.equals(Tuple3D)
-
operator_upTo
@Pure default double operator_upTo(Point3D<?,?> pt)
Replies if the distance between this and the p point:this .. pThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
pt- the point.- Returns:
- the distance.
- See Also:
getDistance(Point3D)
-
operator_upTo
@Pure default double operator_upTo(Shape3D<?,?,?,?,?,?> shape)
Replies the distance between this point and the given shape:this .. sThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
shape- the shape to test.- Returns:
- the distance.
- See Also:
Shape3D.getDistance(Point3D)
-
operator_elvis
@Pure default Point3D<? extends RP,? extends RV> operator_elvis(Point3D<? extends RP,? extends RV> pt)
If this point is epsilon equal to zero then reply p else reply this:this ?: pThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
pt- the point.- Returns:
- the point.
-
operator_and
@Pure default boolean operator_and(Shape3D<?,?,?,?,?,?> shape)
Replies if the this point is inside the given shape:this && sThis function is an implementation of the "-" operator for the languages that defined or based on the Xtext framework.
- Parameters:
shape- the shape to test.- Returns:
trueif the point is inside the shape. Otherwise,false.- See Also:
Shape3D.contains(Point3D)
-
-