📄 sceneconverter.h
字号:
#ifndef _SCENE_CONVERTER_H
#define _SCENE_CONVERTER_H
#include "Ogre.h"
#include "stdio.h"
#include "SceneConverterOctree.h"
#include "OgreMeshSerializer.h"
#include "OgreSkeletonSerializer.h"
#include "OgreDataChunk.h"
#include "OgreDefaultHardwareBufferManager.h"
namespace SceneConverterLib{
#include "tinyxml.h"
} // namespace SceneConverter
namespace Ogre {
class SceneConverter
{
public:
SceneConverter();
~SceneConverter();
// Call this function before anything else
// Send it the name of the scene. 2 Different Scenes should not have the same name.
int Init( const String& NewSceneName );
void SetMaxDepth( int NewDepth );
void SetMaxTriPerNode( int NewTriPerNode );
// MUST decompile the Octree before adding anything to it!
//void Decompile();
// Recompile the Octree before saving it
void Compile();
// Converts a standard Ogre .mesh file into the Octree
int AddMesh( const String& SrcMesh, Vector3 NewPos, Quaternion NewRot, Vector3 NewScale );
// Generic function, usefull for exporters like 3ds or maya. ( NOT YET IMPLIMENTED )
// Add 1 sub mesh at a time.
/*
int AddGeometry( int TotalVerts, float* VertData,
int TotalTris, int* TriData,
float* NormalData=NULL,
float* ColorData=NULL,
int TotalTexSets=1, float* TexData=NULL,
char* Material=NULL, char* Texture=NULL );
*/
// Adds existing Octree Geometry from an external file to this Octree
int AddScene( const String& SrcScene );
// The contents of the Octree will be saved to this xml <octree> element.
// NOTE: Be sure to Compile() the Octree before saving.
void Save( TiXmlElement* OctreeRoot );
// Call This to get Rid of any Memory Being Used
void Unload();
private:
SceneConverterOctree myOctree;
MeshSerializer* meshSerializer;
SkeletonSerializer* skeletonSerializer;
String SceneName;
};
} // namespace Ogre
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -