|
|
|
|
@ -21,7 +21,7 @@ entInit(entity& e, const char* model_path)
|
|
|
|
|
{ |
|
|
|
|
e.world_transform = glm::mat4(1.0); |
|
|
|
|
entScale(e, glm::vec3(1.0)); |
|
|
|
|
entSetWorldPosition(e, 0, 0, 0); |
|
|
|
|
entSetWorldPosition(e, glm::vec3(0, 0, 0)); |
|
|
|
|
|
|
|
|
|
if (meLoadFromFile(e.mesh_group, model_path) |
|
|
|
|
&& loadMeshIntoGL(e)) |
|
|
|
|
@ -53,11 +53,11 @@ entFree(entity& e)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
entSetWorldPosition(entity& e, float x, float y, float z) |
|
|
|
|
entSetWorldPosition(entity& e, glm::vec3 v) |
|
|
|
|
{ |
|
|
|
|
e.world_transform[3][0] = x; |
|
|
|
|
e.world_transform[3][1] = y; |
|
|
|
|
e.world_transform[3][2] = z; |
|
|
|
|
e.world_transform[3][0] = v.x; |
|
|
|
|
e.world_transform[3][1] = v.y; |
|
|
|
|
e.world_transform[3][2] = v.z; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|