-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscene.h
74 lines (59 loc) · 1.02 KB
/
scene.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifdef _MSC_VER
# pragma once
#endif
#ifndef SCENE_H
#define SCENE_H
#include <vulkan/vulkan.hpp>
//#include <boost/hana/adapt_struct.hpp>
#include "mesh.h"
struct sprite_vertex
{
glm::vec2 vpos;
glm::vec2 tpos;
};
struct sprite_instance
{
glm::vec2 pos;
glm::vec2 scale;
};
struct Sprite
{
glm::vec2 pos;
glm::vec2 scale;
uint32_t textureId;
};
struct Object
{
glm::vec3 pos;
uint32_t meshId;
};
//BOOST_HANA_ADAPT_STRUCT(Sprite, pos, scale);
//BOOST_HANA_ADAPT_STRUCT(Vertex, vpos, tpos);
class Scene
{
public:
static Scene Load(const std::string& path);
public:
const std::vector<std::string>& textures() const
{
return m_textures;
}
const std::vector<Sprite>& sprites() const
{
return m_sprites;
}
const std::vector<std::string>& objFiles() const
{
return m_objFiles;
}
const std::vector<Object>& objects() const
{
return m_objects;
}
private:
std::vector<std::string> m_textures;
std::vector<Sprite> m_sprites;
std::vector<std::string> m_objFiles;
std::vector<Object> m_objects;
};
#endif