载入中...
搜索中...
未找到
Model3D.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Module.h"
4#include "model3d/ModelData.h"
5
6#include <string>
7
8namespace eve {
9class Data;
10
11namespace graphics {
12class Graphics;
13class Renderable3D;
14} // namespace graphics
15
16namespace model3d {
17class ModelData;
18
29 bool triangulate = true;
33 bool flipUVs = true;
35};
36
41class Model3D : public Module {
42public:
44
46 ~Model3D() override;
47
54 ModelData *newModelData(Data *data, std::string hintExt = "");
55
57 ModelData *newModelData(Data *data, std::string hintExt, const ModelLoadOptions &options);
58
63 ModelData *newModelDataFromFile(std::string path);
64
66 ModelData *newModelDataFromFile(std::string path, const ModelLoadOptions &options);
67
75 int meshIndex);
76};
77
78} // namespace model3d
79} // namespace eve
glm::mat4 model
Resource module for decoding 3D models via medialoader (Assimp). Produces ModelData; GPU upload is gr...
Definition Model3D.h:41
ModelData * newModelData(Data *data, std::string hintExt="")
Decode model from in-memory bytes.
Definition Model3D.cpp:69
graphics::Renderable3D * createRenderable(graphics::Graphics *gfx, ModelData *model, int meshIndex)
Definition Model3D.cpp:121
ModelData * newModelDataFromFile(std::string path)
Decode model from a VFS path (physfs). Uses EveFileSystem so sidecar files (.mtl, textures) resolve t...
Definition Model3D.cpp:104
CPU-side decoded 3D model (Assimp scene owned via medialoader::ModelScene). Does not upload to GPU — ...
Definition ModelData.h:23
Definition Build.cpp:11
Toggles for the Assimp post-processing steps applied by medialoader on decode. All default to on (mat...
Definition Model3D.h:28