Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogre/Tools/MilkshapeExport/include/MilkshapePlugin.h @ 20

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

=…

File size: 3.2 KB
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-2006 Torus Knot Software Ltd
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
24You may alternatively use this source under the terms of a specific version of
25the OGRE Unrestricted License provided you have obtained such a license from
26Torus Knot Software Ltd.
27-----------------------------------------------------------------------------
28*/
29
30#ifndef __MilkshapePlugin_H__
31#define __MilkshapePlugin_H__
32
33#include "msPlugIn.h"
34#include "windows.h"
35#include "Ogre.h"
36
37
38/** A plugin class for Milkshape3D to export to OGRE model formats.
39@remarks
40    This class is the implementor of the exporting interface for Milkshape3D, to allow
41    you to export your models to OGRE format from that tool.
42    Note that this plugin delegates most of the detail of exporting the model to the
43    generic model export framework.
44*/
45class MilkshapePlugin : public cMsPlugIn
46{
47   
48    char mTitle[64];
49
50public:
51        MilkshapePlugin ();
52    virtual ~MilkshapePlugin ();
53
54public:
55    /// As required by Milkshape
56    int             GetType ();
57    /// As required by Milkshape
58    const char *    GetTitle ();
59    /// As required by Milkshape
60    int             Execute (msModel* pModel);
61
62    /** Callback to process window events */
63#if OGRE_ARCHITECTURE_64 == OGRE_ARCH_TYPE
64    static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam);
65#else
66    static BOOL CALLBACK DlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam);
67#endif
68
69    bool exportMaterials;
70    bool generateLods;
71    bool generateEdgeLists;
72    bool generateTangents;
73        Ogre::VertexElementSemantic tangentSemantic;
74    unsigned short numLods;
75    float lodDepthIncrement;
76    Ogre::ProgressiveMesh::VertexReductionQuota lodReductionMethod;
77    float lodReductionAmount;
78    bool exportMesh;
79    bool exportSkeleton;
80    bool splitAnimations;
81    float fps; 
82
83protected:
84    bool showOptions(void);
85    void doExportMesh(msModel* pModel);
86    void doExportMaterials(msModel* pModel);
87    void doExportAnimations(msModel* pModel, Ogre::SkeletonPtr& skel);
88    Ogre::SkeletonPtr doExportSkeleton(msModel* pModel, Ogre::MeshPtr& mesh); // Skeleton returned for deletion later
89    bool locateSkeleton(Ogre::MeshPtr& mesh);
90        Ogre::ColourValue msVec4ToColourValue(float prop[4]);
91};
92
93#endif
94
Note: See TracBrowser for help on using the repository browser.