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.cpp 677B

12345678910111213141516171819202122232425262728293031
  1. /*!
  2. * \file src/StaticMesh.cpp
  3. * \brief Static Model Meshes
  4. *
  5. * \author xythobuz
  6. */
  7. #include "global.h"
  8. #include "World.h"
  9. #include "StaticMesh.h"
  10. #include "imgui/imgui.h"
  11. bool StaticMesh::showBoundingBox = false;
  12. void StaticMesh::display(glm::mat4 MVP) {
  13. World::getMesh(mesh).display(MVP);
  14. if (showBoundingBox) {
  15. bbox1->display(MVP, glm::vec3(1.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f));
  16. bbox2->display(MVP, glm::vec3(1.0f, 0.0f, 1.0f), glm::vec3(0.0f, 0.0f, 1.0f));
  17. }
  18. }
  19. void StaticMesh::displayUI() {
  20. ImGui::Text("%03d", id);
  21. ImGui::NextColumn();
  22. ImGui::Text("%03d // and two bboxes", mesh);
  23. ImGui::NextColumn();
  24. }