source: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBiHeightmapTerrainPageSource.h @ 2349

Revision 2349, 2.9 KB checked in by vizrt_christian_seidl, 18 years ago (diff)

Added: BIHierarchy SceneManager?

BiTerrain? SceneManager?

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4(Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25#ifndef __BiHeightmapTerrainPageSource_H__
26#define __BiHeightmapTerrainPageSource_H__
27
28#include "OgreBiTerrainPrerequisites.h"
29#include "OgreBiTerrainPageSource.h"
30#include "OgreImage.h"
31
32namespace Ogre {
33
34    /** Specialisation of the TerrainPageSource class to provide tiles loaded
35        from a 2D greyscale image.
36    @remarks
37        This is a simple tile provider that does not support paging; it is
38        assumed that the entire heightmap is loaded as one page.
39    */
40    class _OgreBiTerrainExport BiHeightmapTerrainPageSource : public BiTerrainPageSource
41    {
42    protected:
43        /// Is this input RAW?
44        bool mIsRaw;
45        /// Should we flip terrain vertically?
46        bool mFlipTerrain;
47        /// Image containing the source heightmap if loaded from non-RAW
48        Image mImage;
49        /// Arbitrary data loaded from RAW
50        MemoryDataStreamPtr mRawData;
51        /// The (single) terrain page this source will provide
52        BiTerrainPage* mPage;
53        /// Source file name
54        String mSource;
55        /// Manual size if source is RAW
56        uint mRawSize;
57        /// Manual bpp if source is RAW
58        uchar mRawBpp;
59       
60        /// Load a heightmap
61        void loadHeightmap(void);
62    public:
63        BiHeightmapTerrainPageSource();
64        ~BiHeightmapTerrainPageSource();
65        /// @see TerrainPageSource
66        void shutdown(void);
67        /// @see TerrainPageSource
68        void requestPage(ushort x, ushort y);
69        /// @see TerrainPageSource
70        void expirePage(ushort x, ushort y);
71        /// @see TerrainPageSource
72        void initialise(BiTerrainSceneManager* tsm,
73            uint tileSize, uint pageSize, bool asyncLoading,
74            BiTerrainPageSourceOptionList& optionList);
75    };
76}
77
78#endif
Note: See TracBrowser for help on using the repository browser.