OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Volume.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 OSGVOLUME
15 #define OSGVOLUME 1
16 
17 #include <osg/Group>
18 #include <osg/CoordinateSystemNode>
19 
20 #include <osgVolume/VolumeTile>
21 
22 namespace osgVolume {
23 
27 {
28  public:
29 
30  Volume();
31 
33  Volume(const Volume&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
34 
36 
37  virtual void traverse(osg::NodeVisitor& nv);
38 
40  VolumeTile* getVolumeTile(const TileID& tileID);
41 
43  const VolumeTile* getVolumeTile(const TileID& tileID) const;
44 
45 
47  void setVolumeTechniquePrototype(VolumeTechnique* volumeTechnique) { _volumeTechnique = volumeTechnique; }
48 
50  VolumeTechnique* getVolumeTechniquePrototype() { return _volumeTechnique.get(); }
51 
53  const VolumeTechnique* getVolumeTechniquePrototype() const { return _volumeTechnique.get(); }
54 
55 
56  protected:
57 
58  virtual ~Volume();
59 
60  friend class VolumeTile;
61 
62  void dirtyRegisteredVolumeTiles();
63 
64  void registerVolumeTile(VolumeTile* tile);
65  void unregisterVolumeTile(VolumeTile* tile);
66 
67  typedef std::map< TileID, VolumeTile* > VolumeTileMap;
68  typedef std::set< VolumeTile* > VolumeTileSet;
69 
71  VolumeTileSet _volumeTileSet;
72  VolumeTileMap _volumeTileMap;
73 
75 };
76 
77 }
78 
79 #endif
This class provides an object-oriented thread mutex interface.
Definition: Mutex.h:31
VolumeTechnique * getVolumeTechniquePrototype()
Definition: Volume.h:50
VolumeTileSet _volumeTileSet
Definition: Volume.h:71
#define OSGVOLUME_EXPORT
Definition: Export.h:39
void setVolumeTechniquePrototype(VolumeTechnique *volumeTechnique)
Definition: Volume.h:47
#define META_Node(library, name)
Definition: Node.h:59
const VolumeTechnique * getVolumeTechniquePrototype() const
Definition: Volume.h:53
OpenThreads::Mutex _mutex
Definition: Volume.h:70
VolumeTileMap _volumeTileMap
Definition: Volume.h:72
osg::ref_ptr< VolumeTechnique > _volumeTechnique
Definition: Volume.h:74
std::map< TileID, VolumeTile * > VolumeTileMap
Definition: Volume.h:67
std::set< VolumeTile * > VolumeTileSet
Definition: Volume.h:68