Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StaticMesh.h 753B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*!
  2. * \file include/StaticMesh.h
  3. * \brief Static Model Meshes
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _STATIC_MODEL_H_
  8. #define _STATIC_MODEL_H_
  9. #include <memory>
  10. #include "BoundingBox.h"
  11. #include "BoundingSphere.h"
  12. class StaticMesh {
  13. public:
  14. StaticMesh(int i, int m, BoundingBox* b1, BoundingBox* b2)
  15. : id(i), mesh(m), bbox1(b1), bbox2(b2) { }
  16. void display(glm::mat4 MVP);
  17. void displayUI();
  18. BoundingSphere& getBoundingSphere();
  19. int getID() { return id; }
  20. static void setShowBoundingBox(bool s) { showBoundingBox = s; }
  21. static bool getShowBoundingBox() { return showBoundingBox; }
  22. private:
  23. int id;
  24. int mesh;
  25. std::unique_ptr<BoundingBox> bbox1, bbox2;
  26. static bool showBoundingBox;
  27. };
  28. #endif