Added support for controlling the extents of the volume rendering by nesting the hull underneath VolumeTile. Currently only supported by the new osgVolume::MultipassTechnique

This commit is contained in:
Robert Osfield
2014-01-16 16:08:43 +00:00
parent a30ec25067
commit 1264ec736a
4 changed files with 544 additions and 349 deletions

View File

@@ -36,12 +36,6 @@ class OSGVOLUME_EXPORT VolumeScene : public osg::Group
virtual void traverse(osg::NodeVisitor& nv);
void tileVisited(osg::NodeVisitor* nv, osgVolume::VolumeTile* tile);
protected:
virtual ~VolumeScene();
struct TileData : public osg::Referenced
{
TileData() : active(false) {}
@@ -54,8 +48,17 @@ class OSGVOLUME_EXPORT VolumeScene : public osg::Group
osg::ref_ptr<osg::Texture2D> depthTexture;
osg::ref_ptr<osg::Camera> rttCamera;
osg::ref_ptr<osg::Camera> stateset;
osg::ref_ptr<osg::StateSet> stateset;
osg::ref_ptr<osg::Uniform> texgenUniform;
};
TileData* tileVisited(osgUtil::CullVisitor* cv, osgVolume::VolumeTile* tile);
TileData* getTileData(osgUtil::CullVisitor* cv, osgVolume::VolumeTile* tile);
protected:
virtual ~VolumeScene();
typedef std::map< VolumeTile*, osg::ref_ptr<TileData> > Tiles;
class ViewData : public osg::Referenced