1 #ifndef BLANK_SHAPE_HPP_
2 #define BLANK_SHAPE_HPP_
4 #include "geometry.hpp"
14 virtual size_t VertexCount() const = 0;
15 virtual void Vertices(std::vector<glm::vec3> &, const glm::vec3 &pos = { 0.0f, 0.0f, 0.0f }) const = 0;
16 virtual void Normals(std::vector<glm::vec3> &) const = 0;
18 virtual size_t OutlineCount() const = 0;
19 virtual void Outline(std::vector<glm::vec3> &, const glm::vec3 &pos = { 0.0f, 0.0f, 0.0f }) const = 0;
21 virtual bool Intersects(const Ray &, const glm::mat4 &, float &dist, glm::vec3 &normal) const = 0;
30 CuboidShape(const AABB &bounds);
32 size_t VertexCount() const override;
33 void Vertices(std::vector<glm::vec3> &, const glm::vec3 &) const override;
34 void Normals(std::vector<glm::vec3> &) const override;
36 size_t OutlineCount() const override;
37 void Outline(std::vector<glm::vec3> &, const glm::vec3 &) const override;
39 bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const override;
51 StairShape(const AABB &bounds, const glm::vec2 &clip);
53 size_t VertexCount() const override;
54 void Vertices(std::vector<glm::vec3> &, const glm::vec3 &) const override;
55 void Normals(std::vector<glm::vec3> &) const override;
57 size_t OutlineCount() const override;
58 void Outline(std::vector<glm::vec3> &, const glm::vec3 &) const override;
60 bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const override;