]> git.localhorst.tv Git - blank.git/blobdiff - src/shape.hpp
stair shape
[blank.git] / src / shape.hpp
index 438fa101d1a9a748cbce4c345762dbf7d1b804d6..434f427ec7b70473d86390288f1b2020e19a79e8 100644 (file)
@@ -43,6 +43,27 @@ private:
 
 };
 
+
+class StairShape
+: public Shape {
+
+public:
+       StairShape(const AABB &bounds, const glm::vec2 &clip);
+
+       size_t VertexCount() const override;
+       void Vertices(std::vector<glm::vec3> &, const glm::vec3 &) const override;
+       void Normals(std::vector<glm::vec3> &) const override;
+
+       size_t OutlineCount() const override;
+       void Outline(std::vector<glm::vec3> &, const glm::vec3 &) const override;
+
+       bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const override;
+
+private:
+       AABB top, bot;
+
+};
+
 }
 
 #endif