Skip to content

A reader for geometry data (.obj files) and material data (.mtl files)

Notifications You must be signed in to change notification settings

mwttg/wavefront-reader

Repository files navigation

Build Status Quality Gate Status

wavefront-reader

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)

Requirements

  • Scala 2.13.1
  • SBT 1.3.3
  • Java JDK 1.8

TODOs

  • 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

About

A reader for geometry data (.obj files) and material data (.mtl files)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages