Record Class Wavefront
java.lang.Object
java.lang.Record
io.github.mwttg.wavefront.transformer.Wavefront
public record Wavefront(float[] vertices, float[] textureCoordinates, float[] normals)
extends Record
The resulting data structure with float Arrays which can be used by OpenGL.
-
Constructor Summary
ConstructorsConstructorDescriptionWavefront(float[] vertices, float[] textureCoordinates, float[] normals)Creates an instance of aWavefrontrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.float[]normals()Returns the value of thenormalsrecord component.float[]Returns the value of thetextureCoordinatesrecord component.toString()Returns a string representation of this record class.float[]vertices()Returns the value of theverticesrecord component.
-
Constructor Details
-
Wavefront
public Wavefront(float[] vertices, float[] textureCoordinates, float[] normals)Creates an instance of aWavefrontrecord class.- Parameters:
vertices- the value for theverticesrecord componenttextureCoordinates- the value for thetextureCoordinatesrecord componentnormals- the value for thenormalsrecord component
-
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
vertices
public float[] vertices()Returns the value of theverticesrecord component.- Returns:
- the value of the
verticesrecord component
-
textureCoordinates
public float[] textureCoordinates()Returns the value of thetextureCoordinatesrecord component.- Returns:
- the value of the
textureCoordinatesrecord component
-
normals
public float[] normals()Returns the value of thenormalsrecord component.- Returns:
- the value of the
normalsrecord component
-