diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-18 02:08:01 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-18 02:08:01 +0000 |
commit | 627aa88ad2559f41d5be62d36cdbf536a97e4246 (patch) | |
tree | 0e98c2e9c39db6ecc88ecf1914af608241d7c18e /game/physical.h | |
parent | Helpers can be static (diff) | |
download | ilt-627aa88ad2559f41d5be62d36cdbf536a97e4246.tar.bz2 ilt-627aa88ad2559f41d5be62d36cdbf536a97e4246.tar.xz ilt-627aa88ad2559f41d5be62d36cdbf536a97e4246.zip |
Factor to support worlds, objects, windows etc
Diffstat (limited to 'game/physical.h')
-rw-r--r-- | game/physical.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/game/physical.h b/game/physical.h new file mode 100644 index 0000000..ff9d316 --- /dev/null +++ b/game/physical.h @@ -0,0 +1,31 @@ +#ifndef PHYSICAL_H +#define PHYSICAL_H + +#include "gfx/models/mesh.h" +#include "gfx/models/texture.h" +#include <gfx/gl/transform.h> +#include <glm/glm.hpp> +#include <string> + +class Camera; +class Shader; + +class Physical { +public: + Physical(glm::vec3 where, const std::string & m, const std::string & t); + + void render(const Shader & shader, const Camera & camera) const; + + [[nodiscard]] const auto & + getPosition() const + { + return location.GetPos(); + } + +protected: + Transform location; + Mesh mesh; + Texture texture; +}; + +#endif |