Class GeomConstants


  • public final class GeomConstants
    extends Object
    Several geometry constants.
    Since:
    14.0
    Version:
    17.0 2020-01-04 14:41:43
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Field Detail

      • SPLINE_APPROXIMATION_RATIO

        public static final double SPLINE_APPROXIMATION_RATIO
        The maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.

        This attributes is used to parameter the approximation of the curve rendering.

        See Also:
        Constant Field Values
      • SHAPE_INTERSECTS

        public static final int SHAPE_INTERSECTS
        The rectangle intersection test counts the number of times that the path crosses through the shadow that the rectangle projects to the right towards (x => +INFINITY).

        During processing of the path it actually counts every time the path crosses either or both of the top and bottom edges of that shadow. If the path enters from the top, the count is incremented. If it then exits back through the top, the same way it came in, the count is decremented and there is no impact on the winding count. If, instead, the path exits out the bottom, then the count is incremented again and a full pass through the shadow is indicated by the winding count having been incremented by 2.

        Thus, the winding count that it accumulates is actually double the real winding count. Since the path is continuous, the final answer should be a multiple of 2, otherwise there is a logic error somewhere.

        If the path ever has a direct hit on the rectangle, then a special value is returned. This special value terminates all ongoing accumulation on up through the call chain and ends up getting returned to the calling function which can then produce an answer directly. For intersection tests, the answer is always "true" if the path intersects the rectangle. For containment tests, the answer is always "false" if the path intersects the rectangle. Thus, no further processing is ever needed if an intersection occurs.

        See Also:
        Constant Field Values
      • UNIT_VECTOR_EPSILON

        public static final double UNIT_VECTOR_EPSILON
        Number precision for testing is a vector is a unit vector.

        The approximation introduced by the vector's length computation make this epsilon still mandatory.

        See Also:
        Constant Field Values
      • ORTHOGONAL_VECTOR_EPSILON

        public static final double ORTHOGONAL_VECTOR_EPSILON
        Number precision for testing is the orthogonality of two unit vectors.

        The approximation introduced by the vector's length computation make this epsilon still mandatory.

        See Also:
        Constant Field Values