initial parser and compiler
This commit is contained in:
32
src/output.hpp
Normal file
32
src/output.hpp
Normal 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
|
||||
Reference in New Issue
Block a user