highfidelity/hifi — pull request #3998 by samcake (2014-12-22 19:37:21+00:00)
Title: Adding the model library

- introducing the model library that contains the classes describing a model ready for rendering

- the Mesh class is the standard description polygon mesh with a Vertex buffer, Attributes buffer, Index Buffer and the Part Buffer
Positions of the vertices are in the VertexBuffer
Other attributes such as texcoord, normal etc are in the attributeBuffer
An indexBuffer can be used
A consecutive serie of the same topology primitive are described in a "Part"
Several Parts (of different topology types) can be defined in the Part Buffer

The mesh provide simple ways to iterate through the different components ( vertices, attributes or parts)
which makes it convenient hopefully to generate bounding boxes, run ray intersect and more...

- THe Material class is the first try at this class to have a unified description of a surface material used to defines the appearence of a mesh.
The Material class contains all it's data properties in one Buffer which should be efficient to use for rendering
as well as the textures used for this material.

- On the AABox class, intialize the AABox origin to vec3(-infinity) so it's is invalid to start with (not origin at vec3(0)). added to operators +=( vec3) and +=(AABox)