After completing our efficient queryable structure (and a lot of debugging!), we wanted to test our program on more complex scenes. One of our goals was to load arbitrary models from a file. A common file format that very simply describes a 3D model STL. The model does not contain any color information and the description is merely just a triangle mesh: precisely what we can process.
The informations are encoded in binary in the following way:
|The number of triangles
Triangle structure is defined as follows:
|The normal vector
|The vertices , and
Vector is defined as:
|The , and coordinates
Here are the results of some of our tests with some STL models that are in the public domain:
As you can see the complexity of the scene now barely affects the rendering time, which is an excellent news.