Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Frustum.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "Engine/api.hpp"
3 #include <ThirdParty/glm/glm/glm.hpp>
4 
5 namespace Engine
6 {
7  class Camera;
8 
13  {
14  public:
15  Frustum(Frustum const &other) = default;
16  Frustum(Frustum &&other) noexcept = default;
17  ~Frustum() noexcept = default;
18 
19  Frustum &operator=(Frustum const &other) = default;
20  Frustum &operator=(Frustum &&other) noexcept = default;
21 
22  private:
23  friend class Camera;
24  Frustum() = default;
32  explicit Frustum(Camera &camera, glm::vec3 right, glm::vec3 up);
33 
34  struct Face
35  {
36  glm::vec3 position0, position1, position2, normal, u, v;
37  float d;
38 
39  Face() = default;
40  Face(glm::vec3 p0, glm::vec3 p1, glm::vec3 p2);
41  ~Face() = default;
42  };
43 
44  Face frontFace, backFace, topFace, rightFace, bottomFace, leftFace;
45 
46  public:
51  Face GetFrontFace() const;
56  Face GetBackFace() const;
61  Face GetTopFace() const;
66  Face GetRightFace() const;
71  Face GetBottomFace() const;
76  Face GetLeftFace() const;
77  };
78 } // namespace Engine
#define ENGINE_API
Definition: api.hpp:25
This class is used for the creation of a camera.
Definition: Camera.hpp:12
This object is used to keep track of the frustum area of the view and projection matrix. NOTE: only the Camera class is allowed to create this object.
Definition: Frustum.hpp:12