source: OGRE/trunk/ogrenew/Tools/MayaExport/old/OgreExporter.h @ 657

Revision 657, 1.6 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1
2
3
4
5
6
7
8
9
10
11
12#pragma once
13
14#define _BOOL
15
16#include <string>
17
18#include <maya/MPxFileTranslator.h>
19#include <maya/MObject.h>
20#include <maya/MDagPath.h>
21
22class MFnPlugin;
23
24class MayaMesh
25{
26public:
27        MayaMesh( const MDagPath &meshDagPath, const MDagPath &meshParentPath, const MObject &meshObject );
28
29        MDagPath path( void ) const
30        {
31                return m_meshDagPath;
32        }
33
34        MObject object( void ) const
35        {
36                return m_meshObject;
37        }
38
39private:
40        MDagPath m_meshDagPath;
41        MDagPath m_meshParentPath;
42
43        MObject  m_meshObject;
44};
45
46struct MayaBone
47{
48public:
49        MayaBone( const MDagPath &boneDagPath, const MDagPath &boneParentPath, const MObject &meshObject );
50
51private:
52        MDagPath m_boneDagPath;
53        MDagPath m_boneParentPath;
54
55        MObject  m_boneObject;
56
57        int      m_references;
58};
59
60
61class OgreExporter : public MPxFileTranslator
62{
63public:
64        static bool RegisterPlugin  ( MFnPlugin &plugin );
65        static bool DeregisterPlugin( MFnPlugin &plugin );
66
67public:
68        OgreExporter();
69
70public:
71        virtual MStatus writer( const MFileObject &file,
72                                const MString     &optionsString,
73                                FileAccessMode     mode);
74        static void* creator();
75       
76        virtual bool    haveWriteMethod () const;
77        virtual bool    haveReadMethod  () const;
78        virtual MString defaultExtension() const;
79
80        virtual MPxFileTranslator::MFileKind identifyFile( const MFileObject &file,
81                                                           const char * buffer,
82                                                           short              size ) const;
83
84private:
85        std::string m_filename;
86
87};
Note: See TracBrowser for help on using the repository browser.