Interface Point3D<RP extends Point3D<? super RP,​? super RV>,​RV extends Vector3D<? super RV,​? super RP>>

    • 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 point
        y1 - is the Y coordinate of the first point
        z1 - is the Z coordinate of the first point
        x2 - is the X coordinate of the second point
        y2 - is the Y coordinate of the second point
        z2 - is the Z coordinate of the second point
        x3 - is the X coordinate of the third point
        y3 - is the Y coordinate of the third point
        z3 - is the Z coordinate of the third point
        Returns:
        true if the three given points are colinear.
        Since:
        3.0
        See Also:
        MathUtil.isEpsilonZero(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 tuple
        vector - 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 tuple
        point - 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 value
        vector - the tuple to be multipled
        point - 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 value
        vector - the tuple to be multipled
        point - 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 value
        point - the tuple to be multipled
        vector - 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 value
        point - the tuple to be multipled
        vector - 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 value
        vector - 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 value
        vector - 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 tuple
        vector - 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 + v

        This 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 += v

        This 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 - v

        This 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 - p

        This 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 -= v

        This 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 == v

        This 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 != v

        This 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 .. p

        This 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 .. s

        This 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 ?: p

        This 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 && s

        This 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:
        true if the point is inside the shape. Otherwise, false.
        See Also:
        Shape3D.contains(Point3D)