#ifndef CCOLLIDER_HPP #define CCOLLIDER_HPP #include "CAbstractCollider.hpp" #include #include #include "../../Graphics/Data/Mesh/CMesh.hpp" #include "nlohmann/json_fwd.hpp" namespace CosmicCore { enum class EColliderType { Box, Sphere, Capsule, ConvexHull, Mesh, Compound }; class CCollider : public CAbstractCollider{ private: EColliderType m_type; JPH::ShapeRefC m_shape = nullptr; public: CCollider(CEntity& e, EColliderType type); void buildFromMesh(CMesh* mesh); void buildDefaultShape(); JPH::ShapeRefC getShape() const { return m_shape; } EColliderType getType() const { return m_type; } void setCapsule(float halfHeight, float radius); void setSphereRadius(float radius); void setBoxSize(glm::vec3 size); void buildFromRenderer(); nlohmann::json to_json(){return nlohmann::json();}; }; } #endif