obj_loader.hpp 398 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include <iostream>
  3. #include <object.hpp>
  4. namespace gb
  5. {
  6. class obj_loader
  7. {
  8. public:
  9. Object load_object(std::istream& stream);
  10. private:
  11. enum class state
  12. {
  13. ready,
  14. ignore_once,
  15. ignore_line,
  16. object_name,
  17. vertex,
  18. vertex_texture,
  19. vertex_normal,
  20. face,
  21. end,
  22. };
  23. state m_state = state::ready;
  24. };
  25. }