diff options
| author | Mel <einebeere@gmail.com> | 2022-10-21 01:03:18 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-10-21 01:03:18 +0200 |
| commit | 6ed978051668c08f5a957c97570f364dd580c807 (patch) | |
| tree | e3db93c52fcd86e26bc859d46e755290d2a7f40c /src/GFX/Mesh.hpp | |
| parent | 0464a83dfaebaa75d6e2d3b7431e84ebd83fccfd (diff) | |
| download | meowcraft-6ed978051668c08f5a957c97570f364dd580c807.tar.zst meowcraft-6ed978051668c08f5a957c97570f364dd580c807.zip | |
Namespace and Folder refactor
Diffstat (limited to 'src/GFX/Mesh.hpp')
| -rw-r--r-- | src/GFX/Mesh.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/GFX/Mesh.hpp b/src/GFX/Mesh.hpp new file mode 100644 index 0000000..f027c8c --- /dev/null +++ b/src/GFX/Mesh.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include <utility> +#include <vector> +#include <cstdint> +#include "../Math/Math.hpp" + +namespace MC::GFX { + +class Mesh { +public: + Mesh(std::vector<Vector<3>> positions, std::vector<Vector<2>> tex_coords, std::vector<uint32_t> indices) + : m_positions(std::move(positions)), m_tex_coords(std::move(tex_coords)), m_indices(std::move(indices)) {}; + + Mesh(std::vector<Vector<3>> positions, std::vector<Vector<2>> tex_coords) + : m_positions(std::move(positions)), m_tex_coords(std::move(tex_coords)), m_indices() {}; + + float* raw(); + size_t size(); + + uint32_t* raw_indices(); + size_t indices_size(); + + float* raw_tex_coords(); + size_t tex_coords_size(); + +private: + std::vector<Vector<3>> m_positions; + std::vector<Vector<2>> m_tex_coords; + std::vector<uint32_t> m_indices; + +}; + +} \ No newline at end of file |
