Renamed Terrain to TerrainTile

This commit is contained in:
Robert Osfield
2008-03-27 10:55:39 +00:00
parent a9d283ca73
commit 35c5bd2c92
25 changed files with 105 additions and 110 deletions

View File

@@ -17,7 +17,7 @@
#include <osg/Group>
#include <osg/CoordinateSystemNode>
#include <osgTerrain/Terrain>
#include <osgTerrain/TerrainTile>
namespace osgTerrain {
@@ -50,14 +50,8 @@ class OSGTERRAIN_EXPORT TerrainSystem : public osg::Group
virtual ~TerrainSystem();
friend class TerrainManager;
void registerPotentialMember(Terrain* terrain);
osg::ref_ptr<TerrainTechnique> _terrainTechnique;
typedef std::list< osg::observer_ptr<Terrain> > TerrainList;
TerrainList _incomingTerrain;
};

View File

@@ -23,7 +23,7 @@
namespace osgTerrain {
class Terrain;
class TerrainTile;
class OSGTERRAIN_EXPORT TerrainTechnique : public osg::Object
{
@@ -36,8 +36,8 @@ class OSGTERRAIN_EXPORT TerrainTechnique : public osg::Object
META_Object(osgTerrain, TerrainTechnique);
Terrain* getTerrain() { return _terrain; }
const Terrain* getTerrain() const { return _terrain; }
TerrainTile* getTerrainTile() { return _terrain; }
const TerrainTile* getTerrainTile() const { return _terrain; }
virtual void init();
@@ -61,9 +61,9 @@ class OSGTERRAIN_EXPORT TerrainTechnique : public osg::Object
virtual ~TerrainTechnique();
friend class osgTerrain::Terrain;
friend class osgTerrain::TerrainTile;
Terrain* _terrain;
TerrainTile* _terrain;
bool _dirty;
};

View File

@@ -11,8 +11,8 @@
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGTERRAIN_TERRAIN
#define OSGTERRAIN_TERRAIN 1
#ifndef OSGTERRAIN_TERRAINTILE
#define OSGTERRAIN_TERRAINTILE 1
#include <osg/Group>
#include <osg/CoordinateSystemNode>
@@ -56,16 +56,16 @@ class TileID
/** Terrain provides a framework for loosely coupling height field data with height rendering algorithms.
* This allows TerrainTechnique's to be plugged in at runtime.*/
class OSGTERRAIN_EXPORT Terrain : public osg::Group
class OSGTERRAIN_EXPORT TerrainTile : public osg::Group
{
public:
Terrain();
TerrainTile();
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
Terrain(const Terrain&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
TerrainTile(const TerrainTile&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Node(osgTerrain, Terrain);
META_Node(osgTerrain, TerrainTile);
virtual void traverse(osg::NodeVisitor& nv);
@@ -120,7 +120,7 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group
/** Set a color layer with specified layer number.*/
void setColorLayer(unsigned int i, osgTerrain::Layer* layer);
void setColorLayer(unsigned int i, Layer* layer);
/** Get color layer with specified layer number.*/
Layer* getColorLayer(unsigned int i) { return i<_colorLayers.size() ? _colorLayers[i].get() : 0; }
@@ -151,7 +151,7 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group
protected:
virtual ~Terrain();
virtual ~TerrainTile();
typedef std::vector< osg::ref_ptr<Layer> > Layers;

View File

@@ -14,7 +14,7 @@
#ifndef OSGTERRAIN_TILESYSTEM
#define OSGTERRAIN_TILESYSTEM 1
#include <osgTerrain/Terrain>
#include <osgTerrain/TerrainTile>
#include <osg/Object>
#include <osg/observer_ptr>
@@ -36,7 +36,7 @@ class OSGTERRAIN_EXPORT TileSystem : public osg::Object
virtual ~TileSystem();
typedef std::map< TileID, osg::observer_ptr<Terrain> > TileMap;
typedef std::map< TileID, osg::observer_ptr<TerrainTile> > TileMap;
TileMap _tileMap;
};