2024-11-15 00:12:51 +00:00
|
|
|
#ifndef OBJECT_HPP
|
|
|
|
#define OBJECT_HPP
|
|
|
|
|
2025-01-27 18:16:31 +00:00
|
|
|
#include <vector>
|
2024-11-15 00:12:51 +00:00
|
|
|
#include <engine/quad.hpp>
|
2025-01-27 18:16:31 +00:00
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include <bgfx/bgfx.h>
|
|
|
|
#include <assimp/scene.h>
|
2024-11-15 00:12:51 +00:00
|
|
|
|
|
|
|
class EngineObject {
|
|
|
|
public:
|
2025-01-27 18:16:31 +00:00
|
|
|
EngineObject();
|
2024-11-15 00:12:51 +00:00
|
|
|
|
2025-01-27 18:16:31 +00:00
|
|
|
int load_node(aiScene *scene, aiNode *node);
|
|
|
|
int load_model(std::string filename);
|
2024-11-15 00:12:51 +00:00
|
|
|
|
|
|
|
glm::vec4 position;
|
|
|
|
glm::vec4 rotation;
|
|
|
|
glm::vec4 scale;
|
|
|
|
|
2025-01-27 18:16:31 +00:00
|
|
|
std::vector<float> vertices;
|
2025-01-27 19:33:39 +00:00
|
|
|
std::vector<unsigned int> indices;
|
2025-01-27 18:16:31 +00:00
|
|
|
|
|
|
|
bgfx::VertexLayout layout;
|
2024-11-15 00:12:51 +00:00
|
|
|
bgfx::TextureHandle texture;
|
|
|
|
bgfx::VertexBufferHandle vbh;
|
|
|
|
bgfx::IndexBufferHandle ibh;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|