OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VolumeScene.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGVOLUMESCENE
15 #define OSGVOLUMESCENE 1
16 
17 #include <osg/Group>
18 #include <osg/Texture2D>
19 #include <osgUtil/CullVisitor>
20 
21 #include <osgVolume/VolumeTile>
22 
23 namespace osgVolume {
24 
27 {
28  public:
29 
30  VolumeScene();
31 
34 
36 
37  virtual void traverse(osg::NodeVisitor& nv);
38 
39  TileData* tileVisited(osgUtil::CullVisitor* cv, VolumeTile* tile);
40  TileData* getTileData(osgUtil::CullVisitor* cv, VolumeTile* tile);
41 
42  protected:
43 
44  virtual ~VolumeScene();
45 
46  typedef std::map< VolumeTile*, osg::ref_ptr<TileData> > Tiles;
47 
48  class ViewData : public osg::Referenced
49  {
50  public:
51  ViewData();
52 
53  void clearTiles();
54  void visitTile(VolumeTile* tile);
55 
64 
65  Tiles _tiles;
66 
67  protected:
68  virtual ~ViewData() {}
69  };
70 
71  typedef std::map< osgUtil::CullVisitor*, osg::ref_ptr<ViewData> > ViewDataMap;
73  ViewDataMap _viewDataMap;
74 };
75 
76 }
77 
78 #endif
osg::ref_ptr< osg::Texture2D > _depthTexture
Definition: VolumeScene.h:56
osg::ref_ptr< osg::Geometry > _geometry
Definition: VolumeScene.h:60
This class provides an object-oriented thread mutex interface.
Definition: Mutex.h:31
osg::ref_ptr< osg::Vec3Array > _vertices
Definition: VolumeScene.h:61
osg::ref_ptr< osg::Texture2D > _colorTexture
Definition: VolumeScene.h:57
#define OSGVOLUME_EXPORT
Definition: Export.h:39
osg::ref_ptr< osg::StateSet > _stateset
Definition: VolumeScene.h:62
OpenThreads::Mutex _viewDataMapMutex
Definition: VolumeScene.h:72
#define META_Node(library, name)
Definition: Node.h:59
ViewDataMap _viewDataMap
Definition: VolumeScene.h:73
osg::ref_ptr< osg::Camera > _rttCamera
Definition: VolumeScene.h:58
std::map< VolumeTile *, osg::ref_ptr< TileData > > Tiles
Definition: VolumeScene.h:46
osg::ref_ptr< osg::Uniform > _viewportDimensionsUniform
Definition: VolumeScene.h:63
std::map< osgUtil::CullVisitor *, osg::ref_ptr< ViewData > > ViewDataMap
Definition: VolumeScene.h:71
osg::ref_ptr< osg::Node > _backdropSubgraph
Definition: VolumeScene.h:59