Package engine.objConverter
Class OBJFileLoader
java.lang.Object
engine.objConverter.OBJFileLoader
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
OBJFileLoader
public OBJFileLoader()
-
-
Method Details
-
loadOBJ
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.
-