14#ifdef LAGRANGE_WITH_ASSIMP
16 #include <lagrange/fs/filesystem.h>
17 #include <lagrange/io/types.h>
18 #include <lagrange/scene/SimpleScene.h>
20 #include <assimp/mesh.h>
21 #include <assimp/postprocess.h>
22 #include <assimp/scene.h>
26namespace lagrange::io::internal {
30std::unique_ptr<aiScene> load_assimp(
31 const fs::path& filename,
32 unsigned int flags = aiProcess_CalcTangentSpace |
33 aiProcess_GenUVCoords | aiProcess_PopulateArmatureData);
38std::unique_ptr<aiScene> load_assimp(
39 std::istream& input_stream,
40 unsigned int flags = aiProcess_CalcTangentSpace |
41 aiProcess_GenUVCoords | aiProcess_PopulateArmatureData);
46template <
typename MeshType>
47MeshType convert_mesh_assimp_to_lagrange(
const aiMesh& mesh,
const LoadOptions& options = {});
52template <
typename MeshType>
53MeshType load_mesh_assimp(
const aiScene& scene,
const LoadOptions& options = {});
58template <
typename SceneType>
59SceneType load_simple_scene_assimp(
const aiScene& scene,
const LoadOptions& options = {});
64template <
typename SceneType>
65SceneType load_scene_assimp(
const aiScene& scene,
const LoadOptions& options = {});