Revision 692,
1.3 KB
checked in by mattausch, 19 years ago
(diff) |
adding ogre 1.2 and dependencies
|
Line | |
---|
1 | #ifndef _MATERIAL_H
|
---|
2 | #define _MATERIAL_H
|
---|
3 |
|
---|
4 | #include "mayaExportLayer.h"
|
---|
5 | #include "paramList.h"
|
---|
6 |
|
---|
7 | namespace OgreMayaExporter
|
---|
8 | {
|
---|
9 |
|
---|
10 | typedef enum MaterialTypeTag {MT_LAMBERT,MT_PHONG,MT_BLINN} MaterialType;
|
---|
11 |
|
---|
12 | typedef enum TexOpTypeTag {TOT_REPLACE,TOT_MODULATE,TOT_ADD,TOT_ALPHABLEND} TexOpType;
|
---|
13 |
|
---|
14 | typedef struct textureTag
|
---|
15 | {
|
---|
16 | MString filename;
|
---|
17 | MString absFilename;
|
---|
18 | TexOpType opType;
|
---|
19 | MString uvsetName;
|
---|
20 | int uvsetIndex;
|
---|
21 | } texture;
|
---|
22 |
|
---|
23 |
|
---|
24 | /***** Class Material *****/
|
---|
25 | class Material
|
---|
26 | {
|
---|
27 | public:
|
---|
28 | //constructor
|
---|
29 | Material();
|
---|
30 | //destructor
|
---|
31 | ~Material();
|
---|
32 | //get material name
|
---|
33 | MString& name();
|
---|
34 | //clear material data
|
---|
35 | void clear();
|
---|
36 | //load material data
|
---|
37 | MStatus load(MFnLambertShader* pShader,MStringArray& uvsets,ParamList& params);
|
---|
38 | //write material data to Ogre XML
|
---|
39 | MStatus writeXML(ParamList ¶ms);
|
---|
40 | //copy textures to path specified by params
|
---|
41 | MStatus copyTextures(ParamList ¶ms);
|
---|
42 | protected:
|
---|
43 | //load texture data
|
---|
44 | MStatus loadTexture(MFnDependencyNode* pTexNode,TexOpType& opType,MStringArray& uvsets,ParamList& params);
|
---|
45 |
|
---|
46 | MString m_name;
|
---|
47 | MaterialType m_type;
|
---|
48 | MColor m_ambient, m_diffuse, m_specular, m_emissive;
|
---|
49 | bool m_lightingOff;
|
---|
50 | bool m_isTransparent;
|
---|
51 | bool m_isTextured;
|
---|
52 | bool m_isMultiTextured;
|
---|
53 | std::vector<texture> m_textures;
|
---|
54 | };
|
---|
55 |
|
---|
56 | }; //end of namespace
|
---|
57 |
|
---|
58 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.