Record Class ObjParser.ObjMesh

java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.buildertools.objimport.ObjParser.ObjMesh
Enclosing class:
ObjParser

public static record ObjParser.ObjMesh(List<float[]> vertices, List<float[]> uvCoordinates, List<int[]> faces, List<int[]> faceUvIndices, List<String> faceMaterials, @Nullable String mtlLib) extends Record
  • Field Details

    • vertices

      private final List<float[]> vertices
      The field for the vertices record component.
    • uvCoordinates

      private final List<float[]> uvCoordinates
      The field for the uvCoordinates record component.
    • faces

      private final List<int[]> faces
      The field for the faces record component.
    • faceUvIndices

      private final List<int[]> faceUvIndices
      The field for the faceUvIndices record component.
    • faceMaterials

      private final List<String> faceMaterials
      The field for the faceMaterials record component.
    • mtlLib

      @Nullable private final String mtlLib
      The field for the mtlLib record component.
  • Constructor Details

    • ObjMesh

      public ObjMesh(List<float[]> vertices, List<float[]> uvCoordinates, List<int[]> faces, List<int[]> faceUvIndices, List<String> faceMaterials, @Nullable String mtlLib)
      Creates an instance of a ObjMesh record class.
      Parameters:
      vertices - the value for the vertices record component
      uvCoordinates - the value for the uvCoordinates record component
      faces - the value for the faces record component
      faceUvIndices - the value for the faceUvIndices record component
      faceMaterials - the value for the faceMaterials record component
      mtlLib - the value for the mtlLib record component
  • Method Details

    • getBounds

      public float[] getBounds()
    • getHeight

      public float getHeight()
    • hasMaterials

      public boolean hasMaterials()
    • hasUvCoordinates

      public boolean hasUvCoordinates()
    • transformZUpToYUp

      public void transformZUpToYUp()
    • transformXUpToYUp

      public void transformXUpToYUp()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • vertices

      public List<float[]> vertices()
      Returns the value of the vertices record component.
      Returns:
      the value of the vertices record component
    • uvCoordinates

      public List<float[]> uvCoordinates()
      Returns the value of the uvCoordinates record component.
      Returns:
      the value of the uvCoordinates record component
    • faces

      public List<int[]> faces()
      Returns the value of the faces record component.
      Returns:
      the value of the faces record component
    • faceUvIndices

      public List<int[]> faceUvIndices()
      Returns the value of the faceUvIndices record component.
      Returns:
      the value of the faceUvIndices record component
    • faceMaterials

      public List<String> faceMaterials()
      Returns the value of the faceMaterials record component.
      Returns:
      the value of the faceMaterials record component
    • mtlLib

      @Nullable public String mtlLib()
      Returns the value of the mtlLib record component.
      Returns:
      the value of the mtlLib record component