SparrowRenderer/entity.h
2015-07-06 18:22:45 +02:00

32 lines
688 B
C++

#ifndef ENTITY_H
#define ENTITY_H
#include "glm/mat4x4.hpp"
#include <vector>
class Mesh;
class Material;
class Shader;
class Entity
{
protected:
std::vector<Entity*> children;
Mesh* mesh;
Material* mat;
glm::mat4 modelMatrix;
public:
Entity(Mesh* myMesh, Material* myMat);
/**
* NULL Material is acceptable for this constructor
*/
Entity(Entity* myParent, Mesh* myMesh, Material* myMat);
virtual void draw(const glm::mat4 viewMatrix, const glm::mat4 projectionMatrix, const glm::mat4* parentMatrix);
glm::mat4* getTransform();
Shader* getShader();
Material* getMaterial();
void addChild(Entity* child);
};
#endif // ENTITY_H