Record Class Tex2d
java.lang.Object
java.lang.Record
dev.pfaff.altargui.types.Tex2d
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTex2d
(float u1, float v1, float u2, float v2) Creates an instance of aTex2d
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static Tex2d
fromPixelCoords
(int u1_i, int v1_i, int u2_i, int v2_i, int textureWidth, int textureHeight) static Tex2d
fromPixelExtent
(int u, int v, int uExtent, int vExtent, int textureWidth, int textureHeight) final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.float
u1()
Returns the value of theu1
record component.float
u2()
Returns the value of theu2
record component.float
v1()
Returns the value of thev1
record component.float
v2()
Returns the value of thev2
record component.
-
Field Details
-
WHOLE
-
-
Constructor Details
-
Tex2d
public Tex2d(float u1, float v1, float u2, float v2) Creates an instance of aTex2d
record class.- Parameters:
u1
- the value for theu1
record componentv1
- the value for thev1
record componentu2
- the value for theu2
record componentv2
- the value for thev2
record component
-
-
Method Details
-
fromPixelCoords
public static Tex2d fromPixelCoords(int u1_i, int v1_i, int u2_i, int v2_i, int textureWidth, int textureHeight) -
fromPixelExtent
public static Tex2d fromPixelExtent(int u, int v, int uExtent, int vExtent, int textureWidth, int textureHeight) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
u1
public float u1()Returns the value of theu1
record component.- Returns:
- the value of the
u1
record component
-
v1
public float v1()Returns the value of thev1
record component.- Returns:
- the value of the
v1
record component
-
u2
public float u2()Returns the value of theu2
record component.- Returns:
- the value of the
u2
record component
-
v2
public float v2()Returns the value of thev2
record component.- Returns:
- the value of the
v2
record component
-