OpenSceneGraph 3.6.5
Scene
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
26namespace osgViewer{
27
30{
31 public:
32
33 virtual const char* className() const { return "Scene"; }
34
37 const osg::Node* getSceneData() const;
38
39
42 const osgDB::DatabasePager* getDatabasePager() const { return _databasePager.get(); }
43
46 const osgDB::ImagePager* getImagePager() const { return _imagePager.get(); }
47
48 virtual bool requiresUpdateSceneGraph() const;
49
50 virtual void updateSceneGraph(osg::NodeVisitor& updateVisitor);
51
52 virtual bool requiresRedraw() const;
53
56 static Scene* getScene(osg::Node* node);
57
58 protected:
59
61 virtual ~Scene();
62
66
67 friend class View;
68
70
73};
74
75
76}
77
78#endif
The osgViewer library provides high level viewer functionality designed to make it easier to write a ...
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Base class for providing reference counted objects.
Definition Referenced:44
Database paging class which manages the loading of files in a background thread, and synchronizing of...
Definition DatabasePager:50
Definition ImagePager:33
friend class View
Definition Scene:67
const osgDB::ImagePager * getImagePager() const
Definition Scene:46
const osg::Node * getSceneData() const
osgDB::DatabasePager * getDatabasePager()
Definition Scene:41
void setSceneData(osg::Node *node)
void setImagePager(osgDB::ImagePager *ip)
osgDB::ImagePager * getImagePager()
Definition Scene:45
virtual const char * className() const
Definition Scene:33
virtual bool requiresUpdateSceneGraph() const
osg::ref_ptr< osgDB::DatabasePager > _databasePager
Definition Scene:71
osg::ref_ptr< osg::Node > _sceneData
Definition Scene:69
osg::Node * getSceneData()
virtual bool requiresRedraw() const
void setDatabasePager(osgDB::DatabasePager *dp)
virtual ~Scene()
static Scene * getScene(osg::Node *node)
Get the Scene object that has the specified node assigned to it.
const osgDB::DatabasePager * getDatabasePager() const
Definition Scene:42
osg::ref_ptr< osgDB::ImagePager > _imagePager
Definition Scene:72
virtual void updateSceneGraph(osg::NodeVisitor &updateVisitor)
static Scene * getOrCreateScene(osg::Node *node)
Get the Scene object that has the specified node assigned to it.
#define OSGVIEWER_EXPORT
Definition Export:40

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.