Record Class IndexedVertex
java.lang.Object
java.lang.Record
team.lodestar.lodestone.systems.model.obj.data.IndexedVertex
- Record Components:
positionIndex-normalIndex-uvIndex-
Represents a vertex with indices for position, normal and uv.
Used exclusively for parsing OBJ files and generating a list of unique vertices
See Vertex for a vertex that stores the actual data
-
Constructor Summary
ConstructorsConstructorDescriptionIndexedVertex(int positionIndex, int normalIndex, int uvIndex) Creates an instance of aIndexedVertexrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.intReturns the value of thenormalIndexrecord component.intReturns the value of thepositionIndexrecord component.final StringtoString()Returns a string representation of this record class.intuvIndex()Returns the value of theuvIndexrecord component.
-
Constructor Details
-
IndexedVertex
public IndexedVertex(int positionIndex, int normalIndex, int uvIndex) Creates an instance of aIndexedVertexrecord class.- Parameters:
positionIndex- the value for thepositionIndexrecord componentnormalIndex- the value for thenormalIndexrecord componentuvIndex- the value for theuvIndexrecord 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 with '=='. -
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. -
positionIndex
public int positionIndex()Returns the value of thepositionIndexrecord component.- Returns:
- the value of the
positionIndexrecord component
-
normalIndex
public int normalIndex()Returns the value of thenormalIndexrecord component.- Returns:
- the value of the
normalIndexrecord component
-
uvIndex
public int uvIndex()Returns the value of theuvIndexrecord component.- Returns:
- the value of the
uvIndexrecord component
-