Renamed osgVolume::Brick to osgVolume::VolumeTile

This commit is contained in:
Robert Osfield
2008-12-20 20:55:21 +00:00
parent f0270f934e
commit adb7a49c10
12 changed files with 177 additions and 174 deletions

View File

@@ -17,11 +17,11 @@
#include <osg/Group>
#include <osg/CoordinateSystemNode>
#include <osgVolume/Brick>
#include <osgVolume/VolumeTile>
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;
};

View File

@@ -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;
};

View File

@@ -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 <osg/Group>
#include <osg/Image>
@@ -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 (level<rhs.level) return true;
if (level>rhs.level) return false;
if (x<rhs.x) return true;
if (x>rhs.x) return false;
return y<rhs.y;
if (y<rhs.y) return true;
if (y>rhs.y) return false;
return z<rhs.z;
}
bool valid() const { return level>=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> _volumeTechnique;

View File

@@ -33,4 +33,4 @@ ENDIF(DCMTK_FOUND)
SET(TARGET_ADDED_LIBRARIES osgVolume )
#### end var setup ###
SETUP_PLUGIN(dicom)
SETUP_PLUGIN(dicom dicom)

View File

@@ -14,7 +14,7 @@
#include <osgDB/Registry>
#include <osgVolume/Volume>
#include <osgVolume/Brick>
#include <osgVolume/VolumeTile>
#include <osgVolume/ImageUtils>
#ifdef USE_DCMTK
@@ -119,9 +119,9 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
osg::ref_ptr<osgVolume::Volume> volume = new osgVolume::Volume;
osg::ref_ptr<osgVolume::Brick> brick = new osgVolume::Brick;
brick->setVolume(volume.get());
brick->setImage(result.getImage());
osg::ref_ptr<osgVolume::VolumeTile> 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<osg::RefMatrix*>(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<<std::endl;
}
volume->addChild(brick.get());
volume->addChild(tile.get());
return volume.release();
}

View File

@@ -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
)

View File

@@ -30,15 +30,15 @@ Volume::~Volume()
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
for(BrickSet::iterator itr = _brickSet.begin();
itr != _brickSet.end();
for(VolumeTileSet::iterator itr = _volumeTileSet.begin();
itr != _volumeTileSet.end();
++itr)
{
const_cast<Brick*>(*itr)->_volume = 0;
const_cast<VolumeTile*>(*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<OpenThreads::Mutex> 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<OpenThreads::Mutex> 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<OpenThreads::Mutex> lock(_mutex);
for(BrickSet::iterator itr = _brickSet.begin();
itr != _brickSet.end();
for(VolumeTileSet::iterator itr = _volumeTileSet.begin();
itr != _volumeTileSet.end();
++itr)
{
(const_cast<Brick*>(*itr))->setDirty(true);
(const_cast<VolumeTile*>(*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<OpenThreads::Mutex> 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 "<<Brick<<" total number of Brick "<<_brickSet.size()<<" max = "<<s_maxNumBricks<<std::endl;
// osg::notify(osg::NOTICE)<<"Volume::registerVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;
}
void Volume::unregisterBrick(Brick* Brick)
void Volume::unregisterVolumeTile(VolumeTile* volumeTile)
{
if (!Brick) return;
if (!volumeTile) return;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
if (Brick->getBrickID().valid())
if (volumeTile->getTileID().valid())
{
_brickMap.erase(Brick->getBrickID());
_volumeTileMap.erase(volumeTile->getTileID());
}
_brickSet.erase(Brick);
_volumeTileSet.erase(volumeTile);
// osg::notify(osg::NOTICE)<<"Volume::unregisterBrick "<<Brick<<" total number of Brick "<<_brickSet.size()<<" max = "<<s_maxNumBricks<<std::endl;
// osg::notify(osg::NOTICE)<<"Volume::unregisterVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;
}

View File

@@ -12,19 +12,19 @@
*/
#include <osgVolume/VolumeTechnique>
#include <osgVolume/Brick>
#include <osgVolume/VolumeTile>
using namespace osgVolume;
VolumeTechnique::VolumeTechnique():
_brick(0)
_volumeTile(0)
{
setThreadSafeRefUnref(true);
}
VolumeTechnique::VolumeTechnique(const VolumeTechnique& rhs,const osg::CopyOp& copyop):
osg::Object(rhs,copyop),
_brick(0)
_volumeTile(0)
{
}
@@ -40,13 +40,13 @@ void VolumeTechnique::init()
void VolumeTechnique::update(osgUtil::UpdateVisitor* uv)
{
osg::notify(osg::NOTICE)<<className()<<"::update(..) not implementated yet"<<std::endl;
if (_brick) _brick->osg::Group::traverse(*uv);
if (_volumeTile) _volumeTile->osg::Group::traverse(*uv);
}
void VolumeTechnique::cull(osgUtil::CullVisitor* cv)
{
osg::notify(osg::NOTICE)<<className()<<"::cull(..) not implementated yet"<<std::endl;
if (_brick) _brick->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<osgUtil::UpdateVisitor*>(&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);
}

View File

@@ -11,7 +11,7 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgVolume/Brick>
#include <osgVolume/VolumeTile>
#include <osgVolume/Volume>
@@ -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()"<<std::endl;
osg::notify(osg::NOTICE)<<"TODO VolumeTile::computeBound()"<<std::endl;
return bs;
}

View File

@@ -13,8 +13,8 @@
#include <osg/CopyOp>
#include <osg/NodeVisitor>
#include <osg/Object>
#include <osgVolume/Brick>
#include <osgVolume/Volume>
#include <osgVolume/VolumeTile>
// 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

View File

@@ -15,8 +15,8 @@
#include <osg/Object>
#include <osgUtil/CullVisitor>
#include <osgUtil/UpdateVisitor>
#include <osgVolume/Brick>
#include <osgVolume/VolumeTechnique>
#include <osgVolume/VolumeTile>
// 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

View File

@@ -16,9 +16,9 @@
#include <osg/Matrix>
#include <osg/NodeVisitor>
#include <osg/Object>
#include <osgVolume/Brick>
#include <osgVolume/Volume>
#include <osgVolume/VolumeTechnique>
#include <osgVolume/VolumeTile>
// 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