1
0

initial parser and compiler

This commit is contained in:
2025-07-19 17:30:42 +03:00
parent 27bd44a82b
commit 58a84ade0d
9 changed files with 717 additions and 0 deletions

32
src/output.hpp Normal file
View File

@@ -0,0 +1,32 @@
#ifndef APP_MODEL_HPP
#define APP_MODEL_HPP
#include <cstdint>
#include <variant>
#include <vector>
#include "wavefront.hpp"
class Output {
std::vector<float> float_data_;
std::vector<std::array<std::uint32_t, 2>> vector_2d_data_;
std::vector<std::array<std::uint32_t, 3>> vector_3d_data_;
std::variant<
uint32_t,
std::array<uint32_t, 2>,
std::array<uint32_t, 3>
> vertex_data_;
std::vector<std::array<uint32_t, 3>> triangle_data_;
public:
Output();
~Output() = default;
private:
void compile_float_data(const WaveFront &input);
public:
void compile(const WaveFront &input);
};
#endif // APP_MODEL_HPP