You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
690 B
35 lines
690 B
|
|
#pragma once |
|
|
|
#include <glm/glm.hpp> |
|
#include <glm/gtc/matrix_transform.hpp> |
|
|
|
#include "mesh.h" |
|
#include "render_group.h" |
|
|
|
|
|
struct render_group; |
|
|
|
struct Entity |
|
{ |
|
glm::mat4 world_transform; |
|
glm::vec3 scale; |
|
glm::vec3 translation; |
|
glm::vec4 rotation; // maybe use quaternion for this one |
|
meMeshGroup mesh_group; |
|
render_group* ren_group; |
|
|
|
//TODO: more entity properties: sound, gameplay info |
|
}; |
|
|
|
inline void |
|
entityTranslate(Entity* e, int x, int y, int z) |
|
{ |
|
e->world_transform = glm::translate(e->world_transform, glm::vec3(x, y, z)); |
|
} |
|
|
|
inline void |
|
entityScale(Entity* e, float sx, float sy, float sz) |
|
{ |
|
//mi->model_transform = glm::scale(glm::mat4(1), glm::vec3(100, 100, 100)); |
|
}
|
|
|