X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fshape.hpp;h=66827d08b27c1c1ed5064be731b1f7dca54adc90;hb=bea14b67ae4e5705965f3cc6422410a25f38ef9e;hp=438fa101d1a9a748cbce4c345762dbf7d1b804d6;hpb=b79bc060068daf80c707f7ca08cb40a716367784;p=blank.git diff --git a/src/shape.hpp b/src/shape.hpp index 438fa10..66827d0 100644 --- a/src/shape.hpp +++ b/src/shape.hpp @@ -23,6 +23,22 @@ struct Shape { }; +class NullShape +: public Shape { + +public: + size_t VertexCount() const override; + void Vertices(std::vector &, const glm::vec3 &) const override; + void Normals(std::vector &) const override; + + size_t OutlineCount() const override; + void Outline(std::vector &, const glm::vec3 &) const override; + + bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const override; + +}; + + class CuboidShape : public Shape { @@ -43,6 +59,27 @@ private: }; + +class StairShape +: public Shape { + +public: + StairShape(const AABB &bounds, const glm::vec2 &clip); + + size_t VertexCount() const override; + void Vertices(std::vector &, const glm::vec3 &) const override; + void Normals(std::vector &) const override; + + size_t OutlineCount() const override; + void Outline(std::vector &, const glm::vec3 &) const override; + + bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const override; + +private: + AABB top, bot; + +}; + } #endif