]> git.localhorst.tv Git - blank.git/blob - src/model/shapes.hpp
some code reorganization
[blank.git] / src / model / shapes.hpp
1 #ifndef BLANK_MODEL_SHAPES_HPP_
2 #define BLANK_MODEL_SHAPES_HPP_
3
4 #include "geometry.hpp"
5 #include "Shape.hpp"
6
7 #include <vector>
8 #include <glm/glm.hpp>
9
10
11 namespace blank {
12
13 class NullShape
14 : public Shape {
15
16 public:
17         NullShape();
18
19         bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const noexcept override;
20
21 };
22
23
24 class CuboidShape
25 : public Shape {
26
27 public:
28         CuboidShape(const AABB &bounds);
29
30         bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const noexcept override;
31
32 private:
33         AABB bb;
34
35 };
36
37
38 class StairShape
39 : public Shape {
40
41 public:
42         StairShape(const AABB &bounds, const glm::vec2 &clip);
43
44         bool Intersects(const Ray &, const glm::mat4 &, float &, glm::vec3 &) const noexcept override;
45
46 private:
47         AABB top, bot;
48
49 };
50
51 }
52
53 #endif