From adb7a49c10c86cece3805df16aa98580fbe8a0d3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 20 Dec 2008 20:55:21 +0000 Subject: [PATCH] Renamed osgVolume::Brick to osgVolume::VolumeTile --- include/osgVolume/Volume | 31 ++++---- include/osgVolume/VolumeTechnique | 10 +-- include/osgVolume/{Brick => VolumeTile} | 56 +++++++------- src/osgPlugins/dicom/CMakeLists.txt | 2 +- src/osgPlugins/dicom/ReaderWriterDICOM.cpp | 14 ++-- src/osgVolume/CMakeLists.txt | 6 +- src/osgVolume/Volume.cpp | 58 +++++++-------- src/osgVolume/VolumeTechnique.cpp | 18 ++--- src/osgVolume/{Brick.cpp => VolumeTile.cpp} | 42 +++++------ src/osgWrappers/osgVolume/Volume.cpp | 26 +++---- src/osgWrappers/osgVolume/VolumeTechnique.cpp | 14 ++-- .../osgVolume/{Brick.cpp => VolumeTile.cpp} | 74 +++++++++---------- 12 files changed, 177 insertions(+), 174 deletions(-) rename include/osgVolume/{Brick => VolumeTile} (73%) rename src/osgVolume/{Brick.cpp => VolumeTile.cpp} (76%) rename src/osgWrappers/osgVolume/{Brick.cpp => VolumeTile.cpp} (84%) diff --git a/include/osgVolume/Volume b/include/osgVolume/Volume index da96294c1..6d3d9432e 100644 --- a/include/osgVolume/Volume +++ b/include/osgVolume/Volume @@ -17,11 +17,11 @@ #include #include -#include +#include namespace osgVolume { -/** Volume provides a framework for loosely coupling 3d image Brick's with volume algorithms. +/** Volume provides a framework for loosely coupling 3d image VolumeTile's with volume algorithms. * This allows VolumeTechnique's to be plugged in at runtime.*/ class OSGVOLUME_EXPORT Volume : public osg::Group { @@ -36,30 +36,29 @@ class OSGVOLUME_EXPORT Volume : public osg::Group virtual void traverse(osg::NodeVisitor& nv); - /** Get the Brick for a given BrickID.*/ - Brick* getBrick(const BrickID& brickID); + /** Get the VolumeTile for a given VolumeTileID.*/ + VolumeTile* getVolumeTile(const TileID& tileID); - /** Get the const Brick for a given BrickID.*/ - const Brick* getBrick(const BrickID& brickID) const; + /** Get the const VolumeTile for a given VolumeTileID.*/ + const VolumeTile* getVolumeTile(const TileID& tileID) const; protected: virtual ~Volume(); - friend class Brick; + friend class VolumeTile; - void dirtyRegisteredBricks(); + void dirtyRegisteredVolumeTiles(); - void registerBrick(Brick* tile); - void unregisterBrick(Brick* tile); + void registerVolumeTile(VolumeTile* tile); + void unregisterVolumeTile(VolumeTile* tile); - typedef std::map< BrickID, Brick* > BrickMap; - typedef std::set< Brick* > BrickSet; - - mutable OpenThreads::Mutex _mutex; - BrickSet _brickSet; - BrickMap _brickMap; + typedef std::map< TileID, VolumeTile* > VolumeTileMap; + typedef std::set< VolumeTile* > VolumeTileSet; + mutable OpenThreads::Mutex _mutex; + VolumeTileSet _volumeTileSet; + VolumeTileMap _volumeTileMap; }; diff --git a/include/osgVolume/VolumeTechnique b/include/osgVolume/VolumeTechnique index eb6594531..ec8f64c56 100644 --- a/include/osgVolume/VolumeTechnique +++ b/include/osgVolume/VolumeTechnique @@ -23,7 +23,7 @@ namespace osgVolume { -class Brick; +class VolumeTile; class OSGVOLUME_EXPORT VolumeTechnique : public osg::Object { @@ -36,8 +36,8 @@ class OSGVOLUME_EXPORT VolumeTechnique : public osg::Object META_Object(osgVolume, VolumeTechnique); - Brick* getBrick() { return _brick; } - const Brick* getBrick() const { return _brick; } + VolumeTile* getVolumeTile() { return _volumeTile; } + const VolumeTile* getVolumeTile() const { return _volumeTile; } virtual void init(); @@ -57,9 +57,9 @@ class OSGVOLUME_EXPORT VolumeTechnique : public osg::Object virtual ~VolumeTechnique(); - friend class osgVolume::Brick; + friend class osgVolume::VolumeTile; - Brick* _brick; + VolumeTile* _volumeTile; }; diff --git a/include/osgVolume/Brick b/include/osgVolume/VolumeTile similarity index 73% rename from include/osgVolume/Brick rename to include/osgVolume/VolumeTile index 3b27b6835..9df68cea6 100644 --- a/include/osgVolume/Brick +++ b/include/osgVolume/VolumeTile @@ -11,8 +11,8 @@ * OpenSceneGraph Public License for more details. */ -#ifndef OSGVOLUME_BRICK -#define OSGVOLUME_BRICK 1 +#ifndef OSGVOLUME_tile +#define OSGVOLUME_tile 1 #include #include @@ -25,37 +25,41 @@ namespace osgVolume { class Volume; -class BrickID +class TileID { public: - BrickID(): + TileID(): level(-1), x(-1), - y(-1) {} + y(-1), + z(-1) {} - BrickID(int in_level, int in_x, int in_y): + TileID(int in_level, int in_x, int in_y, int in_z): level(in_level), x(in_x), - y(in_y) {} + y(in_y), + z(in_z) {} - bool operator == (const BrickID& rhs) const + bool operator == (const TileID& rhs) const { - return (level==rhs.level) && (x==rhs.x) && (y==rhs.y); + return (level==rhs.level) && (x==rhs.x) && (y==rhs.y) && (z==rhs.z); } - bool operator != (const BrickID& rhs) const + bool operator != (const TileID& rhs) const { - return (level!=rhs.level) || (x!=rhs.x) || (y!=rhs.y); + return (level!=rhs.level) || (x!=rhs.x) || (y!=rhs.y) || (z!=rhs.z); } - bool operator < (const BrickID& rhs) const + bool operator < (const TileID& rhs) const { if (levelrhs.level) return false; if (xrhs.x) return false; - return yrhs.y) return false; + return z=0; } @@ -67,18 +71,18 @@ class BrickID }; -/** Terrain provides a framework for loosely coupling height field data with height rendering algorithms. +/** VolumeTile provides a framework for loosely coupling 3d image data with rendering algorithms. * This allows TerrainTechnique's to be plugged in at runtime.*/ -class OSGVOLUME_EXPORT Brick : public osg::Group +class OSGVOLUME_EXPORT VolumeTile : public osg::Group { public: - Brick(); + VolumeTile(); /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - Brick(const Brick&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); + VolumeTile(const VolumeTile&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - META_Node(osgVolume, Brick); + META_Node(osgVolume, VolumeTile); virtual void traverse(osg::NodeVisitor& nv); @@ -96,13 +100,13 @@ class OSGVOLUME_EXPORT Brick : public osg::Group const Volume* getVolume() const { return _volume; } - /** Set the BrickID (layer, x,y) of the Brick. - * The BrickID is used so it can be located by its neighbours - * via the enclosing Terrain node that manages a map of BrickID to TerraiTiles.*/ - void setBrickID(const BrickID& brickID); + /** Set the TileID (layer, x,y,z) of the VolumeTile. + * The TileID is used so it can be located by its neighbours + * via the enclosing Volume node that manages a map of TileID to VolumeTiles.*/ + void setTileID(const TileID& tileID); - /** Get the BrickID (layer, x,y) of the Brick.*/ - const BrickID& getBrickID() const { return _brickID; } + /** Get the TileID (layer, x,y,z) of the VolumeTile.*/ + const TileID& getTileID() const { return _tileID; } void setLocator(osg::RefMatrix* locator) { _locator = locator; } @@ -136,7 +140,7 @@ class OSGVOLUME_EXPORT Brick : public osg::Group protected: - virtual ~Brick(); + virtual ~VolumeTile(); friend class Volume; @@ -145,7 +149,7 @@ class OSGVOLUME_EXPORT Brick : public osg::Group bool _dirty; bool _hasBeenTraversal; - BrickID _brickID; + TileID _tileID; osg::ref_ptr _volumeTechnique; diff --git a/src/osgPlugins/dicom/CMakeLists.txt b/src/osgPlugins/dicom/CMakeLists.txt index 26145a8b5..f3596c5af 100644 --- a/src/osgPlugins/dicom/CMakeLists.txt +++ b/src/osgPlugins/dicom/CMakeLists.txt @@ -33,4 +33,4 @@ ENDIF(DCMTK_FOUND) SET(TARGET_ADDED_LIBRARIES osgVolume ) #### end var setup ### -SETUP_PLUGIN(dicom) +SETUP_PLUGIN(dicom dicom) diff --git a/src/osgPlugins/dicom/ReaderWriterDICOM.cpp b/src/osgPlugins/dicom/ReaderWriterDICOM.cpp index f7542c45c..1e631793f 100644 --- a/src/osgPlugins/dicom/ReaderWriterDICOM.cpp +++ b/src/osgPlugins/dicom/ReaderWriterDICOM.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #ifdef USE_DCMTK @@ -119,9 +119,9 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter osg::ref_ptr volume = new osgVolume::Volume; - osg::ref_ptr brick = new osgVolume::Brick; - brick->setVolume(volume.get()); - brick->setImage(result.getImage()); + osg::ref_ptr tile = new osgVolume::VolumeTile; + tile->setVolume(volume.get()); + tile->setImage(result.getImage()); // get matrix providing size of texels (in mm) osg::RefMatrix* matrix = dynamic_cast(result.getImage()->getUserData()); @@ -130,18 +130,18 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter { - // scale up to provide scale of complete brick + // scale up to provide scale of complete tile osg::Vec3d scale(osg::Vec3(result.getImage()->s(),result.getImage()->t(), result.getImage()->r())); matrix->postMultScale(scale); - brick->setLocator(matrix); + tile->setLocator(matrix); result.getImage()->setUserData(0); notice()<<"Locator "<<*matrix<addChild(brick.get()); + volume->addChild(tile.get()); return volume.release(); } diff --git a/src/osgVolume/CMakeLists.txt b/src/osgVolume/CMakeLists.txt index 515a91ea6..574d9ee23 100644 --- a/src/osgVolume/CMakeLists.txt +++ b/src/osgVolume/CMakeLists.txt @@ -13,7 +13,7 @@ SET(LIB_PUBLIC_HEADERS ${HEADER_PATH}/Version ${HEADER_PATH}/Volume ${HEADER_PATH}/VolumeTechnique - ${HEADER_PATH}/Brick + ${HEADER_PATH}/VolumeTile ) # FIXME: For OS X, need flag for Framework or dylib @@ -22,9 +22,9 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_PUBLIC_HEADERS} ImageUtils.cpp Version.cpp - Brick.cpp - VolumeTechnique.cpp Volume.cpp + VolumeTechnique.cpp + VolumeTile.cpp ) diff --git a/src/osgVolume/Volume.cpp b/src/osgVolume/Volume.cpp index bcc000ca6..79a4e423e 100644 --- a/src/osgVolume/Volume.cpp +++ b/src/osgVolume/Volume.cpp @@ -30,15 +30,15 @@ Volume::~Volume() { OpenThreads::ScopedLock lock(_mutex); - for(BrickSet::iterator itr = _brickSet.begin(); - itr != _brickSet.end(); + for(VolumeTileSet::iterator itr = _volumeTileSet.begin(); + itr != _volumeTileSet.end(); ++itr) { - const_cast(*itr)->_volume = 0; + const_cast(*itr)->_volume = 0; } - _brickSet.clear(); - _brickMap.clear(); + _volumeTileSet.clear(); + _volumeTileMap.clear(); } void Volume::traverse(osg::NodeVisitor& nv) @@ -46,69 +46,69 @@ void Volume::traverse(osg::NodeVisitor& nv) Group::traverse(nv); } -Brick* Volume::getBrick(const BrickID& BrickID) +VolumeTile* Volume::getVolumeTile(const TileID& tileID) { OpenThreads::ScopedLock lock(_mutex); - BrickMap::iterator itr = _brickMap.find(BrickID); - if (itr != _brickMap.end()) return 0; + VolumeTileMap::iterator itr = _volumeTileMap.find(tileID); + if (itr != _volumeTileMap.end()) return 0; return itr->second; } -const Brick* Volume::getBrick(const BrickID& BrickID) const +const VolumeTile* Volume::getVolumeTile(const TileID& tileID) const { OpenThreads::ScopedLock lock(_mutex); - BrickMap::const_iterator itr = _brickMap.find(BrickID); - if (itr != _brickMap.end()) return 0; + VolumeTileMap::const_iterator itr = _volumeTileMap.find(tileID); + if (itr != _volumeTileMap.end()) return 0; return itr->second; } -void Volume::dirtyRegisteredBricks() +void Volume::dirtyRegisteredVolumeTiles() { OpenThreads::ScopedLock lock(_mutex); - for(BrickSet::iterator itr = _brickSet.begin(); - itr != _brickSet.end(); + for(VolumeTileSet::iterator itr = _volumeTileSet.begin(); + itr != _volumeTileSet.end(); ++itr) { - (const_cast(*itr))->setDirty(true); + (const_cast(*itr))->setDirty(true); } } -static unsigned int s_maxNumBricks = 0; -void Volume::registerBrick(Brick* Brick) +static unsigned int s_maxNumVolumeTiles = 0; +void Volume::registerVolumeTile(VolumeTile* volumeTile) { - if (!Brick) return; + if (!volumeTile) return; OpenThreads::ScopedLock lock(_mutex); - if (Brick->getBrickID().valid()) + if (volumeTile->getTileID().valid()) { - _brickMap[Brick->getBrickID()] = Brick; + _volumeTileMap[volumeTile->getTileID()] = volumeTile; } - _brickSet.insert(Brick); + _volumeTileSet.insert(volumeTile); - if (_brickSet.size() > s_maxNumBricks) s_maxNumBricks = _brickSet.size(); + if (_volumeTileSet.size() > s_maxNumVolumeTiles) s_maxNumVolumeTiles = _volumeTileSet.size(); - // osg::notify(osg::NOTICE)<<"Volume::registerBrick "<osg::Group::traverse(*uv); + if (_volumeTile) _volumeTile->osg::Group::traverse(*uv); } void VolumeTechnique::cull(osgUtil::CullVisitor* cv) { osg::notify(osg::NOTICE)<osg::Group::traverse(*cv); + if (_volumeTile) _volumeTile->osg::Group::traverse(*cv); } void VolumeTechnique::cleanSceneGraph() @@ -56,12 +56,12 @@ void VolumeTechnique::cleanSceneGraph() void VolumeTechnique::traverse(osg::NodeVisitor& nv) { - if (!_brick) return; + if (!_volumeTile) return; // if app traversal update the frame count. if (nv.getVisitorType()==osg::NodeVisitor::UPDATE_VISITOR) { - if (_brick->getDirty()) _brick->init(); + if (_volumeTile->getDirty()) _volumeTile->init(); osgUtil::UpdateVisitor* uv = dynamic_cast(&nv); if (uv) @@ -81,8 +81,8 @@ void VolumeTechnique::traverse(osg::NodeVisitor& nv) } } - if (_brick->getDirty()) _brick->init(); + if (_volumeTile->getDirty()) _volumeTile->init(); // otherwise fallback to the Group::traverse() - _brick->osg::Group::traverse(nv); + _volumeTile->osg::Group::traverse(nv); } diff --git a/src/osgVolume/Brick.cpp b/src/osgVolume/VolumeTile.cpp similarity index 76% rename from src/osgVolume/Brick.cpp rename to src/osgVolume/VolumeTile.cpp index 74db32746..47691815e 100644 --- a/src/osgVolume/Brick.cpp +++ b/src/osgVolume/VolumeTile.cpp @@ -11,7 +11,7 @@ * OpenSceneGraph Public License for more details. */ -#include +#include #include @@ -20,9 +20,9 @@ using namespace osgVolume; ///////////////////////////////////////////////////////////////////////////////// // -// Brick +// VolumeTile // -Brick::Brick(): +VolumeTile::VolumeTile(): _volume(0), _dirty(false), _hasBeenTraversal(false) @@ -30,7 +30,7 @@ Brick::Brick(): setThreadSafeRefUnref(true); } -Brick::Brick(const Brick& brick,const osg::CopyOp& copyop): +VolumeTile::VolumeTile(const VolumeTile& brick,const osg::CopyOp& copyop): Group(brick,copyop), _volume(0), _dirty(false), @@ -43,35 +43,35 @@ Brick::Brick(const Brick& brick,const osg::CopyOp& copyop): } } -Brick::~Brick() +VolumeTile::~VolumeTile() { if (_volume) setVolume(0); } -void Brick::setVolume(Volume* volume) +void VolumeTile::setVolume(Volume* volume) { if (_volume == volume) return; - if (_volume) _volume->unregisterBrick(this); + if (_volume) _volume->unregisterVolumeTile(this); _volume = volume; - if (_volume) _volume->registerBrick(this); + if (_volume) _volume->registerVolumeTile(this); } -void Brick::setBrickID(const BrickID& brickID) +void VolumeTile::setTileID(const TileID& tileID) { - if (_brickID == brickID) return; + if (_tileID == tileID) return; - if (_volume) _volume->unregisterBrick(this); + if (_volume) _volume->unregisterVolumeTile(this); - _brickID = brickID; + _tileID = tileID; - if (_volume) _volume->registerBrick(this); + if (_volume) _volume->registerVolumeTile(this); } -void Brick::traverse(osg::NodeVisitor& nv) +void VolumeTile::traverse(osg::NodeVisitor& nv) { if (!_hasBeenTraversal) { @@ -107,7 +107,7 @@ void Brick::traverse(osg::NodeVisitor& nv) } } -void Brick::init() +void VolumeTile::init() { if (_volumeTechnique.valid() && getDirty()) { @@ -117,7 +117,7 @@ void Brick::init() } } -void Brick::setVolumeTechnique(VolumeTechnique* volumeTechnique) +void VolumeTile::setVolumeTechnique(VolumeTechnique* volumeTechnique) { if (_volumeTechnique == volumeTechnique) return; @@ -125,14 +125,14 @@ void Brick::setVolumeTechnique(VolumeTechnique* volumeTechnique) if (_volumeTechnique.valid()) { - _volumeTechnique->_brick = 0; + _volumeTechnique->_volumeTile = 0; } _volumeTechnique = volumeTechnique; if (_volumeTechnique.valid()) { - _volumeTechnique->_brick = this; + _volumeTechnique->_volumeTile = this; ++dirtyDelta; } @@ -140,7 +140,7 @@ void Brick::setVolumeTechnique(VolumeTechnique* volumeTechnique) else if (dirtyDelta<0) setDirty(false); } -void Brick::setDirty(bool dirty) +void VolumeTile::setDirty(bool dirty) { if (_dirty==dirty) return; @@ -156,11 +156,11 @@ void Brick::setDirty(bool dirty) } } -osg::BoundingSphere Brick::computeBound() const +osg::BoundingSphere VolumeTile::computeBound() const { osg::BoundingSphere bs; - osg::notify(osg::NOTICE)<<"TODO Brick::computeBound()"< #include #include -#include #include +#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -69,32 +69,32 @@ BEGIN_OBJECT_REFLECTOR(osgVolume::Volume) __void__traverse__osg_NodeVisitor_R1, "Traverse downwards : calls children's accept method with NodeVisitor. ", ""); - I_Method1(osgVolume::Brick *, getBrick, IN, const osgVolume::BrickID &, brickID, + I_Method1(osgVolume::VolumeTile *, getVolumeTile, IN, const osgVolume::TileID &, tileID, Properties::NON_VIRTUAL, - __Brick_P1__getBrick__C5_BrickID_R1, - "Get the Brick for a given BrickID. ", + __VolumeTile_P1__getVolumeTile__C5_TileID_R1, + "Get the VolumeTile for a given VolumeTileID. ", ""); - I_Method1(const osgVolume::Brick *, getBrick, IN, const osgVolume::BrickID &, brickID, + I_Method1(const osgVolume::VolumeTile *, getVolumeTile, IN, const osgVolume::TileID &, tileID, Properties::NON_VIRTUAL, - __C5_Brick_P1__getBrick__C5_BrickID_R1, - "Get the const Brick for a given BrickID. ", + __C5_VolumeTile_P1__getVolumeTile__C5_TileID_R1, + "Get the const VolumeTile for a given VolumeTileID. ", ""); - I_ProtectedMethod0(void, dirtyRegisteredBricks, + I_ProtectedMethod0(void, dirtyRegisteredVolumeTiles, Properties::NON_VIRTUAL, Properties::NON_CONST, - __void__dirtyRegisteredBricks, + __void__dirtyRegisteredVolumeTiles, "", ""); - I_ProtectedMethod1(void, registerBrick, IN, osgVolume::Brick *, tile, + I_ProtectedMethod1(void, registerVolumeTile, IN, osgVolume::VolumeTile *, tile, Properties::NON_VIRTUAL, Properties::NON_CONST, - __void__registerBrick__Brick_P1, + __void__registerVolumeTile__VolumeTile_P1, "", ""); - I_ProtectedMethod1(void, unregisterBrick, IN, osgVolume::Brick *, tile, + I_ProtectedMethod1(void, unregisterVolumeTile, IN, osgVolume::VolumeTile *, tile, Properties::NON_VIRTUAL, Properties::NON_CONST, - __void__unregisterBrick__Brick_P1, + __void__unregisterVolumeTile__VolumeTile_P1, "", ""); END_REFLECTOR diff --git a/src/osgWrappers/osgVolume/VolumeTechnique.cpp b/src/osgWrappers/osgVolume/VolumeTechnique.cpp index 35b5f5bb7..43e60fab4 100644 --- a/src/osgWrappers/osgVolume/VolumeTechnique.cpp +++ b/src/osgWrappers/osgVolume/VolumeTechnique.cpp @@ -15,8 +15,8 @@ #include #include #include -#include #include +#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -61,14 +61,14 @@ BEGIN_OBJECT_REFLECTOR(osgVolume::VolumeTechnique) __C5_char_P1__className, "return the name of the object's class type. ", "Must be defined by derived classes. "); - I_Method0(osgVolume::Brick *, getBrick, + I_Method0(osgVolume::VolumeTile *, getVolumeTile, Properties::NON_VIRTUAL, - __Brick_P1__getBrick, + __VolumeTile_P1__getVolumeTile, "", ""); - I_Method0(const osgVolume::Brick *, getBrick, + I_Method0(const osgVolume::VolumeTile *, getVolumeTile, Properties::NON_VIRTUAL, - __C5_Brick_P1__getBrick, + __C5_VolumeTile_P1__getVolumeTile, "", ""); I_Method0(void, init, @@ -102,8 +102,8 @@ BEGIN_OBJECT_REFLECTOR(osgVolume::VolumeTechnique) __void__setDirty__bool, "", ""); - I_SimpleProperty(osgVolume::Brick *, Brick, - __Brick_P1__getBrick, + I_SimpleProperty(osgVolume::VolumeTile *, VolumeTile, + __VolumeTile_P1__getVolumeTile, 0); END_REFLECTOR diff --git a/src/osgWrappers/osgVolume/Brick.cpp b/src/osgWrappers/osgVolume/VolumeTile.cpp similarity index 84% rename from src/osgWrappers/osgVolume/Brick.cpp rename to src/osgWrappers/osgVolume/VolumeTile.cpp index eb11ece87..5e75074ed 100644 --- a/src/osgWrappers/osgVolume/Brick.cpp +++ b/src/osgWrappers/osgVolume/VolumeTile.cpp @@ -16,9 +16,9 @@ #include #include #include -#include #include #include +#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -28,14 +28,34 @@ #undef OUT #endif -BEGIN_OBJECT_REFLECTOR(osgVolume::Brick) - I_DeclaringFile("osgVolume/Brick"); - I_BaseType(osg::Group); - I_Constructor0(____Brick, +BEGIN_VALUE_REFLECTOR(osgVolume::TileID) + I_DeclaringFile("osgVolume/VolumeTile"); + I_Constructor0(____TileID, "", ""); - I_ConstructorWithDefaults2(IN, const osgVolume::Brick &, x, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, - ____Brick__C5_Brick_R1__C5_osg_CopyOp_R1, + I_Constructor4(IN, int, in_level, IN, int, in_x, IN, int, in_y, IN, int, in_z, + ____TileID__int__int__int__int, + "", + ""); + I_Method0(bool, valid, + Properties::NON_VIRTUAL, + __bool__valid, + "", + ""); + I_PublicMemberProperty(int, level); + I_PublicMemberProperty(int, x); + I_PublicMemberProperty(int, y); + I_PublicMemberProperty(int, z); +END_REFLECTOR + +BEGIN_OBJECT_REFLECTOR(osgVolume::VolumeTile) + I_DeclaringFile("osgVolume/VolumeTile"); + I_BaseType(osg::Group); + I_Constructor0(____VolumeTile, + "", + ""); + I_ConstructorWithDefaults2(IN, const osgVolume::VolumeTile &, x, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, + ____VolumeTile__C5_VolumeTile_R1__C5_osg_CopyOp_R1, "Copy constructor using CopyOp to manage deep vs shallow copy. ", ""); I_Method0(osg::Object *, cloneType, @@ -93,15 +113,15 @@ BEGIN_OBJECT_REFLECTOR(osgVolume::Brick) __C5_Volume_P1__getVolume, "Get the const Volume that this Volume tile is a member of. ", ""); - I_Method1(void, setBrickID, IN, const osgVolume::BrickID &, brickID, + I_Method1(void, setTileID, IN, const osgVolume::TileID &, tileID, Properties::NON_VIRTUAL, - __void__setBrickID__C5_BrickID_R1, - "Set the BrickID (layer, x,y) of the Brick. ", - "The BrickID is used so it can be located by its neighbours via the enclosing Terrain node that manages a map of BrickID to TerraiTiles. "); - I_Method0(const osgVolume::BrickID &, getBrickID, + __void__setTileID__C5_TileID_R1, + "Set the TileID (layer, x,y,z) of the VolumeTile. ", + "The TileID is used so it can be located by its neighbours via the enclosing Volume node that manages a map of TileID to VolumeTiles. "); + I_Method0(const osgVolume::TileID &, getTileID, Properties::NON_VIRTUAL, - __C5_BrickID_R1__getBrickID, - "Get the BrickID (layer, x,y) of the Brick. ", + __C5_TileID_R1__getTileID, + "Get the TileID (layer, x,y,z) of the VolumeTile. ", ""); I_Method1(void, setLocator, IN, osg::RefMatrix *, locator, Properties::NON_VIRTUAL, @@ -163,9 +183,6 @@ BEGIN_OBJECT_REFLECTOR(osgVolume::Brick) __osg_BoundingSphere__computeBound, "Compute the bounding sphere around Node's geometry or children. ", "This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound(). "); - I_SimpleProperty(const osgVolume::BrickID &, BrickID, - __C5_BrickID_R1__getBrickID, - __void__setBrickID__C5_BrickID_R1); I_SimpleProperty(bool, Dirty, __bool__getDirty, __void__setDirty__bool); @@ -175,6 +192,9 @@ BEGIN_OBJECT_REFLECTOR(osgVolume::Brick) I_SimpleProperty(osg::RefMatrix *, Locator, __osg_RefMatrix_P1__getLocator, __void__setLocator__osg_RefMatrix_P1); + I_SimpleProperty(const osgVolume::TileID &, TileID, + __C5_TileID_R1__getTileID, + __void__setTileID__C5_TileID_R1); I_SimpleProperty(osgVolume::Volume *, Volume, __Volume_P1__getVolume, __void__setVolume__Volume_P1); @@ -183,23 +203,3 @@ BEGIN_OBJECT_REFLECTOR(osgVolume::Brick) __void__setVolumeTechnique__VolumeTechnique_P1); END_REFLECTOR -BEGIN_VALUE_REFLECTOR(osgVolume::BrickID) - I_DeclaringFile("osgVolume/Brick"); - I_Constructor0(____BrickID, - "", - ""); - I_Constructor3(IN, int, in_level, IN, int, in_x, IN, int, in_y, - ____BrickID__int__int__int, - "", - ""); - I_Method0(bool, valid, - Properties::NON_VIRTUAL, - __bool__valid, - "", - ""); - I_PublicMemberProperty(int, level); - I_PublicMemberProperty(int, x); - I_PublicMemberProperty(int, y); - I_PublicMemberProperty(int, z); -END_REFLECTOR -