⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dotscenemanager.h

📁 使用stl技术,(还没看,是听说的)
💻 H
字号:
////////////////////////////////////////////////////////////////////////////
// DotSceneManager.h
// Author     : Doug Wolanick
// Start Date : May 27, 2003
// Copyright  : (C) 2003 by Doug Wolanick
// Email      : Doug@IceTecStudios.com
////////////////////////////////////////////////////////////////////////////

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Lesser General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef _DOT_SCENE_MANAGER_H
#define _DOT_SCENE_MANAGER_H

#include <OgreSceneManager.h>
#include "SceneMain.h"
#include "SceneOctreeRenderable.h"
#include <tinyxml.h>
#include <vector>

namespace Ogre
{

#if OGRE_PLATFORM == PLATFORM_WIN32 
#	if defined( PLUGIN_DOTSCENEMANAGER_EXPORTS )
#		define _PluginDotSceneManagerExport __declspec( dllexport )
#	else
#		define _PluginDotSceneManagerExport __declspec( dllimport )
#	endif
#else
#	define _PluginDotSceneManagerExport
#endif 

class _PluginDotSceneManagerExport DotSceneManager : public SceneManager
{
public:
    DotSceneManager( );
    virtual ~DotSceneManager( );

	void setWorldGeometry( const String& filename ){
		addWorldGeometry( filename );
	}

	// Loads the XML and Binary data files to Memory //
    virtual void addWorldGeometry( const String& filename );
	virtual void addWorldGeometry( const String& filename , const String& name, float xOffset, float zOffset );

	void removeWorldGeometry( const String& name );
	void removeAllWorldGeometry( void );

	void SetOctreeVisible( int Value );

	// Return the Geometry Data For Collision //
	int   GetNumMeshes( char* name ){
		return mSceneMain->GetNumMeshes( name );
	}

	float* GetVerticesPtr( char* name, int MeshIndex  ){ 
		return mSceneMain->GetVerticesPtr( name, MeshIndex );
	}

	int*  GetIndexPtr( char* name, int MeshIndex ){
		return mSceneMain->GetIndexPtr( name, MeshIndex );
	}

	int GetNumVertices( char* name, int MeshIndex  ){ 
		return mSceneMain->GetNumVertices( name, MeshIndex );
	}

	int GetNumIndex( char* name, int MeshIndex ){
		return mSceneMain->GetNumIndex( name, MeshIndex );
	}

    // Currently Does nothing. Can be used to Dynamicaly load and unload data. //
    virtual void _updateSceneGraph( Camera * cam );
    // Renders Visible Objects //
    virtual void _renderVisibleObjects( void );
    // Nothing Special Here //
    virtual void _findVisibleObjects ( Camera * cam );

    bool getOptionValues( const String & key, std::list < SDDataChunk> &refValueList );
    bool getOptionKeys( std::list < String > & refKeys );

	virtual void clearScene( void );

protected:

	int OctreeVisible;
	SceneMain	*mSceneMain;

	std::vector <SceneMain*> LoadedScenes;

};

}

#endif

⌨️ 快捷键说明

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