-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathxsiFtkMaterialUtil.h
executable file
·50 lines (32 loc) · 1.83 KB
/
xsiFtkMaterialUtil.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
// Copyright(c) 2005-2006. All Rights Reserved
// By Jean-René Bédard (https://github.com/jrbedard/3d-converter)
#ifndef __XSIFTKMATERIALUTIL_H__
#define __XSIFTKMATERIALUTIL_H__
#include "mtlFile.h"
namespace ZBPlugin
{
class ::CObjFile;
class ::CSLModel;
class ::CSLScene;
// CXsiFtkMaterialUtil: Material utility class
class CXsiFtkMaterialUtil
{
public:
// Create XSI
static CSLMaterialLibrary* CreateMaterialLibrary(CObjFile* pObjFile, CSLScene* pScene, bool bTranslateMaps);
static bool AssignMaterialToModel(CSLMaterialLibrary* pMaterialLibrary, CSLModel* pModel, const std::string& materialName, const CSLGlobalMaterial::EPropagationType& propagType);
static bool AssignMaterialToPoly(CSLMaterialLibrary* pMaterialLibrary, CSLModel* pModel, const std::string& materialName, const CSLGlobalMaterial::EPropagationType& propagType);
// Load XSI
static bool DotXSILoadMaterialLibrary(CObjFile* pObjFile, CSLScene* pScene);
private:
// TODO : make a low level lib with below, like int colladaExportImport.vcproj
static CSLShaderConnectionPoint* GetConnectionPoint(CSLXSIShader* pShader, char* pName);
static bool AddSLMaterial(CMtlFile::CMaterial* pMaterial, CSLMaterialLibrary* pMaterialLibrary, bool bTranslateMaps);
static bool AddXSIMaterial(CMtlFile::CMaterial* pMaterial, CSLScene* pScene, bool bTranslateMaps);
static CSLXSIShader* AddImage(CSLXSIMaterial* pXSIMaterial, const std::string& textureFileName, CSLScene* pScene);
static CSLXSIShader* AddDisplacementMap(CSLXSIMaterial* pXSIMaterial, const std::string& dispFileName, double alphaDepthFactor, CSLScene* pScene);
static bool CreateImageLibrary(CMtlFile::CMaterial* pMaterial, CSLScene* pScene);
static Vector3D ConvertCSIBCColorf(const CSIBCColorf& color);
};
} // End ZBPlugin namespace
#endif // __XSIFTKMATERIALUTIL_H__