Robot Simulator of the Robotics Group for Self-Organization of Control: osghandle.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- File List
- File Members

# 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.6  2009/07/30 11:23:45  guettler
    00024  *   new noGraphics state for OSGPrimitives
    00025  *
    00026  *   Revision 1.5  2009/07/29 14:19:49  jhoffmann
    00027  *   Various bugfixing, remove memory leaks (with valgrind->memcheck / alleyoop)
    00028  *
    00029  *   Revision 1.4  2007/07/30 14:13:40  martius
    00030  *   drawBoundings moved here
    00031  *
    00032  *   Revision 1.3  2006/12/11 18:26:55  martius
    00033  *   destructor, but without any function
    00034  *
    00035  *   Revision 1.2  2006/07/14 12:23:56  martius
    00036  *   selforg becomes HEAD
    00037  *
    00038  *   Revision 1.1.2.8  2006/06/29 16:39:56  robot3
    00039  *   -you can now see bounding shapes if you type ./start -drawboundings
    00040  *   -includes cleared up
    00041  *   -abstractobstacle and abstractground have now .cpp-files
    00042  *
    00043  *   Revision 1.1.2.7  2006/06/15 09:17:09  martius
    00044  *   restores changeAlpha
    00045  *
    00046  *   Revision 1.1.2.6  2006/06/12 13:37:55  robot3
    00047  *   added missing const OsgHandle->changeAlpha(const float& alpha);
    00048  *
    00049  *   Revision 1.1.2.5  2006/01/12 14:39:06  martius
    00050  *   transparent stateset
    00051  *
    00052  *   Revision 1.1.2.4  2005/12/29 16:48:06  martius
    00053  *   changeColor
    00054  *
    00055  *   Revision 1.1.2.3  2005/12/22 14:09:56  martius
    00056  *   different tesselhints for different level of detail
    00057  *
    00058  *   Revision 1.1.2.2  2005/12/13 18:12:20  martius
    00059  *   some utils
    00060  *
    00061  *   Revision 1.1.2.1  2005/12/06 16:18:02  martius
    00062  *   handle class for OpenSceneGraph
    00063  *
    00064  *
    00065  ***************************************************************************/
    00066 #ifndef __OSGHANDLE_H
    00067 #define __OSGHANDLE_H
    00068
    00069 #include "osgforwarddecl.h"
    00070 #include "color.h"
    00071
    00072 namespace lpzrobots {
    00073
    00074 /** Data structure for accessing the ODE */
    00075 class OsgHandle
    00076 {
    00077 public:
    00078   OsgHandle();
    00079
    00080   OsgHandle( osg::Group* scene, osg::TessellationHints* tesselhints[3],
    00081              osg::StateSet* normalState, osg::StateSet* transparentState,
    00082              const Color& color);
    00083
    00084   ~OsgHandle();
    00085
    00086   /// decides whether to draw bounding boxes
    00087   bool drawBoundings;
    00088   osg::Group* scene;
    00089   osg::TessellationHints* tesselhints[3];
    00090   osg::StateSet* normalState;
    00091   osg::StateSet* transparentState;
    00092   Color color;
    00093   bool noGraphics;
    00094
    00095   // returns a new osghandle with only the color changed
    00096   OsgHandle changeColor(const Color& color) const;
    00097   // returns a new osghandle with only the alpha channel changed
    00098   OsgHandle changeAlpha(double alpha) const;
    00099
    00100 };
    00101
    00102 }
    00103
    00104 #endif
    00105