extendedViewer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Robot Group Leipzig                             *
00003  *    martius@informatik.uni-leipzig.de                                    *
00004  *    fhesse@informatik.uni-leipzig.de                                     *
00005  *    der@informatik.uni-leipzig.de                                        *
00006  *    frankguettler@gmx.de                                                 *
00007  *                                                                         *
00008  *   This program is free software; you can redistribute it and/or modify  *
00009  *   it under the terms of the GNU General Public License as published by  *
00010  *   the Free Software Foundation; either version 2 of the License, or     *
00011  *   (at your option) any later version.                                   *
00012  *                                                                         *
00013  *   This program is distributed in the hope that it will be useful,       *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00016  *   GNU General Public License for more details.                          *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU General Public License     *
00019  *   along with this program; if not, write to the                         *
00020  *   Free Software Foundation, Inc.,                                       *
00021  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00022  *                                                                         *
00023  *   $Log: extendedViewer.h,v $
00024  *   Revision 1.1.2.1  2006/03/06 16:51:04  robot3
00025  *   written an own viewer because getCurrentCameraManipulator() was not implemented
00026  *
00027  *                                                                         *
00028  ***************************************************************************/
00029 
00030 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2005 Robert Osfield
00031  *
00032  * This library is open source and may be redistributed and/or modified under
00033  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
00034  * (at your option) any later version.  The full license is in LICENSE file
00035  * included with this distribution, and on the openscenegraph.org website.
00036  *
00037  * This library is distributed in the hope that it will be useful,
00038  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00039  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00040  * OpenSceneGraph Public License for more details.
00041  */
00042 
00043 #ifndef OSGPRODUCER_EXTENDEDVIEWER
00044 #define OSGPRODUCER_EXTENDEDVIEWER 1
00045 
00046 #include <osg/NodeVisitor>
00047 #include <osg/ArgumentParser>
00048 #include <osg/ApplicationUsage>
00049 #include <osg/AnimationPath>
00050 #include <osg/RefNodePath>
00051 
00052 #include <osgUtil/IntersectVisitor>
00053 
00054 #include <osgGA/GUIActionAdapter>
00055 #include <osgGA/GUIEventHandler>
00056 #include <osgGA/EventVisitor>
00057 #include <osgGA/KeySwitchMatrixManipulator>
00058 
00059 #include <osgProducer/OsgCameraGroup>
00060 #include <osgProducer/KeyboardMouseCallback>
00061 #include <osgProducer/Viewer>
00062 
00063 #include <list>
00064 
00065 namespace lpzrobots {
00066 
00067   /** A Producer-based viewer. Just like OpenGL, the core of OSG is independent of
00068    *  windowing system. The integration between OSG and some windowing system is
00069    *  delegated to other, non-core parts of OSG (users are also allowed to
00070    *  integrate OSG with any exotic windowing system they happen to use).
00071    *  \c Viewer implements the integration between OSG and Producer, AKA Open
00072    *  Producer (http://www.andesengineering.com/Producer), thus offering an
00073    *  out-of-the-box, scalable and multi-platform abstraction of the windowing
00074    *  system.
00075    */
00076   class ExtendedViewer : public osgProducer::Viewer {
00077     public :
00078 
00079     ExtendedViewer();
00080     
00081     ExtendedViewer(Producer::CameraConfig *cfg);
00082 
00083     ExtendedViewer(const std::string& configFile);
00084 
00085     ExtendedViewer(osg::ArgumentParser& arguments);
00086 
00087     virtual ~ExtendedViewer();
00088 
00089     /** Get the current active camera manipulator.*/
00090     osgGA::MatrixManipulator* getCurrentCameraManipulator() 
00091       { return _keyswitchManipulator->getCurrentMatrixManipulator(); }
00092 
00093     protected :
00094 
00095   };
00096 
00097 }
00098 
00099 #endif

Generated on Tue Apr 4 19:05:03 2006 for Robotsystem from Robot Group Leipzig by  doxygen 1.4.5