Interface OrientedPoint2D<RP extends Point2D<? super RP,​? super RV>,​RV extends Vector2D<? 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, Point2D<RP,​RV>, Serializable, Tuple2D<RP>
    All Known Implementing Classes:
    OrientedPoint2d, OrientedPoint2dfx, OrientedPoint2i, OrientedPoint2ifx

    public interface OrientedPoint2D<RP extends Point2D<? super RP,​? super RV>,​RV extends Vector2D<? super RV,​? super RP>>
    extends Point2D<RP,​RV>
    A 2D point with two orientation vectors relative to the polyline: the direction and the normal to the point.

    The orientation vectors have no physical existence, i.e. they exist only to represent the direction of the point and its normal when the point is part of a polyline. The normal vector is always perpendicular to the direction vector. The point stores its length on the polyline to avoid rounding errors at discretization.

    Version:
    17.0 2020-01-04 14:41:43
    Author:
    Thomas PIOTROWSKI, Stéphane GALLAND, Olivier LAMOTTE
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Method Detail

      • getTangentX

        @Pure
        double getTangentX()
        Replies the X coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.
        Returns:
        the x coordinate of the direction vector.
      • itx

        @Pure
        int itx()
        Replies the X coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.
        Returns:
        the x coordinate of the direction vector.
      • setTangentX

        void setTangentX​(int tanX)
        Sets a new value in the X direction of the point.
        Parameters:
        tanX - the new value double x.
      • setTangentX

        void setTangentX​(double tanX)
        Sets a new value in the X direction of the point.
        Parameters:
        tanX - the new value double x.
      • getTangentY

        @Pure
        double getTangentY()
        Replies the Y coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.
        Returns:
        the y coordinate of the direction vector.
      • ity

        @Pure
        int ity()
        Replies the Y coordinate of the direction vector. If this point is not part of a polyline, the direction vector is null.
        Returns:
        the y coordinate of the direction vector.
      • setTangentY

        void setTangentY​(int tanY)
        Sets a new value in the Y direction of the point.
        Parameters:
        tanY - the new value double y.
      • setTangentY

        void setTangentY​(double tanY)
        Sets a new value in the Y direction of the point.
        Parameters:
        tanY - the new value double y.
      • getNormalX

        @Pure
        default double getNormalX()
        Replies the X coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.
        Returns:
        the x coordinate of the normal vector.
      • inx

        @Pure
        default int inx()
        Replies the X coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.
        Returns:
        the x coordinate of the normal vector.
      • getNormalY

        @Pure
        default double getNormalY()
        Replies the Y coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.
        Returns:
        the y coordinate of the normal vector.
      • iny

        @Pure
        default int iny()
        Replies the Y coordinate of the normal vector. If this point is not part of a polyline, the normal vector is null.
        Returns:
        the y coordinate of the normal vector.
      • getPoint

        default RP getPoint()
        Replies this point.
        Returns:
        this point
      • getTangent

        @Pure
        RV getTangent()
        Replies the tangent vector at this point.
        Returns:
        the tangent vector.
      • setTangent

        default void setTangent​(RV tangent)
        Sets the given vector as the new tangent to this point. The normal vector is automatically recomputed.
        Parameters:
        tangent - the vector to set.
      • setTangent

        default void setTangent​(double x,
                                double y)
        Change the tangent vector. The normal vector is automatically recomputed.
        Parameters:
        x - x coordinate of the vector.
        y - y coordinate of the vector.
      • setTangent

        default void setTangent​(int x,
                                int y)
        Change the tangent vector. The normal vector is automatically recomputed.
        Parameters:
        x - x coordinate of the vector.
        y - y coordinate of the vector.
      • getNormal

        @Pure
        RV getNormal()
        Replies the normal vector at this point.
        Returns:
        the normal vector.
      • set

        default void set​(int x,
                         int y,
                         int tanX,
                         int tanY)
        Change the point and its tangent vector.
        Parameters:
        x - x coordinate of the point.
        y - y coordinate of the point.
        tanX - x coordinate of the vector.
        tanY - y coordinate of the vector.
      • set

        default void set​(double x,
                         double y,
                         double tanX,
                         double tanY)
        Change the point and its orientation vector.
        Parameters:
        x - x coordinate of the point.
        y - y coordinate of the point.
        tanX - x coordinate of the vector.
        tanY - y coordinate of the vector.
      • equals

        @Pure
        default boolean equals​(OrientedPoint2D<?,​?> p1)
        Returns true if all of the data members of OrientedPoint2D p1 are equal to the corresponding data members in this OrientedPoint2D.
        Parameters:
        p1 - the point with which the comparison is made
        Returns:
        true or false