Scene
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 OSGVIEWER_SCENE
#define OSGVIEWER_SCENE 1
#include <osgGA/GUIEventHandler>
#include <osgGA/EventVisitor>
#include <osgDB/DatabasePager>
#include <osgDB/ImagePager>
#include <osgViewer/Export>
#include <list>
namespace osgViewer{
class OSGVIEWER_EXPORT Scene : public osg::Referenced
{
public:
virtual const char* className() const { return "Scene"; }
void setSceneData(osg::Node* node);
osg::Node* getSceneData();
const osg::Node* getSceneData() const;
void setDatabasePager(osgDB::DatabasePager* dp);
osgDB::DatabasePager* getDatabasePager() { return _databasePager.get(); }
const osgDB::DatabasePager* getDatabasePager() const { return _databasePager.get(); }
void setImagePager(osgDB::ImagePager* ip);
osgDB::ImagePager* getImagePager() { return _imagePager.get(); }
const osgDB::ImagePager* getImagePager() const { return _imagePager.get(); }
virtual bool requiresUpdateSceneGraph() const;
virtual void updateSceneGraph(osg::NodeVisitor& updateVisitor);
virtual bool requiresRedraw() const;
static Scene* getScene(osg::Node* node);
protected:
Scene();
virtual ~Scene();
static Scene* getOrCreateScene(osg::Node* node);
friend class View;
osg::ref_ptr<osg::Node> _sceneData;
osg::ref_ptr<osgDB::DatabasePager> _databasePager;
osg::ref_ptr<osgDB::ImagePager> _imagePager;
};
}
#endif
DatabasePager
EventVisitor
GUIEventHandler
ImagePager
osgDB::DatabasePager
Definition DatabasePager:50
osgDB::ImagePager
Definition ImagePager:33
osgViewer::Scene::View
friend class View
Definition Scene:67
osgViewer::Scene::getImagePager
const osgDB::ImagePager * getImagePager() const
Definition Scene:46
osgViewer::Scene::getSceneData
const osg::Node * getSceneData() const
osgViewer::Scene::getDatabasePager
osgDB::DatabasePager * getDatabasePager()
Definition Scene:41
osgViewer::Scene::setSceneData
void setSceneData(osg::Node *node)
osgViewer::Scene::setImagePager
void setImagePager(osgDB::ImagePager *ip)
osgViewer::Scene::getImagePager
osgDB::ImagePager * getImagePager()
Definition Scene:45
osgViewer::Scene::className
virtual const char * className() const
Definition Scene:33
osgViewer::Scene::requiresUpdateSceneGraph
virtual bool requiresUpdateSceneGraph() const
osgViewer::Scene::_databasePager
osg::ref_ptr< osgDB::DatabasePager > _databasePager
Definition Scene:71
osgViewer::Scene::_sceneData
osg::ref_ptr< osg::Node > _sceneData
Definition Scene:69
osgViewer::Scene::getSceneData
osg::Node * getSceneData()
osgViewer::Scene::requiresRedraw
virtual bool requiresRedraw() const
osgViewer::Scene::setDatabasePager
void setDatabasePager(osgDB::DatabasePager *dp)
osgViewer::Scene::Scene
Scene()
osgViewer::Scene::~Scene
virtual ~Scene()
osgViewer::Scene::getScene
static Scene * getScene(osg::Node *node)
osgViewer::Scene::getDatabasePager
const osgDB::DatabasePager * getDatabasePager() const
Definition Scene:42
osgViewer::Scene::_imagePager
osg::ref_ptr< osgDB::ImagePager > _imagePager
Definition Scene:72
osgViewer::Scene::updateSceneGraph
virtual void updateSceneGraph(osg::NodeVisitor &updateVisitor)
osgViewer::Scene::getOrCreateScene
static Scene * getOrCreateScene(osg::Node *node)
osg::NodeVisitor
Definition NodeVisitor:82
osg::Node
Definition Node:72
osg::Referenced
Definition Referenced:44
osg::ref_ptr
Definition ref_ptr:32
osgViewer
Export
OSGVIEWER_EXPORT
#define OSGVIEWER_EXPORT
Definition osgViewer/Export:40