Record Class FileData
java.lang.Object
java.lang.Record
io.github.mwttg.wavefront.extractor.FileData
public record FileData(List<org.joml.Vector3f> vertices, List<org.joml.Vector2f> textureCoordinates, List<org.joml.Vector3f> normals, List<Triangle> faces)
extends Record
The internal data structure, created from parsing the .obj file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.faces()Returns the value of thefacesrecord component.inthashCode()Returns a hash code value for this object.List<org.joml.Vector3f>normals()Returns the value of thenormalsrecord component.List<org.joml.Vector2f>Returns the value of thetextureCoordinatesrecord component.toString()Returns a string representation of this record class.List<org.joml.Vector3f>vertices()Returns the value of theverticesrecord component.
-
Constructor Details
-
FileData
public FileData(List<org.joml.Vector3f> vertices, List<org.joml.Vector2f> textureCoordinates, List<org.joml.Vector3f> normals, List<Triangle> faces)Creates an instance of aFileDatarecord class.- Parameters:
vertices- the value for theverticesrecord componenttextureCoordinates- the value for thetextureCoordinatesrecord componentnormals- the value for thenormalsrecord componentfaces- the value for thefacesrecord component
-
-
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). -
vertices
Returns the value of theverticesrecord component.- Returns:
- the value of the
verticesrecord component
-
textureCoordinates
Returns the value of thetextureCoordinatesrecord component.- Returns:
- the value of the
textureCoordinatesrecord component
-
normals
Returns the value of thenormalsrecord component.- Returns:
- the value of the
normalsrecord component
-
faces
Returns the value of thefacesrecord component.- Returns:
- the value of the
facesrecord component
-