Package kr.toxicity.library.dynamicuv
Class UVElement
java.lang.Object
kr.toxicity.library.dynamicuv.UVElement
Represents a UV element.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the color type of the UV element. -
Constructor Summary
ConstructorsConstructorDescriptionUVElement(@NotNull ElementVector scale, @NotNull ElementVector position, @NotNull UVSpace space, @NotNull UVElement.ColorType colorType, @NotNull Map<UVFace, UVPos> mappingPos) Creates a new UV element. -
Method Summary
Modifier and TypeMethodDescription@NotNull com.google.gson.JsonObjectConverts the element to a JSON object.@NotNull UVElement.ColorTypeGets the color type.@NotNull List<UVMappedFace> faces()Gets the list of mapped faces.@NotNull ElementVectorfrom()Gets the starting vector.@NotNull ElementVectorpixel()Gets the pixel vector.@NotNull UVSpacespace()Gets the UV space.@NotNull ElementVectorto()Gets the ending vector.
-
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 elementposition- the position of the elementspace- the UV spacecolorType- the color typemappingPos- the mapping positions
-
-
Method Details
-
colorType
Gets the color type.- Returns:
- the color type
-
from
Gets the starting vector.- Returns:
- the starting vector
-
faces
Gets the list of mapped faces.- Returns:
- the list of mapped faces
-
space
Gets the UV space.- Returns:
- the UV space
-
pixel
Gets the pixel vector.- Returns:
- the pixel vector
-
to
Gets the ending vector.- Returns:
- the ending vector
-
asJson
Converts the element to a JSON object.- Parameters:
textureName- the texture name- Returns:
- the JSON object
-