Renamed osgTerrain::TerrainSystem to osgTerrain::Terrain
This commit is contained in:
parent
35c5bd2c92
commit
6396a156a2
@ -38,7 +38,7 @@
|
||||
#include <osgGA/AnimationPathManipulator>
|
||||
#include <osgGA/TerrainManipulator>
|
||||
|
||||
#include <osgTerrain/TerrainSystem>
|
||||
#include <osgTerrain/Terrain>
|
||||
|
||||
#include <osgViewer/ViewerEventHandlers>
|
||||
#include <osgViewer/Viewer>
|
||||
@ -198,10 +198,10 @@ int main( int argc, char **argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
osgTerrain::TerrainSystem* terrain = findTopMostNodeOfType<osgTerrain::TerrainSystem>(rootnode);
|
||||
osgTerrain::Terrain* terrain = findTopMostNodeOfType<osgTerrain::Terrain>(rootnode);
|
||||
if (!terrain)
|
||||
{
|
||||
terrain = new osgTerrain::TerrainSystem;
|
||||
terrain = new osgTerrain::Terrain;
|
||||
terrain->addChild(rootnode);
|
||||
|
||||
rootnode = terrain;
|
||||
|
@ -11,8 +11,8 @@
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef OSGTERRAINSYSTEM
|
||||
#define OSGTERRAINSYSTEM 1
|
||||
#ifndef OSGTerrain
|
||||
#define OSGTerrain 1
|
||||
|
||||
#include <osg/Group>
|
||||
#include <osg/CoordinateSystemNode>
|
||||
@ -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> _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 <osg/Object>
|
||||
|
||||
@ -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;
|
||||
|
||||
};
|
||||
|
@ -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<Layer> > Layers;
|
||||
|
||||
|
||||
TerrainSystem* _terrainSystem;
|
||||
Terrain* _terrain;
|
||||
|
||||
bool _hasBeenTraversal;
|
||||
|
||||
|
@ -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
|
||||
|
@ -102,7 +102,7 @@ void GeometryTechnique::init()
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<"Doing GeometryTechnique::init()"<<std::endl;
|
||||
|
||||
if (!_terrain) return;
|
||||
if (!_terrainTile) return;
|
||||
|
||||
BufferData& buffer = getWriteBuffer();
|
||||
|
||||
@ -126,8 +126,8 @@ void GeometryTechnique::init()
|
||||
|
||||
Locator* GeometryTechnique::computeMasterLocator()
|
||||
{
|
||||
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;
|
||||
@ -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="<<treatBoundariesToValidDataAsDefaultValue<<std::endl;
|
||||
|
||||
float skirtHeight = 0.0f;
|
||||
@ -282,9 +282,9 @@ void GeometryTechnique::generateGeometry(Locator* masterLocator, const osg::Vec3
|
||||
typedef std::map< Layer*, TexCoordLocatorPair > 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<osgTerrain::Layer*, osg::Texture*> 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<osgUtil::UpdateVisitor*>(&nv);
|
||||
if (uv)
|
||||
@ -797,7 +797,7 @@ void GeometryTechnique::traverse(osg::NodeVisitor& nv)
|
||||
if (_dirty)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"******* Doing init ***********"<<std::endl;
|
||||
_terrain->init();
|
||||
_terrainTile->init();
|
||||
}
|
||||
|
||||
BufferData& buffer = getReadOnlyBuffer();
|
||||
|
@ -11,24 +11,24 @@
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
#include <osgTerrain/TerrainSystem>
|
||||
#include <osgTerrain/Terrain>
|
||||
|
||||
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);
|
||||
}
|
@ -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)<<className()<<"::update(..) not implementated yet"<<std::endl;
|
||||
if (_terrain) _terrain->osg::Group::traverse(*uv);
|
||||
if (_terrainTile) _terrainTile->osg::Group::traverse(*uv);
|
||||
}
|
||||
|
||||
void TerrainTechnique::cull(osgUtil::CullVisitor* cv)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<className()<<"::cull(..) not implementated yet"<<std::endl;
|
||||
if (_terrain) _terrain->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<osgUtil::UpdateVisitor*>(&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);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <osgTerrain/TerrainTile>
|
||||
#include <osgTerrain/TerrainSystem>
|
||||
#include <osgTerrain/Terrain>
|
||||
|
||||
#include <osg/ClusterCullingCallback>
|
||||
|
||||
@ -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<TerrainSystem*>(*itr);
|
||||
osgTerrain::Terrain* ts = dynamic_cast<Terrain*>(*itr);
|
||||
if (ts)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Assigning terrain system "<<ts<<std::endl;
|
||||
_terrainSystem = ts;
|
||||
_terrain = ts;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -104,11 +104,11 @@ void TerrainTile::setTerrainTechnique(TerrainTechnique* terrainTechnique)
|
||||
{
|
||||
if (_terrainTechnique == terrainTechnique) return;
|
||||
|
||||
if (_terrainTechnique.valid()) _terrainTechnique->_terrain = 0;
|
||||
if (_terrainTechnique.valid()) _terrainTechnique->_terrainTile = 0;
|
||||
|
||||
_terrainTechnique = terrainTechnique;
|
||||
|
||||
if (_terrainTechnique.valid()) _terrainTechnique->_terrain = this;
|
||||
if (_terrainTechnique.valid()) _terrainTechnique->_terrainTile = this;
|
||||
|
||||
}
|
||||
|
||||
|
@ -10,13 +10,9 @@
|
||||
#include <osgIntrospection/StaticMethodInfo>
|
||||
#include <osgIntrospection/Attributes>
|
||||
|
||||
#include <osg/BoundingSphere>
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Object>
|
||||
#include <osg/OperationThread>
|
||||
#include <osgTerrain/Layer>
|
||||
#include <osgTerrain/Locator>
|
||||
#include <osgTerrain/Terrain>
|
||||
#include <osgTerrain/TerrainTechnique>
|
||||
|
||||
@ -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
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Object>
|
||||
#include <osgTerrain/Terrain>
|
||||
#include <osgTerrain/TerrainTechnique>
|
||||
#include <osgTerrain/TerrainTile>
|
||||
#include <osgUtil/CullVisitor>
|
||||
#include <osgUtil/UpdateVisitor>
|
||||
|
||||
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user