# OgreTerrainPagedWorldSection.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004 (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2009 Torus Knot Software Ltd
    00008
    00009 Permission is hereby granted, free of charge, to any person obtaining a copy
    00010 of this software and associated documentation files (the "Software"), to deal
    00011 in the Software without restriction, including without limitation the rights
    00012 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    00013 copies of the Software, and to permit persons to whom the Software is
    00014 furnished to do so, subject to the following conditions:
    00015
    00016 The above copyright notice and this permission notice shall be included in
    00017 all copies or substantial portions of the Software.
    00018
    00019 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    00020 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00021 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    00022 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00023 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    00024 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    00025 THE SOFTWARE.
    00026 -----------------------------------------------------------------------------
    00027 */
    00028
    00029 #ifndef __Ogre_TerrainPagedWorldSection_H__
    00030 #define __Ogre_TerrainPagedWorldSection_H__
    00031
    00032 #include "OgreTerrainPrerequisites.h"
    00033 #include "OgrePagedWorldSection.h"
    00034 #include "OgrePageManager.h"
    00035
    00036
    00037
    00038 namespace Ogre
    00039 {
    00040     class Grid2DPageStrategy;
    00041     class Grid2DPageStrategyData;
    00042     class TerrainGroup;
    00043
    00080     class _OgreTerrainExport TerrainPagedWorldSection : public PagedWorldSection
    00081     {
    00082     public:
    00088         TerrainPagedWorldSection(const String& name, PagedWorld* parent, SceneManager* sm);
    00089         ~TerrainPagedWorldSection();
    00090
    00100         virtual void init(TerrainGroup* grp);
    00101
    00107         virtual TerrainGroup* getTerrainGroup() { return mTerrainGroup; }
    00108
    00110         virtual void setLoadRadius(Real sz);
    00112         virtual Real getLoadRadius() const;
    00114         virtual void setHoldRadius(Real sz);
    00116         virtual Real getHoldRadius();
    00118         virtual void setPageRange(int32 minX, int32 minY, int32 maxX, int32 maxY);
    00120         virtual void setPageRangeMinX(int32 minX);
    00122         virtual void setPageRangeMinY(int32 minY);
    00124         virtual void setPageRangeMaxX(int32 maxX);
    00126         virtual void setPageRangeMaxY(int32 maxY);
    00128         virtual int32 getPageRangeMinX() const;
    00130         virtual int32 getPageRangeMinY() const;
    00132         virtual int32 getPageRangeMaxX() const;
    00134         virtual int32 getPageRangeMaxY() const;
    00135
    00137         virtual Grid2DPageStrategy* getGridStrategy() const;
    00139         virtual Grid2DPageStrategyData* getGridStrategyData() const;
    00140
    00142         void loadPage(PageID pageID, bool forceSynchronous = false);
    00144         void unloadPage(PageID pageID, bool forceSynchronous = false);
    00145
    00146     protected:
    00147         TerrainGroup* mTerrainGroup;
    00148
    00150         void loadSubtypeData(StreamSerialiser& ser);
    00151         void saveSubtypeData(StreamSerialiser& ser);
    00152
    00153         virtual void syncSettings();
    00154
    00155     };
    00156
    00157
    00158
    00159
    00160
    00163 }
    00164
    00165 #endif

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun May 8 2011 20:28:09