VolumeScene
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGVOLUMESCENE
#define OSGVOLUMESCENE 1
#include <osg/Group>
#include <osg/Texture2D>
#include <osgUtil/CullVisitor>
#include <osgVolume/VolumeTile>
namespace osgVolume {
class OSGVOLUME_EXPORT VolumeScene : public osg::Group
{
public:
VolumeScene();
VolumeScene(const VolumeScene&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Node(osgVolume, VolumeScene);
virtual void traverse(osg::NodeVisitor& nv);
TileData* tileVisited(osgUtil::CullVisitor* cv, VolumeTile* tile);
TileData* getTileData(osgUtil::CullVisitor* cv, VolumeTile* tile);
protected:
virtual ~VolumeScene();
typedef std::map< VolumeTile*, osg::ref_ptr<TileData> > Tiles;
class ViewData : public osg::Referenced
{
public:
ViewData();
void clearTiles();
void visitTile(VolumeTile* tile);
osg::ref_ptr<osg::Texture2D> _depthTexture;
osg::ref_ptr<osg::Texture2D> _colorTexture;
osg::ref_ptr<osg::Camera> _rttCamera;
osg::ref_ptr<osg::Node> _backdropSubgraph;
osg::ref_ptr<osg::Geometry> _geometry;
osg::ref_ptr<osg::Vec3Array> _vertices;
osg::ref_ptr<osg::StateSet> _stateset;
osg::ref_ptr<osg::Uniform> _viewportDimensionsUniform;
Tiles _tiles;
protected:
virtual ~ViewData() {}
};
typedef std::map< osgUtil::CullVisitor*, osg::ref_ptr<ViewData> > ViewDataMap;
OpenThreads::Mutex _viewDataMapMutex;
ViewDataMap _viewDataMap;
};
}
#endif
CullVisitor
Group
Texture2D
VolumeTile
OpenThreads::Mutex
This class provides an object-oriented thread mutex interface.
Definition Mutex:31
osgUtil::CullVisitor
Definition CullVisitor:49
osgVolume::VolumeScene::ViewData::_colorTexture
osg::ref_ptr< osg::Texture2D > _colorTexture
Definition VolumeScene:57
osgVolume::VolumeScene::ViewData::_viewportDimensionsUniform
osg::ref_ptr< osg::Uniform > _viewportDimensionsUniform
Definition VolumeScene:63
osgVolume::VolumeScene::ViewData::_stateset
osg::ref_ptr< osg::StateSet > _stateset
Definition VolumeScene:62
osgVolume::VolumeScene::ViewData::_tiles
Tiles _tiles
Definition VolumeScene:65
osgVolume::VolumeScene::ViewData::_vertices
osg::ref_ptr< osg::Vec3Array > _vertices
Definition VolumeScene:61
osgVolume::VolumeScene::ViewData::visitTile
void visitTile(VolumeTile *tile)
osgVolume::VolumeScene::ViewData::ViewData
ViewData()
osgVolume::VolumeScene::ViewData::~ViewData
virtual ~ViewData()
Definition VolumeScene:68
osgVolume::VolumeScene::ViewData::_rttCamera
osg::ref_ptr< osg::Camera > _rttCamera
Definition VolumeScene:58
osgVolume::VolumeScene::ViewData::_backdropSubgraph
osg::ref_ptr< osg::Node > _backdropSubgraph
Definition VolumeScene:59
osgVolume::VolumeScene::ViewData::clearTiles
void clearTiles()
osgVolume::VolumeScene::ViewData::_depthTexture
osg::ref_ptr< osg::Texture2D > _depthTexture
Definition VolumeScene:56
osgVolume::VolumeScene::ViewData::_geometry
osg::ref_ptr< osg::Geometry > _geometry
Definition VolumeScene:60
osgVolume::VolumeScene::_viewDataMapMutex
OpenThreads::Mutex _viewDataMapMutex
Definition VolumeScene:72
osgVolume::VolumeScene::tileVisited
TileData * tileVisited(osgUtil::CullVisitor *cv, VolumeTile *tile)
osgVolume::VolumeScene::Tiles
std::map< VolumeTile *, osg::ref_ptr< TileData > > Tiles
Definition VolumeScene:46
osgVolume::VolumeScene::ViewDataMap
std::map< osgUtil::CullVisitor *, osg::ref_ptr< ViewData > > ViewDataMap
Definition VolumeScene:71
osgVolume::VolumeScene::traverse
virtual void traverse(osg::NodeVisitor &nv)
osgVolume::VolumeScene::VolumeScene
VolumeScene(const VolumeScene &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgVolume::VolumeScene::VolumeScene
VolumeScene()
osgVolume::VolumeScene::_viewDataMap
ViewDataMap _viewDataMap
Definition VolumeScene:73
osgVolume::VolumeScene::META_Node
META_Node(osgVolume, VolumeScene)
osgVolume::VolumeScene::getTileData
TileData * getTileData(osgUtil::CullVisitor *cv, VolumeTile *tile)
osgVolume::VolumeScene::~VolumeScene
virtual ~VolumeScene()
osgVolume::VolumeTile
Definition VolumeTile:70
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Group
Definition Group:29
osg::NodeVisitor
Definition NodeVisitor:82
osg::Referenced
Definition Referenced:44
osg::ref_ptr
Definition ref_ptr:32
osgVolume
OSGVOLUME_EXPORT
#define OSGVOLUME_EXPORT
Definition osgVolume/Export:39
osgVolume::TileData
Definition VolumeTechnique:30