Enum Edge2

    • Enum Constant Detail

      • RIGHT

        public static final Edge2 RIGHT
      • BOTTOM

        public static final Edge2 BOTTOM
      • LEFT

        public static final Edge2 LEFT
      • TOP

        public static final Edge2 TOP
    • Field Detail

      • VALUES_CACHED

        public static final Edge2[] VALUES_CACHED
    • Method Detail

      • values

        public static Edge2[] 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 (Edge2 c : Edge2.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Edge2 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
      • fromBit

        public static Edge2 fromBit​(int bit)
      • rotate

        public Edge2 rotate​(Edge2 dest)
        Rotates edge from RIGHT to destination clock-wise. BOTTOM rotates by 1 stop, LEFT by 2 and TOP by 3.
        Parameters:
        dest - stops
        Returns:
        Rotated edge2
      • rotate

        public static int rotate​(int edges,
                                 Edge2 dest)
        Rotates edges represented by bit mask (Edge2::getBit)
        Parameters:
        edges - Bit mask of edges
        dest - Rotate from RIGHT to destination clock-wise. BOTTOM rotates by 1 stop, LEFT by 2 and TOP by 3.
        Returns:
        Rotated bit mask
      • toVectorD

        public static CoordD2 toVectorD​(Edge2 edge2)
        Returns a vector with length 1 pointing to the direction edge2 representates
        Parameters:
        edge2 -
        Returns:
        Vector
      • toVectorI

        public static CoordI2 toVectorI​(Edge2 edge2)
        Returns a vector with length 1 pointing to the direction edge2 representates
        Parameters:
        edge2 -
        Returns:
        Vector
      • toString

        public static String toString​(int edges)
      • getBit

        public int getBit()