Overte C++ Documentation
OBJBaker.h
1 //
2 // OBJBaker.h
3 // libraries/baking/src
4 //
5 // Created by Utkarsh Gautam on 9/29/17.
6 // Copyright 2017 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_OBJBaker_h
13 #define hifi_OBJBaker_h
14 
15 #include "Baker.h"
16 #include "ModelBaker.h"
17 #include "ModelBakingLoggingCategory.h"
18 
19 using NodeID = qlonglong;
20 
21 class OBJBaker : public ModelBaker {
22  Q_OBJECT
23 public:
24  using ModelBaker::ModelBaker;
25 
26 protected:
27  virtual void bakeProcessedSource(const hfm::Model::Pointer& hfmModel, const std::vector<hifi::ByteArray>& dracoMeshes, const std::vector<std::vector<hifi::ByteArray>>& dracoMaterialLists) override;
28 
29 private:
30  void createFBXNodeTree(FBXNode& rootNode, const hfm::Model::Pointer& hfmModel, const hifi::ByteArray& dracoMesh);
31  void setMaterialNodeProperties(FBXNode& materialNode, QString material, const hfm::Model::Pointer& hfmModel);
32  NodeID nextNodeID() { return _nodeID++; }
33 
34  NodeID _nodeID { 0 };
35  std::vector<NodeID> _materialIDs;
36 };
37 #endif // hifi_OBJBaker_h
A node within an FBX document.
Definition: FBX.h:41