Bubba-3D  0.9.0
Awesome game engine!
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GLSquare Class Reference

#include <GLSquare.h>

Inheritance diagram for GLSquare:
IHudDrawable

Public Member Functions

 GLSquare (float posX, float posY, float width, float height, HUDGraphic *image)
 
float getX ()
 
float getY ()
 
float getWidth ()
 
float getHeight ()
 
HUDGraphicgetGraphic ()
 
void setCenterOffset (chag::float3 offset)
 
void setGraphic (HUDGraphic *graphic)
 
void updateGraphic ()
 
virtual void render (ShaderProgram *shaderProgram, chag::float4x4 *projectionMatrix)
 
- Public Member Functions inherited from IHudDrawable
virtual void setRelativePosition (chag::float3 position)
 
virtual void setRotation (float rotation)
 
virtual void setScale (chag::float2 scale)
 

Protected Member Functions

chag::float4x4 getModelMatrix ()
 
void init (float posX, float posY, float width, float height, HUDGraphic *image)
 
void fillVertexBuffer ()
 
void bindTextureAndDraw (ShaderProgram *shaderProgram, chag::float4x4 *projectionMatrix)
 
void updateOriginalPosition ()
 

Protected Attributes

float posX
 
float posY
 
float width
 
float height
 
HUDGraphicgraphic
 
GLuint vao
 
ShaderProgramshaderProgram
 
chag::float4x4 * projectionMatrix
 
chag::float3 originalPosition
 
- Protected Attributes inherited from IHudDrawable
chag::float3 center = chag::make_vector(0.0f, 0.0f, 0.0f)
 
float rotation = 0.0f
 
chag::float3 originalPosition = chag::make_vector(0.0f, 0.0f, 0.0f)
 
chag::float3 scale = chag::make_vector(1.0f,1.0f,1.0f)
 

Additional Inherited Members

- Public Attributes inherited from IHudDrawable
chag::float3 relativePosition = chag::make_vector(0.0f, 0.0f, 0.0f)
 

Detailed Description

Represents a low level gl square with a HUDGraphic as its graphical element

Definition at line 30 of file GLSquare.h.

Member Function Documentation

void GLSquare::setCenterOffset ( chag::float3  offset)
virtual

Sets the rotation center offset. The original center is the actual center of the drawn object.

Reimplemented from IHudDrawable.

Definition at line 120 of file GLSquare.cpp.


The documentation for this class was generated from the following files: