📄 scenemain.h
字号:
#ifndef __SCENE_MAIN_H_
#define __SCENE_MAIN_H_
#include "SceneOctree.h"
//#include "SceneTerrain.h"
#include "OgreStringConverter.h"
#include <tinyxml.h>
#include <Ogre.h>
#include <stdio.h>
struct FogInfo{
Ogre::FogMode Type;
Ogre::ColourValue Color;
float Density, Start, End;
};
class SceneMain
{
public:
SceneMain();
~SceneMain();
void SetSceneManager( Ogre::SceneManager* NewSceneManager );
// Load and Save the .scene File
int Load( Ogre::String Filename );
void Unload();
void SetName( Ogre::String NewName );
Ogre::String GetName( void );
void SetPos( Ogre::Vector3 NewPos );
void SetPos( float x, float y, float z );
// Set the Terrain in the Scene
void SetTerrainGeometry( Ogre::String Filename );
void SetTerrainTexture( Ogre::String MaterialName, Ogre::String Filename=NULL );
// Return the Geometry Data For Collision //
int GetNumMeshes( char* name );
float* GetVerticesPtr( char* name, int MeshIndex );
int* GetIndexPtr( char* name, int MeshIndex );
int GetNumVertices( char* name, int MeshIndex );
int GetNumIndex( char* name, int MeshIndex );
void SetOctreeVisible( int Value );
std::vector <SceneOctreeRenderable*> GetAllRenderables( void );
private:
int OctreeVisible;
Ogre::String MyName;
// Environment Variables
FogInfo Fog;
Ogre::ColourValue Ambient;
// Loads the Environment Settings
void LoadEnvironment( TiXmlElement *Element );
// Location of this Scene Object
Ogre::Vector3 Position;
SceneOctree *Octree;
//SceneTerrain *Terrain;
Ogre::SceneNode* RootNode;
Ogre::SceneManager* mSceneManager;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -