source: OGRE/trunk/ogrenew/Tools/MilkshapeExport/include/MilkshapePlugin.h @ 692

Revision 692, 3.0 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25
26#ifndef __MilkshapePlugin_H__
27#define __MilkshapePlugin_H__
28
29#include "msPlugIn.h"
30#include "windows.h"
31#include "Ogre.h"
32
33
34/** A plugin class for Milkshape3D to export to OGRE model formats.
35@remarks
36    This class is the implementor of the exporting interface for Milkshape3D, to allow
37    you to export your models to OGRE format from that tool.
38    Note that this plugin delegates most of the detail of exporting the model to the
39    generic model export framework.
40*/
41class MilkshapePlugin : public cMsPlugIn
42{
43   
44    char mTitle[64];
45
46public:
47        MilkshapePlugin ();
48    virtual ~MilkshapePlugin ();
49
50public:
51    /// As required by Milkshape
52    int             GetType ();
53    /// As required by Milkshape
54    const char *    GetTitle ();
55    /// As required by Milkshape
56    int             Execute (msModel* pModel);
57
58    /** Callback to process window events */
59#if OGRE_ARCHITECTURE_64 == OGRE_ARCH_TYPE
60    static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam);
61#else
62    static BOOL CALLBACK DlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam);
63#endif
64
65    bool exportMaterials;
66    bool generateLods;
67    bool generateEdgeLists;
68    bool generateTangents;
69    unsigned short numLods;
70    float lodDepthIncrement;
71    Ogre::ProgressiveMesh::VertexReductionQuota lodReductionMethod;
72    float lodReductionAmount;
73    bool exportMesh;
74    bool exportSkeleton;
75    bool splitAnimations;
76    float fps;
77
78protected:
79    bool showOptions(void);
80    void doExportMesh(msModel* pModel);
81    void doExportMaterials(msModel* pModel);
82    void doExportAnimations(msModel* pModel, Ogre::SkeletonPtr& skel);
83    Ogre::SkeletonPtr doExportSkeleton(msModel* pModel, Ogre::MeshPtr& mesh); // Skeleton returned for deletion later
84    bool locateSkeleton(Ogre::MeshPtr& mesh);
85        Ogre::ColourValue msVec4ToColourValue(float prop[4]);
86};
87
88#endif
89
Note: See TracBrowser for help on using the repository browser.