diff options
author | Elizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz> | 2023-11-28 14:47:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 14:47:29 -0700 |
commit | 4dcdd32bf7578acf3ea9bc1e98d39d82e3e1afdd (patch) | |
tree | 2d9eb3fbc17d453ee33e478bafb9936beff12eb3 /inc/model_instance.hpp | |
parent | ebc517c800a90f6f0ed157e5c3bd7c3bd18165b5 (diff) | |
parent | 3197f9e40cd7079e19990c64c98de667e2457d75 (diff) | |
download | gbarubik-4dcdd32bf7578acf3ea9bc1e98d39d82e3e1afdd.tar.gz gbarubik-4dcdd32bf7578acf3ea9bc1e98d39d82e3e1afdd.zip |
Cube
Diffstat (limited to 'inc/model_instance.hpp')
-rw-r--r-- | inc/model_instance.hpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/inc/model_instance.hpp b/inc/model_instance.hpp index a8bbee0..8126278 100644 --- a/inc/model_instance.hpp +++ b/inc/model_instance.hpp @@ -5,13 +5,19 @@ #include "renderable.hpp" #include <tonc.h> -class ModelInstance : Renderable { +class ModelInstance : public Renderable { private: + std::shared_ptr<Mesh> m_mesh; FIXED m_scale; - VECTOR m_rotation; + VECTOR m_rot; // though technically "FIXED"'s, these are simply s32's + // where [0, 2pi] -> [0, 0xFFFF] in the x,y,z axes VECTOR m_pos; - std::shared_ptr<Mesh> m_mesh; +public: + ModelInstance(std::shared_ptr<Mesh> mesh, FIXED scale, VECTOR m_rotation, + VECTOR m_pos); + void add_pos(VECTOR d_pos); + virtual void render(std::shared_ptr<Scene> scene_context); }; #endif // MODEL_INSTANCE_HPP |