public interface TextureUV
extends net.kyori.examination.Examinable
The UV maps a full texture or texture region to a certain 3D surface.
Note that the coordinates specified in this texture are all relative and (ideally) in the range of zero to one.
If any of the from and to components are swapped, the texture flips.
| Modifier and Type | Method and Description |
|---|---|
@NotNull Vector2Float |
from()
Returns the UV region start point.
|
@NotNull Vector2Float |
to()
Returns the UV region end point.
|
static @NotNull TextureUV |
uv(float fromX,
float fromY,
float toX,
float toY)
Creates a new
TextureUV instance with the
given start and end points. |
static @NotNull TextureUV |
uv(@NotNull Vector2Float from,
@NotNull Vector2Float to)
Creates a new
TextureUV instance with the
given start and end points. |
@Contract(value="_, _ -> new") @NotNull static @NotNull TextureUV uv(@NotNull @NotNull Vector2Float from, @NotNull @NotNull Vector2Float to)
TextureUV instance with the
given start and end points.from - The UV region start pointto - The UV region end pointTextureUV instance@Contract(value="_, _, _, _ -> new") @NotNull static @NotNull TextureUV uv(float fromX, float fromY, float toX, float toY)
TextureUV instance with the
given start and end points.fromX - The UV region start point XfromY - The UV region start point YtoX - The UV region end point XtoY - The UV region end point YTextureUV instance@NotNull @NotNull Vector2Float from()
@NotNull @NotNull Vector2Float to()