10 #ifndef SLASSIMPIMPORTER_H
11 #define SLASSIMPIMPORTER_H
13 #ifdef SL_BUILD_WITH_ASSIMP
27 class SLProgressHandler;
42 explicit SLAssimpImporter(
SLstring& logFile,
45 :
SLImporter(logFile, logConsoleVerb, logFileVerb) {}
52 SLbool deleteTexImgAfterBuild =
false,
53 SLbool loadMeshesOnly =
true,
55 float ambientFactor = 0.0f,
56 SLbool forceCookTorranceRM =
false,
57 SLProgressHandler* progressHandler =
nullptr,
89 typedef std::map<SLstring, aiNode*> SLNodeMap;
90 typedef std::map<SLstring, SLMat4f> SLJointOffsetMap;
91 typedef vector<aiNode*> SLVaiNode;
94 SLJointOffsetMap _jointOffsets;
95 aiNode* _skeletonRoot{};
98 typedef vector<SLMesh*> MeshList;
101 MeshList _skinnedMeshes;
104 aiNode* getNodeByName(
const SLstring& name);
107 void performInitialScan(
const aiScene* scene);
108 void findNodes(aiNode* node,
111 void findJoints(
const aiScene* scene);
112 void findSkeletonRoot();
123 float ambientFactor = 0.0f,
124 SLbool forceCookTorranceLM =
false,
125 SLbool deleteTexImgAfterBuild =
false);
130 SLbool deleteTexImgAfterBuild =
false);
135 SLbool loadMeshesOnly =
true);
141 bool showWarning =
true);
142 SLbool aiNodeHasMesh(aiNode* node);
SLTextureType
Texture type enumeration & their filename appendix for auto type detection.
@ SLProcess_SplitLargeMeshes
@ SLProcess_FindDegenerates
@ SLProcess_FindInvalidData
@ SLProcess_RemoveRedundantMaterials
@ SLProcess_JoinIdenticalVertices
std::map< int, SLMesh * > SLMeshMap
SLAnimManager is the central class for all animation handling.
SLAnimation is the base container for all animation data.
Toplevel holder of the assets meshes, materials, textures and shaders.
Texture object for OpenGL texturing.
Interface for 3D file format importer implementations.
virtual SLNode * load(SLAnimManager &aniMan, SLAssetManager *assetMgr, SLstring pathFilename, SLstring texturePath, SLSkybox *skybox=nullptr, SLbool deleteTexImgAfterBuild=false, SLbool loadMeshesOnly=true, SLMaterial *overrideMat=nullptr, float ambientFactor=0.0f, SLbool forceCookTorranceRM=false, SLProgressHandler *progressHandler=nullptr, SLuint flags=SLProcess_Triangulate|SLProcess_JoinIdenticalVertices|SLProcess_SplitLargeMeshes|SLProcess_RemoveRedundantMaterials|SLProcess_SortByPType|SLProcess_FindDegenerates|SLProcess_FindInvalidData)=0
Specialized SLNode that represents a single joint (or bone) in a skeleton.
Defines a standard CG material with textures and a shader program.
An SLMesh object is a triangulated mesh, drawn with one draw call.
SLNode represents a node in a hierarchical scene graph.
Skybox node class with a SLBox mesh.
void clear(std::string path)