History

obj file is now produced in /tmp

Seth Alves committed 9 years ago

Commit bb3155e1 parent 5131d1e6 files · +201 −84Browse files

Showing the changes to libraries/script-engine/src/ModelScriptingInterface.h (1 of 6 files). Show all

Unified · Split

libraries/script-engine/src/ModelScriptingInterface.h+3−20
@@ -17,6 +17,7 @@ · 16 unmodified lines
17#include <QScriptValue>17#include <QScriptValue>
18#include <OBJWriter.h>18#include <OBJWriter.h>
19#include <model/Geometry.h>19#include <model/Geometry.h>
20#include "MeshProxy.h"
20 21
21using MeshPointer = std::shared_ptr<model::Mesh>;22using MeshPointer = std::shared_ptr<model::Mesh>;
22 23
@@ -25,30 +26,12 @@ class ModelScriptingInterface : public QObject { · 2 unmodified lines
25 26
26public:27public:
27 ModelScriptingInterface(QObject* parent);28 ModelScriptingInterface(QObject* parent);
28};
29
30class MeshProxy : public QObject {
31 Q_OBJECT
32
33public:
34 MeshProxy(MeshPointer mesh);
35 // MeshProxy(const MeshProxy& meshProxy) { _mesh = meshProxy.getMeshPointer(); }
36 ~MeshProxy();
37
38 MeshPointer getMeshPointer() const { return _mesh; }
39 29
40 Q_INVOKABLE int getNumVertices() const { return _mesh->getNumVertices(); }30 Q_INVOKABLE QString meshToOBJ(MeshProxy* const &in);
41
42protected:
43 MeshPointer _mesh;
44};31};
45 32
46
47Q_DECLARE_METATYPE(MeshProxy*);
48
49
50QScriptValue meshToScriptValue(QScriptEngine* engine, MeshProxy* const &in);33QScriptValue meshToScriptValue(QScriptEngine* engine, MeshProxy* const &in);
51// QScriptValue meshToScriptValue(QScriptEngine* engine, const MeshPointer& in);
52void meshFromScriptValue(const QScriptValue& value, MeshProxy* &out);34void meshFromScriptValue(const QScriptValue& value, MeshProxy* &out);
53 35
36
54#endif // hifi_ModelScriptingInterface_h37#endif // hifi_ModelScriptingInterface_h