/* -*-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_SCENEHANDLER
#define OSGPRODUCER_SCENEHANDLER 1

#include <osgProducer/Export>

#include <Producer/Camera>
#include <osgUtil/SceneView>
#include <osg/Matrix>

namespace osgProducer {

class OSGPRODUCER_EXPORT SceneHandler : public Producer::Camera::SceneHandler, public osgUtil::SceneView
{
    public :
    
        SceneHandler( osg::DisplaySettings *ds = NULL);

        /// override the init method to force it be run one at a time.
        virtual void init();

        void cull(Producer::Camera &cam);

        void draw(Producer::Camera &);

        void setContextID( int id );


    protected:
    
        virtual ~SceneHandler() {}
    
        osg::ref_ptr<osg::RefMatrix> mm; 
        osg::ref_ptr<osg::RefMatrix> pm;
};

}

#endif
