Class OBJFileLoader

java.lang.Object
engine.objConverter.OBJFileLoader

public class OBJFileLoader extends Object
The OBJFileLoader class is responsible for reading in the .obj file for an asset and converting the data in the file to usable arrays of vertices, indices, normals and texture coordinates.
  • Constructor Details

    • OBJFileLoader

      public OBJFileLoader()
  • Method Details

    • loadOBJ

      public static ModelData loadOBJ(String objFileName)
      This method takes in the filename of the asset and reads through every line of the file. Depending on the prefix in the line, the data is assigned to the relevant arrays and the Modeldata object is created.
      Parameters:
      objFileName - The name of the asset .obj file.
      Returns:
      ModelData object containing all necessary data in arrays.