From 6ed978051668c08f5a957c97570f364dd580c807 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 21 Oct 2022 01:03:18 +0200 Subject: Namespace and Folder refactor --- src/GFX/Mesh.hpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/GFX/Mesh.hpp (limited to 'src/GFX/Mesh.hpp') 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 +#include +#include +#include "../Math/Math.hpp" + +namespace MC::GFX { + +class Mesh { +public: + Mesh(std::vector> positions, std::vector> tex_coords, std::vector indices) + : m_positions(std::move(positions)), m_tex_coords(std::move(tex_coords)), m_indices(std::move(indices)) {}; + + Mesh(std::vector> positions, std::vector> 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> m_positions; + std::vector> m_tex_coords; + std::vector m_indices; + +}; + +} \ No newline at end of file -- cgit 1.4.1