ogreexporter.h

来自「使用stl技术,(还没看,是听说的)」· C头文件 代码 · 共 88 行

H
88
字号











#pragma once

#define _BOOL

#include <string>

#include <maya/MPxFileTranslator.h>
#include <maya/MObject.h>
#include <maya/MDagPath.h>

class MFnPlugin;

class MayaMesh
{
public:
	MayaMesh( const MDagPath &meshDagPath, const MDagPath &meshParentPath, const MObject &meshObject );

	MDagPath path( void ) const
	{
		return m_meshDagPath;
	}

	MObject object( void ) const
	{
		return m_meshObject;
	}

private:
	MDagPath m_meshDagPath;
	MDagPath m_meshParentPath;

	MObject  m_meshObject;
};

struct MayaBone
{
public:
	MayaBone( const MDagPath &boneDagPath, const MDagPath &boneParentPath, const MObject &meshObject );

private:
	MDagPath m_boneDagPath;
	MDagPath m_boneParentPath;

	MObject  m_boneObject;

	int      m_references;
};


class OgreExporter : public MPxFileTranslator
{
public:
	static bool RegisterPlugin  ( MFnPlugin &plugin );
	static bool DeregisterPlugin( MFnPlugin &plugin );

public:
	OgreExporter();

public:
	virtual MStatus writer( const MFileObject &file,
	                        const MString     &optionsString,
	                        FileAccessMode     mode);
	static void* creator();
	
	virtual bool    haveWriteMethod () const;
	virtual bool    haveReadMethod  () const;
	virtual MString defaultExtension() const;

	virtual MPxFileTranslator::MFileKind identifyFile( const MFileObject &file,
	                                                   const char * buffer,
	                                                   short              size ) const;

private:
	std::string m_filename;

};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?