2022-06-19 20:44:07 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "common/custom_data/Tfrag3Data.h"
|
2022-06-22 23:37:46 -04:00
|
|
|
|
2022-06-19 20:44:07 -04:00
|
|
|
#include "goalc/build_level/TexturePool.h"
|
|
|
|
#include "goalc/build_level/collide_common.h"
|
|
|
|
|
|
|
|
namespace gltf_mesh_extract {
|
|
|
|
|
|
|
|
struct Input {
|
|
|
|
std::string filename;
|
|
|
|
TexturePool* tex_pool = nullptr;
|
|
|
|
bool get_colors = true;
|
2022-06-27 20:37:51 -04:00
|
|
|
bool auto_wall_enable = true;
|
|
|
|
float auto_wall_angle = 30.f;
|
2022-08-05 12:25:35 -04:00
|
|
|
bool double_sided_collide = false;
|
2022-06-19 20:44:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct TfragOutput {
|
|
|
|
std::vector<tfrag3::StripDraw> strip_draws;
|
|
|
|
std::vector<tfrag3::PreloadedVertex> vertices;
|
|
|
|
std::vector<math::Vector<u8, 4>> color_palette;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CollideOutput {
|
|
|
|
std::vector<CollideFace> faces;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Output {
|
|
|
|
TfragOutput tfrag;
|
|
|
|
CollideOutput collide;
|
|
|
|
};
|
|
|
|
|
|
|
|
void extract(const Input& in, Output& out);
|
|
|
|
|
|
|
|
} // namespace gltf_mesh_extract
|