osghandle.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  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  *                                                                         *
00022  *   $Log: osghandle.h,v $
00023  *   Revision 1.4  2007/07/30 14:13:40  martius
00024  *   drawBoundings moved here
00025  *
00026  *   Revision 1.3  2006/12/11 18:26:55  martius
00027  *   destructor, but without any function
00028  *
00029  *   Revision 1.2  2006/07/14 12:23:56  martius
00030  *   selforg becomes HEAD
00031  *
00032  *   Revision 1.1.2.8  2006/06/29 16:39:56  robot3
00033  *   -you can now see bounding shapes if you type ./start -drawboundings
00034  *   -includes cleared up
00035  *   -abstractobstacle and abstractground have now .cpp-files
00036  *
00037  *   Revision 1.1.2.7  2006/06/15 09:17:09  martius
00038  *   restores changeAlpha
00039  *
00040  *   Revision 1.1.2.6  2006/06/12 13:37:55  robot3
00041  *   added missing const OsgHandle->changeAlpha(const float& alpha);
00042  *
00043  *   Revision 1.1.2.5  2006/01/12 14:39:06  martius
00044  *   transparent stateset
00045  *
00046  *   Revision 1.1.2.4  2005/12/29 16:48:06  martius
00047  *   changeColor
00048  *
00049  *   Revision 1.1.2.3  2005/12/22 14:09:56  martius
00050  *   different tesselhints for different level of detail
00051  *
00052  *   Revision 1.1.2.2  2005/12/13 18:12:20  martius
00053  *   some utils
00054  *
00055  *   Revision 1.1.2.1  2005/12/06 16:18:02  martius
00056  *   handle class for OpenSceneGraph
00057  *
00058  *
00059  ***************************************************************************/
00060 #ifndef __OSGHANDLE_H
00061 #define __OSGHANDLE_H
00062 
00063 #include "osgforwarddecl.h"
00064 #include "color.h"
00065 
00066 namespace lpzrobots {
00067 
00068 /** Data structure for accessing the ODE */
00069 class OsgHandle
00070 {
00071 public:
00072   OsgHandle();
00073   OsgHandle( osg::Group* scene, osg::TessellationHints* tesselhints[3], 
00074              osg::StateSet* normalState, osg::StateSet* transparentState, 
00075              const Color& color);
00076 
00077   ~OsgHandle();
00078 
00079   /// decides whether to draw bounding boxes 
00080   bool drawBoundings;   
00081   osg::Group* scene;  
00082   osg::TessellationHints* tesselhints[3];  
00083   osg::StateSet* normalState;  
00084   osg::StateSet* transparentState;  
00085   Color color;
00086 
00087   // returns a new osghandle with only the color changed
00088   OsgHandle changeColor(const Color& color) const;
00089   // returns a new osghandle with only the alpha channel changed
00090   OsgHandle changeAlpha(double alpha) const; 
00091   
00092 };
00093 
00094 }
00095 
00096 #endif
00097 

Generated on Tue Sep 16 22:00:22 2008 for Robotsystem of the Robot Group Leipzig by  doxygen 1.4.7