The wavefront-reader can read .obj files and transform then into usable data for OpenGL (Array[Float]
, Array[Int]
)
Wavefront (.obj) files are used to store geometric data, like geometric objects build with Blender.
These files are read, validated and the get transformed into an internal model and in the next step this internal model is transformed to a Mesh
object.
There are several kinds of Meshes, like:
Mesh Type | Provided Data |
---|---|
SimpleMesh |
vertices: Array[Float] , color: Array[Float] |
SimpleIndexMesh |
vertices: Array[Float] , color: Array[Float] , indexes: Array[Int] |
TexturedMesh |
vertices: Array[Float] , textures: Array[Float] |
TexturedIndexedMesh |
vertices: Array[Float] , textures: Array[Float] , indexes: Array[Int] |
These Mesh
objects can than be used for filling a VertexBufferObject from OpenGL (e.g. with LWJGL)
- Scala 2.13.1
- SBT 1.3.3
- Java JDK 1.8
- add log messages
- update readme
- FileReader should take files(because otherwise it has to be in resources)
- fromResource
- fromFile
- check the documentation (comments in code)
- create documentation plantUml?
- interpolate normals?
- normal mapping (better math (BigDecimals?))
- Timer measure stuff --> with LogMessages