OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
drawevent.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef DRAWEVENT_H
19 #define DRAWEVENT_H
20 
21 #include "index.h"
22 #include "framebuffer.h"
23 #include "shadowevent.h"
24 
25 namespace Engine
26 {
27 
31 class DrawEvent
32 {
33  public:
34 
35  enum MATRICEN
36  {
37  PRO_ORTHO ,
38  PRO_PROJECTION ,
39  PRO_UNKNOWN
40  };
41 
42 
43  DrawEvent(void);
44  ~DrawEvent() = default;
45 
46 
47  void setClipDistance( const Vector4f & clip_distance );
48 
56  void setProjection ( const glm::mat4 & matrix , MATRICEN mode );
57 
63  void setWorldView ( const glm::mat4 & matrix );
64 
71  void setModelMatrix ( const glm::mat4 & matrix );
72 
79  void setTexture ( const glm::mat4 & matrix );
80 
86  void setShadow( const ShadowEvent & event );
87 
93  MATRICEN getProjectionMode(void) const ;
94 
95  bool hasProjection(void) const ;
96  bool hasWorldView(void) const;
97  bool hasModel(void) const;
98  bool hasTexture(void) const ;
99  bool hasShadowEvent(void) const ;
100 
101  glm::mat4 getProjection(void) const;
102  glm::mat4 getWorldView(void) const;
103  glm::mat4 getModelMatrix(void) const;
104  glm::mat4 getTextureMatrix(void) const;
105 
106  const ShadowEvent getShadowEvent(void) const;
107  const Vector4f getClipDistance(void) const;
108 
109  private:
110 
111  glm::mat4 m_projection;
112  glm::mat4 m_world_view;
113  glm::mat4 m_model_matrix;
114  glm::mat4 m_texture_matrix;
115 
116  MATRICEN m_projection_mode;
117 
118  bool m_projection_status;
119  bool m_world_view_status;
120  bool m_model_status;
121  bool m_texture_status;
122  bool m_shadow_event_status;
123 
124  Vector4f m_clip_distance;
125  ShadowEvent m_shadow_event;
126 };
127 
128 }
129 
130 #endif // DRAWEVENT_H
void setTexture(const glm::mat4 &matrix)
setTexture
Definition: DrawEvent.cpp:60
MATRICEN getProjectionMode(void) const
getProjectionMode
Definition: DrawEvent.cpp:77
Definition: element.h:23
void setModelMatrix(const glm::mat4 &matrix)
setModelView
Definition: DrawEvent.cpp:49
void setShadow(const ShadowEvent &event)
setShadow
Definition: DrawEvent.cpp:66
The DrawEvent - event class.
Definition: drawevent.h:31
void setProjection(const glm::mat4 &matrix, MATRICEN mode)
setProjection
Definition: DrawEvent.cpp:36
The ShadowEvent - Event class.
Definition: shadowevent.h:30
void setWorldView(const glm::mat4 &matrix)
setWorldView
Definition: DrawEvent.cpp:43