-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathobjFbxConverter.h
executable file
·65 lines (45 loc) · 1.28 KB
/
objFbxConverter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright(c) 2005-2006. All Rights Reserved
// By Jean-René Bédard (https://github.com/jrbedard/3d-converter)
#ifndef __OBJFBXCONVERTER_H__
#define __OBJFBXCONVERTER_H__
#include "fromObjConverter.h"
namespace FBXSDK_NAMESPACE
{
class KFbxLayer;
}
namespace ZBPlugin
{
class CFbxFile;
class CObjFbxOptions;
// CObjFbxConverter: Converts OBJ into FBX
class CObjFbxConverter : public CFromObjConverter
{
public:
CObjFbxConverter();
~CObjFbxConverter();
private:
CObjFbxConverter(const CObjFbxConverter&); // Copy constructor
void operator=(const CObjFbxConverter&); // Assignment operator
public:
bool ParseOptions(const std::string& optionString);
bool Convert(CFile* pObjFile, CFile* pOtherFile);
private:
struct SFbxMaterial
{
int fbxMaterialID;
int fbxTextureID;
};
typedef std::map<int, SFbxMaterial> MaterialMap; // < OBJ mat index, < FBX mat ID, FBX tex ID > >
SFbxMaterial CreateMaterial(int materialID, FBXSDK_NAMESPACE::KFbxLayer* pMasterLayer);
MaterialMap m_materials;
private:
CFbxFile* m_pFbxFile;
CObjFbxOptions* m_pOptions;
};
class CObjFbxOptions : public CFromObjOptions
{
//bool m_b3dsConversion;
bool m_bEmbedTexture;
};
} // End ZBPlugin namespace
#endif // __OBJFBXCONVERTER_H__