Package io.github.toxicity188.javamesh
Record Class MeshPoint
java.lang.Object
java.lang.Record
io.github.toxicity188.javamesh.MeshPoint
- Record Components:
position- mesh-space vertex positionuv- texture coordinates used for tint sampling
public record MeshPoint(@NotNull org.joml.Vector3f position, @NotNull org.joml.Vector2f uv)
extends Record
Vertex data for a mesh polygon, including model-space position and texture UV coordinates.
MeshPoint point = new MeshPoint(new Vector3f(0.0f, 1.0f, 0.0f), new Vector2f(0.5f, 1.0f));
- Since:
- 0.0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull org.joml.Vector3fposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.@NotNull org.joml.Vector2fuv()Returns the value of theuvrecord component.
-
Constructor Details
-
MeshPoint
public MeshPoint(@NotNull @NotNull org.joml.Vector3f position) Creates a point with zero UV coordinates.- Parameters:
position- mesh-space vertex position- Throws:
NullPointerException- ifpositionisnull- Since:
- 0.0.1
-
MeshPoint
public MeshPoint(@NotNull @NotNull org.joml.Vector3f position, @NotNull @NotNull org.joml.Vector2f uv) Creates an instance of aMeshPointrecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 withObjects::equals(Object,Object). -
position
@NotNull public @NotNull org.joml.Vector3f position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
uv
@NotNull public @NotNull org.joml.Vector2f uv()Returns the value of theuvrecord component.- Returns:
- the value of the
uvrecord component
-