blob: 5d24ac8047c51f2b9de0e7aaf280ca7d9decfd1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
|