Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
line.h
1 #pragma once
2 
3 #include <glm/glm.hpp>
4 
5 #include "abstractshape.h"
6 
7 
8 class Sphere;
9 class Transform;
10 template<typename T> class TAABB;
11 
12 class Line: public AbstractShape {
13 public:
14  Line();
15  Line(const glm::vec3& a, const glm::vec3& b);
16 
17  const glm::vec3& a() const;
18  void setA(const glm::vec3& a);
19 
20  const glm::vec3& b() const;
21  void setB(const glm::vec3& b);
22 
23  virtual bool intersects(const Sphere& sphere) const override;
24  virtual bool nearTo(const TAABB<int>& aabb) const override;
25  virtual bool containedBy(const TAABB<int>& aabb) const override;
26 
27 
28 protected:
29  glm::vec3 m_a;
30  glm::vec3 m_b;
31 };
32 
Definition: transform.h:9
Definition: line.h:12
Definition: aabb.h:15
Definition: sphere.h:11
Definition: abstractshape.h:7