diff options
| author | DrNuget <drnuget@outlook.com> | 2026-01-10 06:41:13 +0200 |
|---|---|---|
| committer | DrNuget <drnuget@outlook.com> | 2026-01-10 06:41:13 +0200 |
| commit | 3a3b64bedc47a0795358c6be7062160f52f2fc3b (patch) | |
| tree | eeaebee9ad6bab1a91e46ed8e7f682ac404e16e2 /src/engine/M_object.h | |
| parent | 7f3aa1cff755d21d972457b05c140cf465b9fa19 (diff) | |
| download | mnm-3a3b64bedc47a0795358c6be7062160f52f2fc3b.tar.gz | |
added FPS camera movement and probably some other changes
Diffstat (limited to 'src/engine/M_object.h')
| -rw-r--r-- | src/engine/M_object.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/engine/M_object.h b/src/engine/M_object.h index ca87f0a..96bd0fe 100644 --- a/src/engine/M_object.h +++ b/src/engine/M_object.h @@ -9,9 +9,13 @@ #include <assimp/mesh.h> #include <assimp/postprocess.h> -//#include "M_game.h" #include "M_shader.h" +enum { + M_OBJECT_CUBE, + M_OBJECT_CUSTOM +}; + //Temporary type for storing M_Object rotation information, //will get replaced in later revisions. typedef struct { @@ -26,12 +30,19 @@ typedef struct { unsigned int VAO, VBO, EBO; } M_ViewModel; +typedef struct { + unsigned short type; + M_ViewModel *model; +} M_ObjectInfo; + //Type meant for handling 3D models in a scene, //stores additional information like a model's position, size and rotation. typedef struct { M_ViewModel *model; M_ShaderProgram *shader; + unsigned short type; + vec3 pos, size; M_Rotation rotation; @@ -49,7 +60,7 @@ void M_killViewModel(M_ViewModel *model); M_ViewModel M_loadViewModel(const char* filename); //Creates a M_Object -void M_createObject(M_Object *obj, M_ViewModel *model); +void M_createObject(M_Object *obj, M_ObjectInfo object_info); //Functions for moving, scaling and rotating M_Object |
