From a556b45abf18f1bd509daaf63b66b7d55e9fd291 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Mon, 22 Apr 2024 21:56:26 -0400 Subject: add engine version --- .../CollisionComponents/BoundingDynamicMesh.h | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h (limited to 'engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h') diff --git a/engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h b/engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h new file mode 100644 index 0000000..5d24ac8 --- /dev/null +++ b/engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h @@ -0,0 +1,32 @@ +#ifndef BOUNDINGDYNAMICMESH_H +#define BOUNDINGDYNAMICMESH_H +#include "Game/Components/CollisionComponents/CylinderCollider.h" +#include "Graphics/modeltransform.h" +#include "glm/glm.hpp" +#include +#include + + +class BoundingDynamicMesh : public BoundingShape +{ +public: + BoundingDynamicMesh(std::shared_ptr mt, + const glm::vec3 &initial_pos); + BoundingDynamicMesh(std::shared_ptr mt, + const glm::vec3 &initial_pos, + std::vector &obj_data); + glm::vec3 getCenterPos(); + void updateCenterPos(glm::vec3 new_pos); + glm::vec3 getEllipsoidDimensions(); + Cylinder getCylinder(); + +private: + glm::vec3 getMeshDimensions(); + + bool m_isMesh = false; + std::shared_ptr m_mt; + std::vector m_obj_data; + std::shared_ptr m_bounding_cylinder; +}; + +#endif // BOUNDINGDYNAMICMESH_H -- cgit v1.2.3-70-g09d2