Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. for (int i = 0; i < scene->mNumMeshes; i++) {
  2. aiMesh* temp_m = scene->mMeshes[i];
  3. //store vertex
  4. uint size = sizeof(float)*temp_m->mNumVertices;
  5. memcpy(buffer_total, temp_m->mVertices, size);
  6.  
  7. size = sizeof(uint)*temp_m->mNumFaces;
  8. memcpy(buffer_total, temp_m->mFaces, size);
  9.  
  10. size = sizeof(float)*temp_m->mNumVertices * 2;
  11. memcpy(buffer_total, temp_m->mTextureCoords, size);
  12.  
  13. size = sizeof(float)*temp_m->mNumVertices;
  14. memcpy(buffer_total, temp_m->mNormals, size);
  15.  
  16. size = sizeof(char)*temp_m->mName.length;
  17. std::string name_mesh = temp_m->mName.C_Str();
  18. memcpy(buffer_total, name_mesh.data(), size);
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement