blob: ad2207def3307d209f99e1381a0b6989a46043e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef PHYSICAL_H
#define PHYSICAL_H
#include <gfx/gl/transform.h>
#include <glm/glm.hpp>
#include <memory>
#include <string>
class Camera;
class Shader;
class Mesh;
class Texture;
template<typename Obj> class Cache;
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;
std::shared_ptr<Mesh> mesh;
std::shared_ptr<Texture> texture;
private:
static Cache<Mesh> cachedMesh;
static Cache<Texture> cachedTexture;
};
#endif
|