Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/Tools/3dsmaxExport/LEXIExporter/LexiExport/Sources/LexiOgreMaterialCompiler.h @ 6

Last change on this file since 6 was 6, checked in by anonymous, 17 years ago

=…

File size: 2.1 KB
Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of LEXIExporter
4
5Copyright 2006 NDS Limited
6
7Author(s):
8Mark Folkenberg,
9Bo Krohn
10
11This program is free software; you can redistribute it and/or modify it under
12the terms of the GNU Lesser General Public License as published by the Free Software
13Foundation; either version 2 of the License, or (at your option) any later
14version.
15
16This program is distributed in the hope that it will be useful, but WITHOUT
17ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
19
20You should have received a copy of the GNU Lesser General Public License along with
21this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22Place - Suite 330, Boston, MA 02111-1307, USA, or go to
23http://www.gnu.org/copyleft/lesser.txt.
24-----------------------------------------------------------------------------
25*/
26
27#include "LexiIntermediateAPI.h"
28
29class COgreMaterialCompiler
30{
31public:
32
33        COgreMaterialCompiler( CIntermediateMaterial* pIntermediateMaterial );
34        virtual ~COgreMaterialCompiler();
35
36        bool                            WriteOgreMaterial( const Ogre::String& sFilename );
37        Ogre::MaterialPtr       GetOgreMaterial( void );
38        void                            CopyTextureMaps( Ogre::String outPath );
39        void                            CopyShaderSources( Ogre::String outPath );
40protected:
41
42        void    InitializeOgreComponents( void );
43
44private:
45
46        void    CreateOgreMaterial( void );
47        void    ParseMaterialMaps( Ogre::Pass* pass );
48        void    CreateTextureUnits( Ogre::Pass* pass, STextureMapInfo texInfo );
49
50        void    CreatePureBlinn( Ogre::Pass* pass);
51        void    CreateDiffuse(  Ogre::Pass* pass );
52        void    CreateSpecularColor(  Ogre::Pass* pass );
53        void    CreateSpecularLevel(  Ogre::Pass* pass );
54        void    CreateSelfIllumination(  Ogre::Pass* pass );
55        void    CreateDiffuseAndOpacity( Ogre::Pass* pass );
56
57        static int doFileCopy(Ogre::String inFile, Ogre::String outFile);
58
59        Ogre::MaterialPtr m_pOgreMaterial;
60        CIntermediateMaterial* m_pIMaterial;
61
62        bool    m_bReindex;
63        bool    m_bExportNormals;
64        bool    m_bExportColours;
65        bool    m_bExportTexUVs;
66
67};
Note: See TracBrowser for help on using the repository browser.