Overte C++ Documentation
FST.h
1 //
2 // FST.h
3 //
4 // Created by Ryan Huffman on 12/11/15.
5 // Copyright 2018 High Fidelity, Inc.
6 //
7 // Distributed under the Apache License, Version 2.0.
8 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
9 //
10 
11 #ifndef hifi_FST_h
12 #define hifi_FST_h
13 
14 #include <QVariantHash>
15 #include <QUuid>
16 #include "FSTReader.h"
17 
18 namespace hfm {
19  class Model;
20 };
21 
22 class FST : public QObject {
23  Q_OBJECT
24  Q_PROPERTY(QString name READ getName WRITE setName NOTIFY nameChanged)
25  Q_PROPERTY(QString modelPath READ getModelPath WRITE setModelPath NOTIFY modelPathChanged)
26 public:
27  FST(QString fstPath, QMultiHash<QString, QVariant> data);
28 
29  static FST* createFSTFromModel(const QString& fstPath, const QString& modelFilePath, const hfm::Model& hfmModel);
30 
31  QString absoluteModelPath() const;
32 
33  QString getName() const { return _name; }
34  void setName(const QString& name);
35 
36  QString getModelPath() const { return _modelPath; }
37  void setModelPath(const QString& modelPath);
38 
39  QStringList getScriptPaths() const { return _scriptPaths; }
40  void setScriptPaths(QStringList scriptPaths) { _scriptPaths = scriptPaths; }
41 
42  QString getPath() const { return _fstPath; }
43 
44  QMultiHash<QString, QVariant> getMapping() const;
45 
46  bool write();
47 
48 signals:
49  void nameChanged(const QString& name);
50  void modelPathChanged(const QString& modelPath);
51 
52 private:
53  QString _fstPath;
54 
55  QString _name{};
56  QString _modelPath{};
57 
58  QStringList _scriptPaths{};
59 
60  QVariantHash _other{};
61 };
62 
63 #endif // hifi_FST_h
A generic 3D model displaying geometry loaded from a URL.
Definition: Model.h:84
The runtime model format.
Definition: HFM.h:302