Skip to content

Commit 6eda485

Browse files
committed
refactor: headers and namespace
1 parent b4688d1 commit 6eda485

27 files changed

+71
-28
lines changed

src/FBX2glTF.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
// Standard library includes
910
#include <fstream>
1011
#include <iostream>
11-
#include <map>
12-
#include <unordered_map>
1312
#include <vector>
1413

14+
// Third-party library includes
1515
#include <CLI/CLI.hpp>
1616

17+
// Project includes
1718
#include "FBX2glTF.h"
1819
#include "fbx/Fbx2Raw.hpp"
1920
#include "gltf/Raw2Gltf.hpp"
2021
#include "utils/File_Utils.hpp"
21-
#include "utils/String_Utils.hpp"
2222

2323
bool verboseOutput = false;
2424

src/fbx/Fbx2Raw.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <algorithm>
1212
#include <cassert>
1313
#include <cmath>
14-
#include <cstdio>
1514
#include <map>
1615
#include <set>
1716
#include <string>

src/fbx/Fbx2Raw.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
#pragma once
1010

11+
#include <set>
12+
#include <string>
13+
1114
#include "raw/RawModel.hpp"
1215

1316
bool LoadFBXFile(

src/fbx/FbxBlendShapesAccess.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#pragma once
1010

11-
#include <algorithm>
12-
#include <fstream>
1311
#include <string>
1412
#include <vector>
1513

src/fbx/FbxSkinningAccess.hpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88

99
#pragma once
1010

11-
#include <algorithm>
12-
#include <fstream>
13-
#include <map>
14-
#include <set>
15-
#include <string>
16-
#include <unordered_map>
11+
#include <fbxsdk/scene/geometry/fbxnode.h>
12+
#include <cassert>
1713
#include <vector>
14+
#include "mathfu.hpp"
15+
using namespace fbxsdk;
1816

19-
#include "FBX2glTF.h"
2017

2118
class FbxSkinningAccess {
2219
public:

src/fbx/materials/3dsMaxPhysicalMaterial.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
#include <fbxsdk/scene/shading/fbxfiletexture.h>
10+
#include <fmt/printf.h>
11+
12+
#include "FBX2glTF.h"
913
#include "RoughnessMetallicMaterials.hpp"
14+
using namespace fbxsdk;
1015

1116
std::unique_ptr<FbxRoughMetMaterialInfo> Fbx3dsMaxPhysicalMaterialResolver::resolve() const {
1217
const FbxProperty topProp = fbxMaterial->FindProperty("3dsMax", false);

src/fbx/materials/FbxMaterials.hpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@
88

99
#pragma once
1010

11+
#include <fbxsdk/core/arch/fbxtypes.h>
12+
#include <fbxsdk/core/base/fbxstring.h>
13+
#include <fbxsdk/scene/geometry/fbxlayer.h>
14+
#include <fbxsdk/scene/geometry/fbxmesh.h>
15+
#include <fbxsdk/scene/shading/fbxsurfacematerial.h>
16+
#include <fbxsdk/scene/shading/fbxtexture.h>
1117
#include <map>
18+
#include <memory>
1219
#include <vector>
13-
14-
#include "FBX2glTF.h"
20+
using namespace fbxsdk;
1521

1622
class FbxMaterialInfo {
1723
public:
1824
FbxMaterialInfo(const FbxUInt64 id, const FbxString& name, const FbxString& shadingModel)
1925
: id(id), name(name), shadingModel(shadingModel) {}
2026

21-
const FbxUInt64 id;
22-
const FbxString name;
23-
const FbxString shadingModel;
27+
const fbxsdk::FbxUInt64 id;
28+
const fbxsdk::FbxString name;
29+
const fbxsdk::FbxString shadingModel;
2430
};
2531

2632
template <class T>

src/fbx/materials/RoughnessMetallicMaterials.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
#pragma once
1010

11+
#include <fbxsdk/scene/shading/fbxfiletexture.h>
1112
#include <map>
1213

1314
#include "FbxMaterials.hpp"
15+
using namespace fbxsdk;
1416

1517
struct FbxRoughMetMaterialInfo : FbxMaterialInfo {
1618
static constexpr const char* FBX_SHADER_METROUGH = "MetallicRoughness";

src/fbx/materials/StingrayPBSMaterial.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
#include <cfloat>
10+
#include <fbxsdk/core/arch/fbxtypes.h>
11+
#include <fbxsdk/core/fbxproperty.h>
12+
#include <fbxsdk/scene/shading/fbxfiletexture.h>
13+
#include <fmt/printf.h>
14+
915
#include "RoughnessMetallicMaterials.hpp"
16+
using namespace fbxsdk;
1017

1118
std::unique_ptr<FbxRoughMetMaterialInfo> FbxStingrayPBSMaterialResolver::resolve() const {
1219
const FbxProperty mayaProp = fbxMaterial->FindProperty("Maya");

src/fbx/materials/TraditionalMaterials.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*/
88

99
#include "TraditionalMaterials.hpp"
10+
#include <fbxsdk/scene/shading/fbxfiletexture.h>
11+
#include <fmt/printf.h>
12+
using namespace fbxsdk;
1013

1114
std::unique_ptr<FbxTraditionalMaterialInfo> FbxTraditionalMaterialResolver::resolve() const {
1215
auto getSurfaceScalar = [&](const char* propName) -> std::tuple<FbxDouble, FbxFileTexture*> {

0 commit comments

Comments
 (0)