Assimp Assimp Website http assimp sourceforge netindex html
Assimp
Assimp Website http: //assimp. sourceforge. net/index. html for Assimp documentation, go to: http: //assimp. sourceforge. net/lib_html/in dex. html
Assimp includes To include Assimp in your project, you will need to use these includes: #include <assimp/Importer. hpp> includes the importer, which is used to read our obj file #include <assimp/scene. h> includes the ai. Scene object
Assimp includes cont. #include <assimp/postprocess. h> includes the post-processing variables for the importer #include <assimp/color 4. h> includes the ai. Color 4 object, which is used to handle the colors from the mesh objects
ai. Scene The main class Assimp uses is ai. Scene. The ai. Scene class holds the data for the meshes, textures, materials, lights, etc. Using the importer's Read. File function returns an instance of the ai. Scene class filled with all the data present in your obj file. (for ease of use, set the ai. Process_Triangulate flag when using Read. File)
Useful ai. Scene Members ai. Mesh** m. Meshes - contains a 2 -dimensional array of object meshes ai. Texture** m. Textures - contains a 2 dimensional array of textures int m. Num. Meshes and m. Num. Textures - contain the number of the respective objects in the scene
Useful ai. Scene Members Cont. bool Has. Meshes() bool Has. Textures() bool Has. Materials() etc Return whether or not the instance of the ai. Scene object contain any of the respective object.
ai. Mesh Contains the vertices, faces, colors, normals, and more that relate to an object Members: ai. Vector 3 D* m. Vertices (and m. Num. Vertces) ai. Vector 3 D* m. Faces (and m. Num. Faces) ai. Vector 3 D* m. Normals ai. Color 4 D* m. Colors bool Has. Faces() bool Has. Normals()
Tutorials http: //ogldev. atspace. co. uk/www/tutorial 22. html http: //www. lighthouse 3 d. com/cgtopics/code-samples/importing-3 d-modelswith-assimp/
- Slides: 9