Enum IntersectionType

  • All Implemented Interfaces:
    Serializable, Comparable<IntersectionType>

    public enum IntersectionType
    extends Enum<IntersectionType>
    This enumeration describes a intersection classification.

    The operation intersection is not commutative. So, classify(A, B) could not provides the same intersection classification as classify(B, A).

    The call classify(A, B) replies the following values:

    • INSIDE: A is entirely inside B,
    • OUTSIDE: A and B have not intersection,
    • SPANNING: A and B have an intersection but A is not entirely inside B nor B is not entirely inside A,
    • ENCLOSING: B is entirely inside A,
    Version:
    17.0 2020-01-04 14:41:43
    Author:
    Stéphane GALLAND, Nicolas GAUD
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Enum Constant Detail

      • SAME

        public static final IntersectionType SAME
        The second object is the same as the first one.
      • ENCLOSING

        public static final IntersectionType ENCLOSING
        The second object is entirely inside the first one.
      • INSIDE

        public static final IntersectionType INSIDE
        The first object is entirely inside the second one.
      • SPANNING

        public static final IntersectionType SPANNING
        The first object is intersecting the second one.
      • OUTSIDE

        public static final IntersectionType OUTSIDE
        The first object is entirely outside the second one.
    • Method Detail

      • values

        public static IntersectionType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IntersectionType c : IntersectionType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IntersectionType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • invert

        @Pure
        public static IntersectionType invert​(IntersectionType t)
        Invert the intersection classification.
        tresult
        INSIDEENCLOSING
        OUTSIDEOUTSIDE
        SPANNINGSPANNING
        ENCLOSINGINSIDE
        SAMESAME
        Parameters:
        t - the type.
        Returns:
        the inverted classification
      • invert

        @Pure
        public IntersectionType invert()
        Invert the intersection classification.
        tresult
        INSIDEENCLOSING
        OUTSIDEOUTSIDE
        SPANNINGSPANNING
        ENCLOSINGINSIDE
        SAMESAME
        Returns:
        the inverted classification
      • or

        @Pure
        public static IntersectionType or​(IntersectionType f1,
                                          IntersectionType f2)
        Compute the OR-combinaison of two intersection types. It could be used to compute the intersection type of a global object that is composed of two sub objects for which we have the classitification respectively. This operator replies a positive intersection if at least one of the sub object intersections is positive.
        f1f2result
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEINSIDE
        INSIDESPANNINGINSIDE
        INSIDEENCLOSINGINSIDE
        INSIDESAMEINSIDE
        OUTSIDEINSIDEINSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGSPANNING
        OUTSIDEENCLOSINGSPANNING
        OUTSIDESAMESPANNING
        SPANNINGINSIDEINSIDE
        SPANNINGOUTSIDESPANNING
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDEINSIDE
        ENCLOSINGOUTSIDESPANNING
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMESPANNING
        SAMEINSIDEINSIDE
        SAMEOUTSIDESPANNING
        SAMESPANNINGSPANNING
        SAMEENCLOSINGSPANNING
        SAMESAMESAME
        Parameters:
        f1 - is the classification of E against F1.
        f2 - is the classification of E against F2.
        Returns:
        the classification of E against the whole object composed of F1 and F2.
      • or

        @Pure
        public IntersectionType or​(IntersectionType f2)
        Compute the OR-combinaison of two intersection types. It could be used to compute the intersection type of a global object that is composed of two sub objects for which we have the classitification respectively. This operator replies a positive intersection if at least one of the sub object intersections is positive.
        thisf2result
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEINSIDE
        INSIDESPANNINGINSIDE
        INSIDEENCLOSINGINSIDE
        INSIDESAMEINSIDE
        OUTSIDEINSIDEINSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGSPANNING
        OUTSIDEENCLOSINGSPANNING
        OUTSIDESAMESPANNING
        SPANNINGINSIDEINSIDE
        SPANNINGOUTSIDESPANNING
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDEINSIDE
        ENCLOSINGOUTSIDESPANNING
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDESPANNING
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        f2 - is the classification of E against F2.
        Returns:
        the classification of E against the whole object composed of F1 and F2.
      • and

        @Pure
        public static IntersectionType and​(IntersectionType left,
                                           IntersectionType right)
        Compute the AND-combinaison of two intersection types. It could be used to compute the intersection type of a global 2D object when we know the classification against each of the two sides of the global 2D object.
        leftrightresult
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEOUTSIDE
        INSIDESPANNINGSPANNING
        INSIDEENCLOSINGSPANNING
        INSIDESAMEINSIDE
        OUTSIDEINSIDEOUTSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGOUTSIDE
        OUTSIDEENCLOSINGOUTSIDE
        OUTSIDESAMEOUTSIDE
        SPANNINGINSIDESPANNING
        SPANNINGOUTSIDEOUTSIDE
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDESPANNING
        ENCLOSINGOUTSIDEOUTSIDE
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDEOUTSIDE
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        left - the left operand.
        right - the right operand.
        Returns:
        the result of the intersection.
      • and

        @Pure
        public IntersectionType and​(IntersectionType type)
        Compute the AND-combinaison of two intersection types. It could be used to compute the intersection type of a global 2D object when we know the classification against each of the two sides of the global 2D object.
        thistyperesult
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEOUTSIDE
        INSIDESPANNINGSPANNING
        INSIDEENCLOSINGSPANNING
        INSIDESAMESPANNING
        OUTSIDEINSIDEOUTSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGOUTSIDE
        OUTSIDEENCLOSINGOUTSIDE
        OUTSIDESAMEOUTSIDE
        SPANNINGINSIDESPANNING
        SPANNINGOUTSIDEOUTSIDE
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDESPANNING
        ENCLOSINGOUTSIDEOUTSIDE
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDEOUTSIDE
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        type - the type.
        Returns:
        the result of the intersection.
      • operator_and

        @Pure
        public IntersectionType operator_and​(IntersectionType right)
        Compute the AND-combinaison of two intersection types. It could be used to compute the intersection type of a global 2D object when we know the classification against each of the two sides of the global 2D object.
        thistyperesult
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEOUTSIDE
        INSIDESPANNINGSPANNING
        INSIDEENCLOSINGSPANNING
        INSIDESAMESPANNING
        OUTSIDEINSIDEOUTSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGOUTSIDE
        OUTSIDEENCLOSINGOUTSIDE
        OUTSIDESAMEOUTSIDE
        SPANNINGINSIDESPANNING
        SPANNINGOUTSIDEOUTSIDE
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDESPANNING
        ENCLOSINGOUTSIDEOUTSIDE
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDEOUTSIDE
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        right - the type.
        Returns:
        the result of the intersection.
        Since:
        16.0
      • operator_and

        @Pure
        public static IntersectionType operator_and​(IntersectionType left,
                                                    IntersectionType right)
        Compute the AND-combinaison of two intersection types. It could be used to compute the intersection type of a global 2D object when we know the classification against each of the two sides of the global 2D object.
        leftrightresult
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEOUTSIDE
        INSIDESPANNINGSPANNING
        INSIDEENCLOSINGSPANNING
        INSIDESAMEINSIDE
        OUTSIDEINSIDEOUTSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGOUTSIDE
        OUTSIDEENCLOSINGOUTSIDE
        OUTSIDESAMEOUTSIDE
        SPANNINGINSIDESPANNING
        SPANNINGOUTSIDEOUTSIDE
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDESPANNING
        ENCLOSINGOUTSIDEOUTSIDE
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDEOUTSIDE
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        left - the left operand.
        right - the right operand.
        Returns:
        the result of the intersection.
        Since:
        16.0
      • $and

        @Pure
        public IntersectionType $and​(IntersectionType right)
        Compute the AND-combinaison of two intersection types. It could be used to compute the intersection type of a global 2D object when we know the classification against each of the two sides of the global 2D object.
        thistyperesult
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEOUTSIDE
        INSIDESPANNINGSPANNING
        INSIDEENCLOSINGSPANNING
        INSIDESAMESPANNING
        OUTSIDEINSIDEOUTSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGOUTSIDE
        OUTSIDEENCLOSINGOUTSIDE
        OUTSIDESAMEOUTSIDE
        SPANNINGINSIDESPANNING
        SPANNINGOUTSIDEOUTSIDE
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDESPANNING
        ENCLOSINGOUTSIDEOUTSIDE
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDEOUTSIDE
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        right - the type.
        Returns:
        the result of the intersection.
        Since:
        16.0
      • $and

        @Pure
        public static IntersectionType $and​(IntersectionType left,
                                            IntersectionType right)
        Compute the AND-combinaison of two intersection types. It could be used to compute the intersection type of a global 2D object when we know the classification against each of the two sides of the global 2D object.
        leftrightresult
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEOUTSIDE
        INSIDESPANNINGSPANNING
        INSIDEENCLOSINGSPANNING
        INSIDESAMEINSIDE
        OUTSIDEINSIDEOUTSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGOUTSIDE
        OUTSIDEENCLOSINGOUTSIDE
        OUTSIDESAMEOUTSIDE
        SPANNINGINSIDESPANNING
        SPANNINGOUTSIDEOUTSIDE
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDESPANNING
        ENCLOSINGOUTSIDEOUTSIDE
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDEOUTSIDE
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        left - the left operand.
        right - the right operand.
        Returns:
        the result of the intersection.
        Since:
        16.0
      • operator_or

        @Pure
        public IntersectionType operator_or​(IntersectionType f2)
        Compute the OR-combinaison of two intersection types. It could be used to compute the intersection type of a global object that is composed of two sub objects for which we have the classitification respectively. This operator replies a positive intersection if at least one of the sub object intersections is positive.
        thisf2result
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEINSIDE
        INSIDESPANNINGINSIDE
        INSIDEENCLOSINGINSIDE
        INSIDESAMEINSIDE
        OUTSIDEINSIDEINSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGSPANNING
        OUTSIDEENCLOSINGSPANNING
        OUTSIDESAMESPANNING
        SPANNINGINSIDEINSIDE
        SPANNINGOUTSIDESPANNING
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDEINSIDE
        ENCLOSINGOUTSIDESPANNING
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDESPANNING
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        f2 - is the classification of E against F2.
        Returns:
        the classification of E against the whole object composed of F1 and F2.
        Since:
        16.0
      • operator_or

        @Pure
        public static IntersectionType operator_or​(IntersectionType f1,
                                                   IntersectionType f2)
        Compute the OR-combinaison of two intersection types. It could be used to compute the intersection type of a global object that is composed of two sub objects for which we have the classitification respectively. This operator replies a positive intersection if at least one of the sub object intersections is positive.
        f1f2result
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEINSIDE
        INSIDESPANNINGINSIDE
        INSIDEENCLOSINGINSIDE
        INSIDESAMEINSIDE
        OUTSIDEINSIDEINSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGSPANNING
        OUTSIDEENCLOSINGSPANNING
        OUTSIDESAMESPANNING
        SPANNINGINSIDEINSIDE
        SPANNINGOUTSIDESPANNING
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDEINSIDE
        ENCLOSINGOUTSIDESPANNING
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMESPANNING
        SAMEINSIDEINSIDE
        SAMEOUTSIDESPANNING
        SAMESPANNINGSPANNING
        SAMEENCLOSINGSPANNING
        SAMESAMESAME
        Parameters:
        f1 - is the classification of E against F1.
        f2 - is the classification of E against F2.
        Returns:
        the classification of E against the whole object composed of F1 and F2.
        Since:
        16.0
      • $or

        @Pure
        public static IntersectionType $or​(IntersectionType f1,
                                           IntersectionType f2)
        Compute the OR-combinaison of two intersection types. It could be used to compute the intersection type of a global object that is composed of two sub objects for which we have the classitification respectively. This operator replies a positive intersection if at least one of the sub object intersections is positive.
        f1f2result
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEINSIDE
        INSIDESPANNINGINSIDE
        INSIDEENCLOSINGINSIDE
        INSIDESAMEINSIDE
        OUTSIDEINSIDEINSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGSPANNING
        OUTSIDEENCLOSINGSPANNING
        OUTSIDESAMESPANNING
        SPANNINGINSIDEINSIDE
        SPANNINGOUTSIDESPANNING
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDEINSIDE
        ENCLOSINGOUTSIDESPANNING
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMESPANNING
        SAMEINSIDEINSIDE
        SAMEOUTSIDESPANNING
        SAMESPANNINGSPANNING
        SAMEENCLOSINGSPANNING
        SAMESAMESAME
        Parameters:
        f1 - is the classification of E against F1.
        f2 - is the classification of E against F2.
        Returns:
        the classification of E against the whole object composed of F1 and F2.
        Since:
        16.0
      • $or

        @Pure
        public IntersectionType $or​(IntersectionType f2)
        Compute the OR-combinaison of two intersection types. It could be used to compute the intersection type of a global object that is composed of two sub objects for which we have the classitification respectively. This operator replies a positive intersection if at least one of the sub object intersections is positive.
        thisf2result
        INSIDEINSIDEINSIDE
        INSIDEOUTSIDEINSIDE
        INSIDESPANNINGINSIDE
        INSIDEENCLOSINGINSIDE
        INSIDESAMEINSIDE
        OUTSIDEINSIDEINSIDE
        OUTSIDEOUTSIDEOUTSIDE
        OUTSIDESPANNINGSPANNING
        OUTSIDEENCLOSINGSPANNING
        OUTSIDESAMESPANNING
        SPANNINGINSIDEINSIDE
        SPANNINGOUTSIDESPANNING
        SPANNINGSPANNINGSPANNING
        SPANNINGENCLOSINGSPANNING
        SPANNINGSAMESPANNING
        ENCLOSINGINSIDEINSIDE
        ENCLOSINGOUTSIDESPANNING
        ENCLOSINGSPANNINGSPANNING
        ENCLOSINGENCLOSINGENCLOSING
        ENCLOSINGSAMEENCLOSING
        SAMEINSIDEINSIDE
        SAMEOUTSIDESPANNING
        SAMESPANNINGSPANNING
        SAMEENCLOSINGENCLOSING
        SAMESAMESAME
        Parameters:
        f2 - is the classification of E against F2.
        Returns:
        the classification of E against the whole object composed of F1 and F2.
        Since:
        16.0
      • operator_not

        @Pure
        public IntersectionType operator_not()
        Invert the intersection classification.
        tresult
        INSIDEENCLOSING
        OUTSIDEOUTSIDE
        SPANNINGSPANNING
        ENCLOSINGINSIDE
        SAMESAME
        Returns:
        the inverted classification
        Since:
        16.0
      • operator_not

        @Pure
        public static IntersectionType operator_not​(IntersectionType t)
        Invert the intersection classification.
        tresult
        INSIDEENCLOSING
        OUTSIDEOUTSIDE
        SPANNINGSPANNING
        ENCLOSINGINSIDE
        SAMESAME
        Parameters:
        t - the type.
        Returns:
        the inverted classification
        Since:
        16.0
      • $bang

        @Pure
        public IntersectionType $bang()
        Invert the intersection classification.
        tresult
        INSIDEENCLOSING
        OUTSIDEOUTSIDE
        SPANNINGSPANNING
        ENCLOSINGINSIDE
        SAMESAME
        Returns:
        the inverted classification
        Since:
        16.0
      • $bang

        @Pure
        public static IntersectionType $bang​(IntersectionType t)
        Invert the intersection classification.
        tresult
        INSIDEENCLOSING
        OUTSIDEOUTSIDE
        SPANNINGSPANNING
        ENCLOSINGINSIDE
        SAMESAME
        Parameters:
        t - the type.
        Returns:
        the inverted classification
        Since:
        16.0