Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assimp.

Similar presentations


Presentation on theme: "Assimp."— Presentation transcript:

1 Assimp

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

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


Download ppt "Assimp."

Similar presentations


Ads by Google