Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

load3ds.h 510B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __LOAD3DS_H
  2. #define __LOAD3DS_H
  3. #include <iostream>
  4. #include <fstream>
  5. #include <string>
  6. #include <vector>
  7. #include "model.h"
  8. #include "../glcolor.h"
  9. class Chunk {
  10. private:
  11. short ident;
  12. char m;
  13. char n;
  14. public:
  15. Chunk() { };
  16. void parse();
  17. };
  18. class Load3ds {
  19. private:
  20. std::string filename;
  21. bool parsed;
  22. bool error;
  23. GLColor readColorChunk(std::ifstream *file);
  24. public:
  25. Load3ds(std::string _fname, bool parse=true);
  26. bool parse(Model *m);
  27. void unload();
  28. };
  29. #endif