My Project
FBXMaterial.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
5  struct FBXMaterial
6  {
7  public:
9  {
10  nIsReplaceableIndex = -1;
11  bHasOpacityMap = false;
12  bHasBumpMap = false;
13  bHasLightMap = false;
14  bHasDisplacementMap = false;
15  bHasReflectionMap = false;
16  bUseCubicMap = false;
17  bDisableZWrite = false;
18  bDisablePhysics = false;
19  bForcePhysics = false;
20  bForceLocalTranparency = false;
21  fReflectivity = 1.0f;
22  fAlphaTestingRef = 0.5f;
23  bAnimUV = false;
24  bUnlit = false;
25  bAddictive = false;
26  bBillboard = false;
27  bAABillboard = false;
28  nForceUnique = 0;
29  m_nCategoryID = 0;
30  bRGBOnlyUVAnim = false;
31  bRotateParticle2SpeedVector = false;
32  fStripLenght = 0;
33  bFacegroupSknningAni = false;
34  nIndex = -1;
35  m_nOrder = 0;
36  }
37  public:
38  bool isAlphaBlended() {return fAlphaTestingRef == 0.f; }
39  const std::string& GetFileName() { return m_filename; };
40 
41  operator const std::string& () { return m_filename; }
42 
43  /* material category id, may be used by some deferred shading shader. default to 0*/
44  int32 GetCategoryID() const { return m_nCategoryID; }
45  void SetCategoryID(int32 val) { m_nCategoryID = val; }
46 
47  public:
48  std::string m_filename;
49  // LiXizhi added
50  // -1 if it is not replaceable texture.
51  int nIsReplaceableIndex;
52  // if true, it contains the opacity map
53  bool bHasOpacityMap;
54  // if true, it contains the bump map
55  bool bHasBumpMap;
56  // if true, it contains the bump map
57  bool bHasLightMap;
58  // if true, it contains the displacement map
59  bool bHasDisplacementMap;
60  // if true, it contains the reflection map
61  // this is mutually exclusively with the bUseCubicMap
62  bool bHasReflectionMap;
63  // if true, it contains the cubic environment map in the reflection map of standard material.
64  // this is mutually exclusively with the bHasReflectionMap
65  bool bUseCubicMap;
66  // whether z buffer is disabled for the given material, default is false, unless you are working on special material such as particles.
67  bool bDisableZWrite;
68  // if this is true, we will not sort transparent mesh(with bDisableZWrite) globally, instead it will only be sorted per mesh, hence greatly increased rendering speed.
69  bool bForceLocalTranparency;
70  // if true, physics of this material will be disabled.
71  bool bDisablePhysics;
72  // if true, we will force physics and ignore all physics from other materials
73  bool bForcePhysics;
74  // reflection or environment map's reflectivity
75  float fReflectivity;
76  // alpha testing threshold, if this is 0, alpha testing is disabled. if this is 0.5, alpha testing is enabled.
77  // although this value can be [0,1), the game engine currently only support 0 or 0.5 alpha testing. i.e. boolean value.
78  float fAlphaTestingRef;
79  // if this is false, it means that no UV animation is used, otherwise UVAnimations contains the model's tex animations.
80  bool bAnimUV;
81  //if true, only texture alpha channel will have ui animation. --clayman 2011.8.4
82  bool bRGBOnlyUVAnim;
83  // if true, no lighting is applied to the surface. default to false
84  bool bUnlit;
85  // if true, additive alpha or one alpha blending is enabled. if bHasOpacityMap, it is BM_ADDITIVE_ALPHA, otherwise, it is BM_ADDITIVE
86  bool bAddictive;
87  // billboarded
88  bool bBillboard;
89  // axis aligned billboard, always up.
90  bool bAABillboard;
91  //rotate particle align
92  bool bRotateParticle2SpeedVector;
93 
94  //for fixed texture trip animaiton;
95  float fStripLenght;
96 
97  bool bFacegroupSknningAni;
98 
99  // this will force this material to be unique, since the exporter will materials with the same parameter.
100  int nForceUnique;
101 
102  /* material category id, may be used by some deferred shading shader. default to 0*/
103  int32 m_nCategoryID;
104  int32 m_nOrder;
105 
106  int nIndex; // index of the material, -1 means no texture associated.
107 
108  // the model transparency animation block.
109  ModelTransparency m_transparency_anim;
110 
111  // emissive color animation block.
112  ModelColor m_colors_anim;
113  };
114 }
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: ParaXModelCommon.h:13
Definition: ParaXModelCommon.h:8
Definition: FBXMaterial.h:5