From 6396a156a2d7826fd6cc541b08d76af22e942db7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 27 Mar 2008 11:55:03 +0000 Subject: [PATCH] Renamed osgTerrain::TerrainSystem to osgTerrain::Terrain --- .../osgmultitexturecontrol.cpp | 6 +- include/osgTerrain/{TerrainSystem => Terrain} | 18 +-- include/osgTerrain/TerrainTechnique | 10 +- include/osgTerrain/TerrainTile | 16 +-- src/osgTerrain/CMakeLists.txt | 4 +- src/osgTerrain/GeometryTechnique.cpp | 36 ++--- .../{TerrainSystem.cpp => Terrain.cpp} | 10 +- src/osgTerrain/TerrainTechnique.cpp | 16 +-- src/osgTerrain/TerrainTile.cpp | 18 +-- src/osgWrappers/osgTerrain/Terrain.cpp | 126 +----------------- .../osgTerrain/TerrainTechnique.cpp | 14 +- src/osgWrappers/osgTerrain/TileSystem.cpp | 37 ----- 12 files changed, 75 insertions(+), 236 deletions(-) rename include/osgTerrain/{TerrainSystem => Terrain} (76%) rename src/osgTerrain/{TerrainSystem.cpp => Terrain.cpp} (75%) diff --git a/examples/osgmultitexturecontrol/osgmultitexturecontrol.cpp b/examples/osgmultitexturecontrol/osgmultitexturecontrol.cpp index 049dca698..28f704063 100644 --- a/examples/osgmultitexturecontrol/osgmultitexturecontrol.cpp +++ b/examples/osgmultitexturecontrol/osgmultitexturecontrol.cpp @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include @@ -198,10 +198,10 @@ int main( int argc, char **argv ) return 1; } - osgTerrain::TerrainSystem* terrain = findTopMostNodeOfType(rootnode); + osgTerrain::Terrain* terrain = findTopMostNodeOfType(rootnode); if (!terrain) { - terrain = new osgTerrain::TerrainSystem; + terrain = new osgTerrain::Terrain; terrain->addChild(rootnode); rootnode = terrain; diff --git a/include/osgTerrain/TerrainSystem b/include/osgTerrain/Terrain similarity index 76% rename from include/osgTerrain/TerrainSystem rename to include/osgTerrain/Terrain index f842a832e..56a0af512 100644 --- a/include/osgTerrain/TerrainSystem +++ b/include/osgTerrain/Terrain @@ -11,8 +11,8 @@ * OpenSceneGraph Public License for more details. */ -#ifndef OSGTERRAINSYSTEM -#define OSGTERRAINSYSTEM 1 +#ifndef OSGTerrain +#define OSGTerrain 1 #include #include @@ -21,23 +21,23 @@ namespace osgTerrain { -/** TerrainSystem provides a framework for loosely coupling height field data with height rendering algorithms. +/** 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 TerrainSystem : public osg::Group +class OSGTERRAIN_EXPORT Terrain : public osg::Group { public: - TerrainSystem(); + Terrain(); /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - TerrainSystem(const TerrainSystem&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); + Terrain(const Terrain&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - META_Node(osgTerrain, TerrainSystem); + META_Node(osgTerrain, Terrain); virtual void traverse(osg::NodeVisitor& nv); - /** Set the TerrainTechnique that is used as the prototype for all Terrain below the TerrainSystem. */ + /** Set the TerrainTechnique that is used as the prototype for all Terrain below the Terrain. */ void setTerrainTechnique(osgTerrain::TerrainTechnique* TerrainTechnique); /** Get the TerrainTechnique*/ @@ -48,7 +48,7 @@ class OSGTERRAIN_EXPORT TerrainSystem : public osg::Group protected: - virtual ~TerrainSystem(); + virtual ~Terrain(); osg::ref_ptr _terrainTechnique; diff --git a/include/osgTerrain/TerrainTechnique b/include/osgTerrain/TerrainTechnique index 3eded6df1..239443934 100644 --- a/include/osgTerrain/TerrainTechnique +++ b/include/osgTerrain/TerrainTechnique @@ -11,8 +11,8 @@ * OpenSceneGraph Public License for more details. */ -#ifndef OSGTERRAIN_terrainTECHNIQUE -#define OSGTERRAIN_terrainTECHNIQUE 1 +#ifndef OSGTERRAIN_terrainTileTECHNIQUE +#define OSGTERRAIN_terrainTileTECHNIQUE 1 #include @@ -36,8 +36,8 @@ class OSGTERRAIN_EXPORT TerrainTechnique : public osg::Object META_Object(osgTerrain, TerrainTechnique); - TerrainTile* getTerrainTile() { return _terrain; } - const TerrainTile* getTerrainTile() const { return _terrain; } + TerrainTile* getTerrainTile() { return _terrainTile; } + const TerrainTile* getTerrainTile() const { return _terrainTile; } virtual void init(); @@ -63,7 +63,7 @@ class OSGTERRAIN_EXPORT TerrainTechnique : public osg::Object friend class osgTerrain::TerrainTile; - TerrainTile* _terrain; + TerrainTile* _terrainTile; bool _dirty; }; diff --git a/include/osgTerrain/TerrainTile b/include/osgTerrain/TerrainTile index 4177754a2..1fd9f093d 100644 --- a/include/osgTerrain/TerrainTile +++ b/include/osgTerrain/TerrainTile @@ -23,7 +23,7 @@ namespace osgTerrain { -class TerrainSystem; +class Terrain; class TileID { @@ -73,14 +73,14 @@ class OSGTERRAIN_EXPORT TerrainTile : public osg::Group void init(); - /** Set the TerrainSystem that this Terrain tile is a member of.*/ - void setTerrainSystem(TerrainSystem* ts) { _terrainSystem = ts; } + /** Set the Terrain that this Terrain tile is a member of.*/ + void setTerrain(Terrain* ts) { _terrain = ts; } - /** Get the TerrainSystem that this Terrain tile is a member of.*/ - TerrainSystem* getTerrainSystem() { return _terrainSystem; } + /** Get the Terrain that this Terrain tile is a member of.*/ + Terrain* getTerrain() { return _terrain; } - /** Get the const TerrainSystem that this Terrain tile is a member of.*/ - const TerrainSystem* getTerrainSystem() const { return _terrainSystem; } + /** Get the const Terrain that this Terrain tile is a member of.*/ + const Terrain* getTerrain() const { return _terrain; } void setTileID(const TileID& tileID) { _tileID = tileID; } @@ -156,7 +156,7 @@ class OSGTERRAIN_EXPORT TerrainTile : public osg::Group typedef std::vector< osg::ref_ptr > Layers; - TerrainSystem* _terrainSystem; + Terrain* _terrain; bool _hasBeenTraversal; diff --git a/src/osgTerrain/CMakeLists.txt b/src/osgTerrain/CMakeLists.txt index ab1764078..098d3e99a 100644 --- a/src/osgTerrain/CMakeLists.txt +++ b/src/osgTerrain/CMakeLists.txt @@ -12,7 +12,7 @@ SET(LIB_PUBLIC_HEADERS ${HEADER_PATH}/Layer ${HEADER_PATH}/TerrainTile ${HEADER_PATH}/TerrainTechnique - ${HEADER_PATH}/TerrainSystem + ${HEADER_PATH}/Terrain ${HEADER_PATH}/TileSystem ${HEADER_PATH}/GeometryTechnique ${HEADER_PATH}/ValidDataOperator @@ -27,7 +27,7 @@ ADD_LIBRARY(${LIB_NAME} Locator.cpp TerrainTile.cpp TerrainTechnique.cpp - TerrainSystem.cpp + Terrain.cpp TileSystem.cpp GeometryTechnique.cpp Version.cpp diff --git a/src/osgTerrain/GeometryTechnique.cpp b/src/osgTerrain/GeometryTechnique.cpp index 4706a3e32..2a9284ca1 100644 --- a/src/osgTerrain/GeometryTechnique.cpp +++ b/src/osgTerrain/GeometryTechnique.cpp @@ -102,7 +102,7 @@ void GeometryTechnique::init() { // osg::notify(osg::NOTICE)<<"Doing GeometryTechnique::init()"<getElevationLayer(); - osgTerrain::Layer* colorLayer = _terrain->getColorLayer(0); + osgTerrain::Layer* elevationLayer = _terrainTile->getElevationLayer(); + osgTerrain::Layer* colorLayer = _terrainTile->getColorLayer(0); Locator* elevationLocator = elevationLayer ? elevationLayer->getLocator() : 0; Locator* colorLocator = colorLayer ? colorLayer->getLocator() : 0; @@ -148,8 +148,8 @@ osg::Vec3d GeometryTechnique::computeCenterModel(Locator* masterLocator) BufferData& buffer = getWriteBuffer(); - osgTerrain::Layer* elevationLayer = _terrain->getElevationLayer(); - osgTerrain::Layer* colorLayer = _terrain->getColorLayer(0); + osgTerrain::Layer* elevationLayer = _terrainTile->getElevationLayer(); + osgTerrain::Layer* colorLayer = _terrainTile->getColorLayer(0); Locator* elevationLocator = elevationLayer ? elevationLayer->getLocator() : 0; Locator* colorLocator = colorLayer ? colorLayer->getLocator() : 0; @@ -208,7 +208,7 @@ void GeometryTechnique::generateGeometry(Locator* masterLocator, const osg::Vec3 { BufferData& buffer = getWriteBuffer(); - osgTerrain::Layer* elevationLayer = _terrain->getElevationLayer(); + osgTerrain::Layer* elevationLayer = _terrainTile->getElevationLayer(); buffer._geode = new osg::Geode; if(buffer._transform.valid()) @@ -246,7 +246,7 @@ void GeometryTechnique::generateGeometry(Locator* masterLocator, const osg::Vec3 } - bool treatBoundariesToValidDataAsDefaultValue = _terrain->getTreatBoundariesToValidDataAsDefaultValue(); + bool treatBoundariesToValidDataAsDefaultValue = _terrainTile->getTreatBoundariesToValidDataAsDefaultValue(); osg::notify(osg::INFO)<<"TreatBoundariesToValidDataAsDefaultValue="< LayerToTexCoordMap; LayerToTexCoordMap layerToTexCoordMap; - for(unsigned int layerNum=0; layerNum<_terrain->getNumColorLayers(); ++layerNum) + for(unsigned int layerNum=0; layerNum<_terrainTile->getNumColorLayers(); ++layerNum) { - osgTerrain::Layer* colorLayer = _terrain->getColorLayer(layerNum); + osgTerrain::Layer* colorLayer = _terrainTile->getColorLayer(layerNum); if (colorLayer) { LayerToTexCoordMap::iterator itr = layerToTexCoordMap.find(colorLayer); @@ -650,9 +650,9 @@ void GeometryTechnique::applyColorLayers() typedef std::map LayerToTextureMap; LayerToTextureMap layerToTextureMap; - for(unsigned int layerNum=0; layerNum<_terrain->getNumColorLayers(); ++layerNum) + for(unsigned int layerNum=0; layerNum<_terrainTile->getNumColorLayers(); ++layerNum) { - osgTerrain::Layer* colorLayer = _terrain->getColorLayer(layerNum); + osgTerrain::Layer* colorLayer = _terrainTile->getColorLayer(layerNum); if (!colorLayer) continue; osg::Image* image = colorLayer->getImage(); @@ -715,9 +715,9 @@ void GeometryTechnique::applyTransparency() BufferData& buffer = getWriteBuffer(); bool containsTransparency = false; - for(unsigned int i=0; i<_terrain->getNumColorLayers(); ++i) + for(unsigned int i=0; i<_terrainTile->getNumColorLayers(); ++i) { - osg::Image* image = _terrain->getColorLayer(i)->getImage(); + osg::Image* image = _terrainTile->getColorLayer(i)->getImage(); if (image) { containsTransparency = image->isImageTranslucent(); @@ -747,7 +747,7 @@ void GeometryTechnique::smoothGeometry() void GeometryTechnique::update(osgUtil::UpdateVisitor* uv) { - if (_terrain) _terrain->osg::Group::traverse(*uv); + if (_terrainTile) _terrainTile->osg::Group::traverse(*uv); } @@ -756,7 +756,7 @@ void GeometryTechnique::cull(osgUtil::CullVisitor* cv) BufferData& buffer = getReadOnlyBuffer(); #if 0 - if (buffer._terrain) buffer._terrain->osg::Group::traverse(*cv); + if (buffer._terrainTile) buffer._terrainTile->osg::Group::traverse(*cv); #else if (buffer._transform.valid()) { @@ -768,12 +768,12 @@ void GeometryTechnique::cull(osgUtil::CullVisitor* cv) void GeometryTechnique::traverse(osg::NodeVisitor& nv) { - if (!_terrain) return; + if (!_terrainTile) return; // if app traversal update the frame count. if (nv.getVisitorType()==osg::NodeVisitor::UPDATE_VISITOR) { - if (_dirty) _terrain->init(); + if (_dirty) _terrainTile->init(); osgUtil::UpdateVisitor* uv = dynamic_cast(&nv); if (uv) @@ -797,7 +797,7 @@ void GeometryTechnique::traverse(osg::NodeVisitor& nv) if (_dirty) { osg::notify(osg::INFO)<<"******* Doing init ***********"<init(); + _terrainTile->init(); } BufferData& buffer = getReadOnlyBuffer(); diff --git a/src/osgTerrain/TerrainSystem.cpp b/src/osgTerrain/Terrain.cpp similarity index 75% rename from src/osgTerrain/TerrainSystem.cpp rename to src/osgTerrain/Terrain.cpp index 536318c04..6c66a5390 100644 --- a/src/osgTerrain/TerrainSystem.cpp +++ b/src/osgTerrain/Terrain.cpp @@ -11,24 +11,24 @@ * OpenSceneGraph Public License for more details. */ -#include +#include using namespace osg; using namespace osgTerrain; -TerrainSystem::TerrainSystem() +Terrain::Terrain() { } -TerrainSystem::~TerrainSystem() +Terrain::~Terrain() { } -TerrainSystem::TerrainSystem(const TerrainSystem& ts, const osg::CopyOp& copyop) +Terrain::Terrain(const Terrain& ts, const osg::CopyOp& copyop) { } -void TerrainSystem::traverse(osg::NodeVisitor& nv) +void Terrain::traverse(osg::NodeVisitor& nv) { Group::traverse(nv); } diff --git a/src/osgTerrain/TerrainTechnique.cpp b/src/osgTerrain/TerrainTechnique.cpp index 38387e956..fd4768bb2 100644 --- a/src/osgTerrain/TerrainTechnique.cpp +++ b/src/osgTerrain/TerrainTechnique.cpp @@ -17,7 +17,7 @@ using namespace osgTerrain; TerrainTechnique::TerrainTechnique(): - _terrain(0), + _terrainTile(0), _dirty(true) { setThreadSafeRefUnref(true); @@ -25,7 +25,7 @@ TerrainTechnique::TerrainTechnique(): TerrainTechnique::TerrainTechnique(const TerrainTechnique& TerrainTechnique,const osg::CopyOp& copyop): osg::Object(TerrainTechnique,copyop), - _terrain(0), + _terrainTile(0), _dirty(true) { } @@ -44,13 +44,13 @@ void TerrainTechnique::init() void TerrainTechnique::update(osgUtil::UpdateVisitor* uv) { osg::notify(osg::NOTICE)<osg::Group::traverse(*uv); + if (_terrainTile) _terrainTile->osg::Group::traverse(*uv); } void TerrainTechnique::cull(osgUtil::CullVisitor* cv) { osg::notify(osg::NOTICE)<osg::Group::traverse(*cv); + if (_terrainTile) _terrainTile->osg::Group::traverse(*cv); } void TerrainTechnique::cleanSceneGraph() @@ -66,12 +66,12 @@ void TerrainTechnique::dirty() void TerrainTechnique::traverse(osg::NodeVisitor& nv) { - if (!_terrain) return; + if (!_terrainTile) return; // if app traversal update the frame count. if (nv.getVisitorType()==osg::NodeVisitor::UPDATE_VISITOR) { - if (_dirty) _terrain->init(); + if (_dirty) _terrainTile->init(); osgUtil::UpdateVisitor* uv = dynamic_cast(&nv); if (uv) @@ -91,8 +91,8 @@ void TerrainTechnique::traverse(osg::NodeVisitor& nv) } } - if (_dirty) _terrain->init(); + if (_dirty) _terrainTile->init(); // otherwise fallback to the Group::traverse() - _terrain->osg::Group::traverse(nv); + _terrainTile->osg::Group::traverse(nv); } diff --git a/src/osgTerrain/TerrainTile.cpp b/src/osgTerrain/TerrainTile.cpp index 9cf1943cf..fbfd2c853 100644 --- a/src/osgTerrain/TerrainTile.cpp +++ b/src/osgTerrain/TerrainTile.cpp @@ -12,7 +12,7 @@ */ #include -#include +#include #include @@ -20,7 +20,7 @@ using namespace osg; using namespace osgTerrain; TerrainTile::TerrainTile(): - _terrainSystem(0), + _terrain(0), _hasBeenTraversal(false), _requiresNormals(true), _treatBoundariesToValidDataAsDefaultValue(false) @@ -31,7 +31,7 @@ TerrainTile::TerrainTile(): TerrainTile::TerrainTile(const TerrainTile& terrain,const osg::CopyOp& copyop): Group(terrain,copyop), - _terrainSystem(0), + _terrain(0), _hasBeenTraversal(false), _elevationLayer(terrain._elevationLayer), _colorLayers(terrain._colorLayers), @@ -51,20 +51,20 @@ void TerrainTile::traverse(osg::NodeVisitor& nv) { if (!_hasBeenTraversal) { - if (!_terrainSystem) + if (!_terrain) { osg::NodePath& nodePath = nv.getNodePath(); if (!nodePath.empty()) { for(osg::NodePath::reverse_iterator itr = nodePath.rbegin(); - itr != nodePath.rend() && !_terrainSystem; + itr != nodePath.rend() && !_terrain; ++itr) { - osgTerrain::TerrainSystem* ts = dynamic_cast(*itr); + osgTerrain::Terrain* ts = dynamic_cast(*itr); if (ts) { osg::notify(osg::INFO)<<"Assigning terrain system "<_terrain = 0; + if (_terrainTechnique.valid()) _terrainTechnique->_terrainTile = 0; _terrainTechnique = terrainTechnique; - if (_terrainTechnique.valid()) _terrainTechnique->_terrain = this; + if (_terrainTechnique.valid()) _terrainTechnique->_terrainTile = this; } diff --git a/src/osgWrappers/osgTerrain/Terrain.cpp b/src/osgWrappers/osgTerrain/Terrain.cpp index e63ec6526..280992f80 100644 --- a/src/osgWrappers/osgTerrain/Terrain.cpp +++ b/src/osgWrappers/osgTerrain/Terrain.cpp @@ -10,13 +10,9 @@ #include #include -#include #include #include #include -#include -#include -#include #include #include @@ -73,15 +69,10 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::Terrain) __void__traverse__osg_NodeVisitor_R1, "Traverse downwards : calls children's accept method with NodeVisitor. ", ""); - I_Method0(void, init, - Properties::NON_VIRTUAL, - __void__init, - "Call init on any attached TerrainTechnique. ", - ""); I_Method1(void, setTerrainTechnique, IN, osgTerrain::TerrainTechnique *, TerrainTechnique, Properties::NON_VIRTUAL, __void__setTerrainTechnique__osgTerrain_TerrainTechnique_P1, - "Set the TerrainTechnique. ", + "Set the TerrainTechnique that is used as the prototype for all Terrain below the Terrain. ", ""); I_Method0(osgTerrain::TerrainTechnique *, getTerrainTechnique, Properties::NON_VIRTUAL, @@ -93,123 +84,8 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::Terrain) __C5_TerrainTechnique_P1__getTerrainTechnique, "Get the const TerrainTechnique. ", ""); - I_Method1(void, setLocator, IN, osgTerrain::Locator *, locator, - Properties::NON_VIRTUAL, - __void__setLocator__Locator_P1, - "Set the coordinate frame locator of the terrain node. ", - "The locator takes non-dimensional s,t coordinates into the X,Y,Z world coords and back. "); - I_Method0(osgTerrain::Locator *, getLocator, - Properties::NON_VIRTUAL, - __Locator_P1__getLocator, - "Get the coordinate frame locator of the terrain node. ", - ""); - I_Method0(const osgTerrain::Locator *, getLocator, - Properties::NON_VIRTUAL, - __C5_Locator_P1__getLocator, - "Get the coordinate frame locator of the terrain node. ", - ""); - I_Method1(void, setElevationLayer, IN, osgTerrain::Layer *, layer, - Properties::NON_VIRTUAL, - __void__setElevationLayer__Layer_P1, - "Set the layer to use to define the elevations of the terrain. ", - ""); - I_Method0(osgTerrain::Layer *, getElevationLayer, - Properties::NON_VIRTUAL, - __Layer_P1__getElevationLayer, - "Get the layer to use to define the elevations of the terrain. ", - ""); - I_Method0(const osgTerrain::Layer *, getElevationLayer, - Properties::NON_VIRTUAL, - __C5_Layer_P1__getElevationLayer, - "Get the const layer to use to define the elevations of the terrain. ", - ""); - I_Method2(void, setColorLayer, IN, unsigned int, i, IN, osgTerrain::Layer *, layer, - Properties::NON_VIRTUAL, - __void__setColorLayer__unsigned_int__osgTerrain_Layer_P1, - "Set a color layer with specified layer number. ", - ""); - I_Method1(osgTerrain::Layer *, getColorLayer, IN, unsigned int, i, - Properties::NON_VIRTUAL, - __Layer_P1__getColorLayer__unsigned_int, - "Get color layer with specified layer number. ", - ""); - I_Method1(const osgTerrain::Layer *, getColorLayer, IN, unsigned int, i, - Properties::NON_VIRTUAL, - __C5_Layer_P1__getColorLayer__unsigned_int, - "Set const color layer with specified layer number. ", - ""); - I_Method0(unsigned int, getNumColorLayers, - Properties::NON_VIRTUAL, - __unsigned_int__getNumColorLayers, - "Get the number of colour layers. ", - ""); - I_Method1(void, setRequiresNormals, IN, bool, flag, - Properties::NON_VIRTUAL, - __void__setRequiresNormals__bool, - "Set hint to whether the TerrainTechnique should create per vertex normals for lighting purposes. ", - ""); - I_Method0(bool, getRequiresNormals, - Properties::NON_VIRTUAL, - __bool__getRequiresNormals, - "Get whether the TerrainTechnique should create per vertex normals for lighting purposes. ", - ""); - I_Method1(void, setTreatBoundariesToValidDataAsDefaultValue, IN, bool, flag, - Properties::NON_VIRTUAL, - __void__setTreatBoundariesToValidDataAsDefaultValue__bool, - "Set the hint to whether the TerrainTechnique should treat the invalid Layer entries that at are neigbours to valid entries with the default value. ", - ""); - I_Method0(bool, getTreatBoundariesToValidDataAsDefaultValue, - Properties::NON_VIRTUAL, - __bool__getTreatBoundariesToValidDataAsDefaultValue, - "Get whether the TeatBoundariesToValidDataAsDefaultValue hint. ", - ""); - I_Method1(void, setOperationQueue, IN, osg::OperationQueue *, operations, - Properties::NON_VIRTUAL, - __void__setOperationQueue__osg_OperationQueue_P1, - "Set an OperationQueue to do an data initialization and update work. ", - ""); - I_Method0(osg::OperationQueue *, getOperationQueue, - Properties::NON_VIRTUAL, - __osg_OperationQueue_P1__getOperationQueue, - "Get the OperationsQueue if one is attached, return NULL otherwise. ", - ""); - I_Method0(const osg::OperationQueue *, getOperationsQueue, - Properties::NON_VIRTUAL, - __C5_osg_OperationQueue_P1__getOperationsQueue, - "Get the const OperationsQueue if one is attached, return NULL otherwise. ", - ""); - I_Method0(osg::BoundingSphere, computeBound, - Properties::VIRTUAL, - __osg_BoundingSphere__computeBound, - "Compute the bounding volume of the terrain by computing the union of the bounding volumes of all layers. ", - ""); - I_ArrayProperty(osgTerrain::Layer *, ColorLayer, - __Layer_P1__getColorLayer__unsigned_int, - __void__setColorLayer__unsigned_int__osgTerrain_Layer_P1, - __unsigned_int__getNumColorLayers, - 0, - 0, - 0); - I_SimpleProperty(osgTerrain::Layer *, ElevationLayer, - __Layer_P1__getElevationLayer, - __void__setElevationLayer__Layer_P1); - I_SimpleProperty(osgTerrain::Locator *, Locator, - __Locator_P1__getLocator, - __void__setLocator__Locator_P1); - I_SimpleProperty(osg::OperationQueue *, OperationQueue, - __osg_OperationQueue_P1__getOperationQueue, - __void__setOperationQueue__osg_OperationQueue_P1); - I_SimpleProperty(const osg::OperationQueue *, OperationsQueue, - __C5_osg_OperationQueue_P1__getOperationsQueue, - 0); - I_SimpleProperty(bool, RequiresNormals, - __bool__getRequiresNormals, - __void__setRequiresNormals__bool); I_SimpleProperty(osgTerrain::TerrainTechnique *, TerrainTechnique, __TerrainTechnique_P1__getTerrainTechnique, __void__setTerrainTechnique__osgTerrain_TerrainTechnique_P1); - I_SimpleProperty(bool, TreatBoundariesToValidDataAsDefaultValue, - __bool__getTreatBoundariesToValidDataAsDefaultValue, - __void__setTreatBoundariesToValidDataAsDefaultValue__bool); END_REFLECTOR diff --git a/src/osgWrappers/osgTerrain/TerrainTechnique.cpp b/src/osgWrappers/osgTerrain/TerrainTechnique.cpp index 1c60801d9..28398d9f8 100644 --- a/src/osgWrappers/osgTerrain/TerrainTechnique.cpp +++ b/src/osgWrappers/osgTerrain/TerrainTechnique.cpp @@ -13,8 +13,8 @@ #include #include #include -#include #include +#include #include #include @@ -61,14 +61,14 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainTechnique) __C5_char_P1__className, "return the name of the object's class type. ", "Must be defined by derived classes. "); - I_Method0(osgTerrain::Terrain *, getTerrain, + I_Method0(osgTerrain::TerrainTile *, getTerrainTile, Properties::NON_VIRTUAL, - __Terrain_P1__getTerrain, + __TerrainTile_P1__getTerrainTile, "", ""); - I_Method0(const osgTerrain::Terrain *, getTerrain, + I_Method0(const osgTerrain::TerrainTile *, getTerrainTile, Properties::NON_VIRTUAL, - __C5_Terrain_P1__getTerrain, + __C5_TerrainTile_P1__getTerrainTile, "", ""); I_Method0(void, init, @@ -106,8 +106,8 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainTechnique) __bool__isDirty, "Return true if cached data structures need updating. ", ""); - I_SimpleProperty(osgTerrain::Terrain *, Terrain, - __Terrain_P1__getTerrain, + I_SimpleProperty(osgTerrain::TerrainTile *, TerrainTile, + __TerrainTile_P1__getTerrainTile, 0); END_REFLECTOR diff --git a/src/osgWrappers/osgTerrain/TileSystem.cpp b/src/osgWrappers/osgTerrain/TileSystem.cpp index f47636608..a908ded7e 100644 --- a/src/osgWrappers/osgTerrain/TileSystem.cpp +++ b/src/osgWrappers/osgTerrain/TileSystem.cpp @@ -22,43 +22,6 @@ #undef OUT #endif -BEGIN_OBJECT_REFLECTOR(osgTerrain::TileID) - I_DeclaringFile("osgTerrain/TileSystem"); - I_BaseType(osg::Object); - I_Constructor0(____TileID, - "", - ""); - I_ConstructorWithDefaults2(IN, const osgTerrain::TileID &, x, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, - ____TileID__C5_TileID_R1__C5_osg_CopyOp_R1, - "", - ""); - I_Method0(osg::Object *, cloneType, - Properties::VIRTUAL, - __osg_Object_P1__cloneType, - "Clone the type of an object, with Object* return type. ", - "Must be defined by derived classes. "); - I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop, - Properties::VIRTUAL, - __osg_Object_P1__clone__C5_osg_CopyOp_R1, - "Clone an object, with Object* return type. ", - "Must be defined by derived classes. "); - I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj, - Properties::VIRTUAL, - __bool__isSameKindAs__C5_osg_Object_P1, - "", - ""); - I_Method0(const char *, libraryName, - Properties::VIRTUAL, - __C5_char_P1__libraryName, - "return the name of the object's library. ", - "Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. "); - I_Method0(const char *, className, - Properties::VIRTUAL, - __C5_char_P1__className, - "return the name of the object's class type. ", - "Must be defined by derived classes. "); -END_REFLECTOR - BEGIN_OBJECT_REFLECTOR(osgTerrain::TileSystem) I_DeclaringFile("osgTerrain/TileSystem"); I_BaseType(osg::Object);