diff --git a/include/omath/collision/triangle_collider.hpp b/include/omath/collision/triangle_collider.hpp deleted file mode 100644 index 0482e14..0000000 --- a/include/omath/collision/triangle_collider.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// -// Created by Vlad on 11/9/2025. -// - -#pragma once -#include "omath/linear_algebra/vector3.hpp" -#include - -namespace omath::collision -{ - struct TriangleCollider - { - Vector3 position; - }; - class TriangleMeshCollider final : public ColliderInterface> - { - public: - using VectorType = Vector3; - using VertexType = TriangleCollider; - explicit TriangleMeshCollider(const Triangle>& triangle) - : m_mesh({triangle.m_vertex1, triangle.m_vertex2, triangle.m_vertex3}) - { - } - - [[nodiscard]] - VectorType find_abs_furthest_vertex_position(const VectorType& direction) const override - { - return find_furthest_vertex(direction).position; - } - - [[nodiscard]] - const VectorType& get_origin() const override - { - return m_origin; - } - void set_origin(const VectorType&) override - { - - } - private: - [[nodiscard]] - const VertexType& find_furthest_vertex(const VectorType& direction) const - { - return *std::ranges::max_element( - m_mesh, [&direction](const auto& first, const auto& second) - { return first.position.dot(direction) < second.position.dot(direction); }); - } - - Vector3 m_origin{}; - std::array m_mesh; - }; -} // namespace omath::collision \ No newline at end of file