OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Scene.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 OSGVIEWER_SCENE
15 #define OSGVIEWER_SCENE 1
16 
17 #include <osgGA/GUIEventHandler>
18 #include <osgGA/EventVisitor>
19 #include <osgDB/DatabasePager>
20 #include <osgDB/ImagePager>
21 
22 #include <osgViewer/Export>
23 
24 #include <list>
25 
26 namespace osgViewer{
27 
30 {
31  public:
32 
33  virtual const char* className() const { return "Scene"; }
34 
35  void setSceneData(osg::Node* node);
36  osg::Node* getSceneData();
37  const osg::Node* getSceneData() const;
38 
39 
40  void setDatabasePager(osgDB::DatabasePager* dp);
41  osgDB::DatabasePager* getDatabasePager() { return _databasePager.get(); }
42  const osgDB::DatabasePager* getDatabasePager() const { return _databasePager.get(); }
43 
44  void setImagePager(osgDB::ImagePager* ip);
45  osgDB::ImagePager* getImagePager() { return _imagePager.get(); }
46  const osgDB::ImagePager* getImagePager() const { return _imagePager.get(); }
47 
48  void updateSceneGraph(osg::NodeVisitor& updateVisitor);
49 
50 
53  static Scene* getScene(osg::Node* node);
54 
55  protected:
56 
57  Scene();
58  virtual ~Scene();
59 
62  static Scene* getOrCreateScene(osg::Node* node);
63 
64  friend class View;
65 
67 
70 };
71 
72 
73 }
74 
75 #endif
const osgDB::DatabasePager * getDatabasePager() const
Definition: Scene.h:42
#define OSGVIEWER_EXPORT
Definition: Export.h:40
virtual const char * className() const
Definition: Scene.h:33
osgDB::ImagePager * getImagePager()
Definition: Scene.h:45
osg::ref_ptr< osgDB::ImagePager > _imagePager
Definition: Scene.h:69
osg::ref_ptr< osgDB::DatabasePager > _databasePager
Definition: Scene.h:68
const osgDB::ImagePager * getImagePager() const
Definition: Scene.h:46
Definition: Node.h:71
osg::ref_ptr< osg::Node > _sceneData
Definition: Scene.h:66
osgDB::DatabasePager * getDatabasePager()
Definition: Scene.h:41