Bubba-3D  0.9.0
Awesome game engine!
IHudDrawable.h
1 /*
2  * This file is part of Bubba-3D.
3  *
4  * Bubba-3D is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser 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  * Bubba-3D 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 Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with Bubba-3D. If not, see http://www.gnu.org/licenses/.
16  */
17 #pragma once
18 
19 #include <linmath/float3.h>
20 #include <linmath/float4x4.h>
21 
22 class ShaderProgram;
23 
28 class IHudDrawable {
29 public:
30  virtual void render(ShaderProgram* shaderProgram, chag::float4x4* projectionMatrix) = 0;
31 
36  virtual void setRelativePosition(chag::float3 position);
41  virtual void setCenterOffset(chag::float3 offset);
42  virtual void setRotation(float rotation);
43  virtual void setScale(chag::float2 scale);
44  chag::float3 relativePosition = chag::make_vector(0.0f, 0.0f, 0.0f);
45 
46 protected:
47  chag::float3 center = chag::make_vector(0.0f, 0.0f, 0.0f);
48  float rotation = 0.0f;
49  chag::float3 originalPosition = chag::make_vector(0.0f, 0.0f, 0.0f);
50  chag::float3 scale = chag::make_vector(1.0f,1.0f,1.0f);
51 };
virtual void setRelativePosition(chag::float3 position)
virtual void setCenterOffset(chag::float3 offset)
Class for maintaining OpenGL shader programs.
Definition: ShaderProgram.h:39