Enum Class UVFace

java.lang.Object
java.lang.Enum<UVFace>
kr.toxicity.library.dynamicuv.UVFace
All Implemented Interfaces:
Serializable, Comparable<UVFace>, Constable

public enum UVFace extends Enum<UVFace>
Represents the faces of a UV element.
  • Enum Constant Details

    • NORTH

      public static final UVFace NORTH
      The north face.
    • SOUTH

      public static final UVFace SOUTH
      The south face.
    • EAST

      public static final UVFace EAST
      The east face.
    • WEST

      public static final UVFace WEST
      The west face.
    • UP

      public static final UVFace UP
      The up face.
    • DOWN

      public static final UVFace DOWN
      The down face.
  • Method Details

    • values

      public static UVFace[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UVFace valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • mapVector

      @NotNull public @NotNull ElementVector mapVector(@NotNull @NotNull ElementVector vector)
      Maps the given vector according to the face's orientation.
      Parameters:
      vector - the vector to map
      Returns:
      the mapped vector
    • posOf

      @NotNull public @NotNull UVPos posOf(@NotNull @NotNull UVSpace space)
      Gets the UV position for the given space according to the face's orientation.
      Parameters:
      space - the UV space
      Returns:
      the UV position
    • uvName

      @NotNull public @NotNull String uvName()
      Gets the name of the UV face.
      Returns:
      the UV face name
    • iterate

      public abstract void iterate(@NotNull @NotNull UVElement element, @NotNull @NotNull Consumer<UVMappedFace> face)
      Iterates over the mapped faces for the given element.
      Parameters:
      element - the UV element
      face - the consumer to accept each mapped face