OpenSceneGraph/include/osgProducer/OsgSceneHandler

53 lines
1.5 KiB
Plaintext
Raw Normal View History

/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2003 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 OSGPRODUCER_OSGSCENEHANDLER
#define OSGPRODUCER_OSGSCENEHANDLER 1
#include <osgProducer/Export>
#include <Producer/Camera>
#include <osgUtil/SceneView>
#include <osg/Matrix>
namespace osgProducer {
class OSGPRODUCER_EXPORT OsgSceneHandler : public Producer::Camera::SceneHandler, public osgUtil::SceneView
{
public :
OsgSceneHandler(osg::DisplaySettings *ds = NULL);
/// override the init method to force it be run one at a time.
virtual void init();
virtual void clear(Producer::Camera& camera);
virtual void cull(Producer::Camera& camera);
virtual void draw(Producer::Camera& camera);
void setContextID( int id );
protected:
virtual ~OsgSceneHandler() {}
osg::ref_ptr<osg::RefMatrix> mm;
osg::ref_ptr<osg::RefMatrix> pm;
};
}
#endif