Overte C++ Documentation
model-baker/src/model-baker/Baker.h
1 //
2 // Baker.h
3 // model-baker/src/model-baker
4 //
5 // Created by Sabrina Shanman on 2018/12/04.
6 // Copyright 2018 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_baker_Baker_h
13 #define hifi_baker_Baker_h
14 
15 #include <shared/HifiTypes.h>
16 #include <hfm/HFM.h>
17 
18 #include "Engine.h"
19 #include "BakerTypes.h"
20 
21 #include "ParseMaterialMappingTask.h"
22 
23 namespace baker {
24  class Baker {
25  public:
26  Baker(const hfm::Model::Pointer& hfmModel, const hifi::VariantHash& mapping, const hifi::URL& materialMappingBaseURL);
27 
28  std::shared_ptr<TaskConfig> getConfiguration();
29 
30  void run();
31 
32  // Outputs, available after run() is called
33  hfm::Model::Pointer getHFMModel() const;
34  MaterialMapping getMaterialMapping() const;
35  const std::vector<hifi::ByteArray>& getDracoMeshes() const;
36  std::vector<bool> getDracoErrors() const;
37  // This is a ByteArray and not a std::string because the character sequence can contain the null character (particularly for FBX materials)
38  std::vector<std::vector<hifi::ByteArray>> getDracoMaterialLists() const;
39 
40  protected:
41  EnginePointer _engine;
42  };
43 };
44 
45 #endif //hifi_baker_Baker_h