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.

wavefrontobj.h 651B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef WAVEFRONTOBJ_H
  2. #define WAVEFRONTOBJ_H
  3. #include <QObject>
  4. #include <QIODevice>
  5. #include "utils/vector3d.h"
  6. class WaveFrontObj : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit WaveFrontObj(QObject *parent = 0);
  11. QList<QList<int> > getFaces() const;
  12. QList<Vector3D> getVertexes() const;
  13. signals:
  14. public slots:
  15. bool openFile(const QString& filename);
  16. bool load(QIODevice& device);
  17. void addFace(QList<int> face);
  18. void addVertex(const Vector3D& vertex);
  19. void setError(const QString& error);
  20. private:
  21. QString _error;
  22. QList<Vector3D> _vertexes;
  23. QList<QList<int> > _faces;
  24. };
  25. #endif // WAVEFRONTOBJ_H