Class UVElement

java.lang.Object
kr.toxicity.library.dynamicuv.UVElement

public final class UVElement extends Object
Represents a UV element.
  • Constructor Details

    • UVElement

      public UVElement(@NotNull @NotNull ElementVector scale, @NotNull @NotNull ElementVector position, @NotNull @NotNull UVSpace space, @NotNull @NotNull UVElement.ColorType colorType, @NotNull @NotNull Map<UVFace,UVPos> mappingPos)
      Creates a new UV element.
      Parameters:
      scale - the scale of the element
      position - the position of the element
      space - the UV space
      colorType - the color type
      mappingPos - the mapping positions
  • Method Details

    • colorType

      @NotNull public @NotNull UVElement.ColorType colorType()
      Gets the color type.
      Returns:
      the color type
    • from

      @NotNull public @NotNull ElementVector from()
      Gets the starting vector.
      Returns:
      the starting vector
    • faces

      @NotNull public @NotNull List<UVMappedFace> faces()
      Gets the list of mapped faces.
      Returns:
      the list of mapped faces
    • space

      @NotNull public @NotNull UVSpace space()
      Gets the UV space.
      Returns:
      the UV space
    • pixel

      @NotNull public @NotNull ElementVector pixel()
      Gets the pixel vector.
      Returns:
      the pixel vector
    • to

      @NotNull public @NotNull ElementVector to()
      Gets the ending vector.
      Returns:
      the ending vector
    • asJson

      @NotNull public @NotNull com.google.gson.JsonObject asJson(@NotNull @NotNull String textureName)
      Converts the element to a JSON object.
      Parameters:
      textureName - the texture name
      Returns:
      the JSON object