model.h 670 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef MODEL_H
  2. #define MODEL_H
  3. #include <string>
  4. #include "mesh.h"
  5. #include "geometry.h"
  6. #include "matrix.h"
  7. #include "objParser.h"
  8. class Model{
  9. public:
  10. Model(std::string path, TransformParameters &initParameters);
  11. Mesh *getMesh();
  12. AABox *getBounds();
  13. void update();
  14. //Prints the mesh vertices for debugging
  15. void describeMesh();
  16. private:
  17. //Transform matrix from object space to worldSpace
  18. void initPosition(TransformParameters initPos);
  19. //Calculates the boundary box of the mesh in object space
  20. void buildBoundaryBox();
  21. Mesh mMesh;
  22. AABox mBounds;
  23. };
  24. #endif