summaryrefslogtreecommitdiff
path: root/engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h
diff options
context:
space:
mode:
Diffstat (limited to 'engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h')
-rw-r--r--engine-ocean/Game/Components/CollisionComponents/BoundingDynamicMesh.h32
1 files changed, 32 insertions, 0 deletions
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 <memory>
+#include <vector>
+
+
+class BoundingDynamicMesh : public BoundingShape
+{
+public:
+ BoundingDynamicMesh(std::shared_ptr<ModelTransform> mt,
+ const glm::vec3 &initial_pos);
+ BoundingDynamicMesh(std::shared_ptr<ModelTransform> mt,
+ const glm::vec3 &initial_pos,
+ std::vector<glm::vec3> &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<ModelTransform> m_mt;
+ std::vector<glm::vec3> m_obj_data;
+ std::shared_ptr<CylinderCollider> m_bounding_cylinder;
+};
+
+#endif // BOUNDINGDYNAMICMESH_H