Advertisement
Guest User

Untitled

a guest
Aug 24th, 2015
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. class Mesh
  2. {
  3. public:
  4. Mesh(Texture2DCache *textureCache);
  5. ~Mesh();
  6.  
  7. bool load(const char *file);
  8. void free();
  9.  
  10. MeshNode *rootNode() { return _rootNode; }
  11. RenderMeshData* getRenderMeshData(unsigned int index) { return _renderMeshDatas[index]; }
  12.  
  13. unsigned int getNumAnimations() const { return _animationDatas.size(); }
  14. const AnimationData* getAnimationData(unsigned int index) const;
  15. const AnimationData* getAnimationData(const char *name) const;
  16.  
  17. private:
  18. std::vector<RenderMeshData*> _renderMeshDatas;
  19. std::vector<AnimationData*> _animationDatas;
  20. std::unordered_map<unsigned int, MeshMaterial*> _materials; //index, material
  21.  
  22. MeshNode *_rootNode;
  23.  
  24. Texture2DCache *_textureCache;
  25.  
  26. std::string _directory;
  27. void _getDirectory(const std::string &file, std::string &directory);
  28. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement