1 / 9

Assimp

Assimp. Assimp Website. http://assimp.sourceforge.net/index.html for Assimp documentation, go to: http://assimp.sourceforge.net/lib_html/index.html. Assimp includes. To include Assimp in your project, you will need to use these includes: #include <assimp/Importer.hpp>

clodia
Download Presentation

Assimp

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assimp

  2. Assimp Website http://assimp.sourceforge.net/index.html for Assimp documentation, go to: http://assimp.sourceforge.net/lib_html/index.html

  3. 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 aiScene object

  4. Assimp includes cont. #include <assimp/postprocess.h> includes the post-processing variables for the importer #include <assimp/color4.h> includes the aiColor4 object, which is used to handle the colors from the mesh objects

  5. aiScene The main class Assimp uses is aiScene. The aiScene class holds the data for the meshes, textures, materials, lights, etc. Using the importer's ReadFile function returns an instance of the aiScene class filled with all the data present in your obj file. (for ease of use, set the aiProcess_Triangulate flag when using ReadFile)

  6. Useful aiScene Members aiMesh** mMeshes - contains a 2-dimensional array of object meshes aiTexture** mTextures - contains a 2-dimensional array of textures int mNumMeshes and mNumTextures - contain the number of the respective objects in the scene

  7. Useful aiScene Members Cont. bool HasMeshes() bool HasTextures() bool HasMaterials() etc Return whether or not the instance of the aiScene object contain any of the respective object.

  8. aiMesh Contains the vertices, faces, colors, normals, and more that relate to an object Members: aiVector3D* mVertices (and mNumVertces) aiVector3D* mFaces (and mNumFaces) aiVector3D* mNormals aiColor4D* mColors bool HasFaces() bool HasNormals()

  9. Tutorials http://ogldev.atspace.co.uk/www/tutorial22/tutorial22.html http://www.lighthouse3d.com/cg-topics/code-samples/importing-3d-models-with-assimp/

More Related