add VEC3 model loader
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <glm/glm.hpp>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "typedefs.hpp"
|
||||
#include "util/Buffer.hpp"
|
||||
#include "graphics/core/Model.hpp"
|
||||
|
||||
/// See /doc/specs/vec3_model_spec.md
|
||||
namespace vec3 {
|
||||
struct Material {
|
||||
int flags;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
struct Model {
|
||||
std::string name;
|
||||
model::Model model;
|
||||
glm::vec3 origin;
|
||||
|
||||
Model& operator=(Model&&) = default;
|
||||
|
||||
~Model();
|
||||
};
|
||||
|
||||
struct File {
|
||||
std::unordered_map<std::string, Model> models;
|
||||
std::vector<Material> materials;
|
||||
};
|
||||
|
||||
File load(const std::string_view file, const util::Buffer<ubyte>& src);
|
||||
}
|
||||
Reference in New Issue
Block a user