2003-01-21 21:14:29 +08:00
|
|
|
/* -*-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.
|
|
|
|
*/
|
|
|
|
|
2003-02-25 20:28:16 +08:00
|
|
|
#ifndef OSGPRODUCER_OSGSCENEHANDLER
|
|
|
|
#define OSGPRODUCER_OSGSCENEHANDLER 1
|
2003-01-18 02:34:35 +08:00
|
|
|
|
|
|
|
#include <osgProducer/Export>
|
|
|
|
|
|
|
|
#include <Producer/Camera>
|
|
|
|
#include <osgUtil/SceneView>
|
|
|
|
#include <osg/Matrix>
|
|
|
|
|
|
|
|
namespace osgProducer {
|
|
|
|
|
2003-02-25 20:28:16 +08:00
|
|
|
class OSGPRODUCER_EXPORT OsgSceneHandler : public Producer::Camera::SceneHandler, public osgUtil::SceneView
|
2003-01-18 02:34:35 +08:00
|
|
|
{
|
|
|
|
public :
|
2003-01-19 06:07:59 +08:00
|
|
|
|
2003-02-25 20:28:16 +08:00
|
|
|
OsgSceneHandler( osg::DisplaySettings *ds = NULL);
|
2003-01-18 02:34:35 +08:00
|
|
|
|
2003-01-21 04:33:50 +08:00
|
|
|
/// override the init method to force it be run one at a time.
|
|
|
|
virtual void init();
|
|
|
|
|
2003-01-19 06:07:59 +08:00
|
|
|
void cull(Producer::Camera &cam);
|
2003-01-18 02:34:35 +08:00
|
|
|
|
2003-01-19 06:07:59 +08:00
|
|
|
void draw(Producer::Camera &);
|
2003-01-18 02:34:35 +08:00
|
|
|
|
2003-01-19 06:07:59 +08:00
|
|
|
void setContextID( int id );
|
2003-01-18 02:34:35 +08:00
|
|
|
|
|
|
|
|
2003-01-19 06:07:59 +08:00
|
|
|
protected:
|
|
|
|
|
2003-02-25 20:28:16 +08:00
|
|
|
virtual ~OsgSceneHandler() {}
|
2003-01-19 06:07:59 +08:00
|
|
|
|
2003-01-18 02:34:35 +08:00
|
|
|
osg::ref_ptr<osg::RefMatrix> mm;
|
|
|
|
osg::ref_ptr<osg::RefMatrix> pm;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|