naturescenemanager.h

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

H
73
字号
/*****************************************************************************

	File: NatureSceneManager.h
	Desc: 
	Date: 2003/02/23

	Author: Martin Persson

*****************************************************************************/

#ifndef __NATURESCENEMANAGER_H
#define __NATURESCENEMANAGER_H

#include <OgreSceneManager.h>

#include "NaturePatchLoader.h"
#include "NaturePatchManager.h"

namespace Ogre
{

//----------------------------------------------------------------------------

// forward decl
class NatureIntersectionSceneQuery;

class NatureSceneManager : public SceneManager
{
    friend class NatureIntersectionSceneQuery;
public:
    NatureSceneManager();

    virtual ~NatureSceneManager();

    void setWorldGeometry(const String &filename);

    bool setOption(const String& strKey, const void *pValue);

    virtual void _renderVisibleObjects();

    virtual void _updateSceneGraph(Camera *cam); 
    IntersectionSceneQuery* createIntersectionQuery(unsigned long mask);

	void clearScene(void);

private:
    SceneNode	    *mNatureRoot;
    // Passthrough call to allow queries to access parent protected entity list
    EntityList& getEntities() { return mEntities; }

	void flushWorldGeometry(void);
    NaturePatchManager *mNaturePatchManager;
    NaturePatchLoader  *mNaturePatchLoader;
};


/** Nature's specialisation of IntersectionSceneQuery. */
class NatureIntersectionSceneQuery : 
    public DefaultIntersectionSceneQuery
{
public:
    NatureIntersectionSceneQuery(SceneManager* creator) : DefaultIntersectionSceneQuery(creator) 
    { mSupportedWorldFragments.insert(SceneQuery::WFT_RENDER_OPERATION);}
    ~NatureIntersectionSceneQuery() {}

    /** See IntersectionSceneQuery. */
    void execute(IntersectionSceneQueryListener* listener);
};
} // namespace Ogre


#endif

⌨️ 快捷键说明

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