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 * * 00023 * * 00024 * $Log: osghandle.cpp,v $ 00025 * Revision 1.1.2.4 2006/01/12 14:39:06 martius 00026 * transparent stateset 00027 * 00028 * Revision 1.1.2.3 2005/12/29 16:48:06 martius 00029 * changeColor 00030 * 00031 * Revision 1.1.2.2 2005/12/22 14:10:14 martius 00032 * different tesselhints 00033 * 00034 * Revision 1.1.2.1 2005/12/13 18:12:20 martius 00035 * some utils 00036 * 00037 * 00038 * * 00039 ***************************************************************************/ 00040 00041 00042 #include <osg/Group> 00043 #include <osg/ShapeDrawable> 00044 #include "osghandle.h" 00045 00046 namespace lpzrobots { 00047 00048 OsgHandle::OsgHandle( ) {} 00049 OsgHandle::OsgHandle( osg::Group* scene, osg::TessellationHints* tesselhints[3], 00050 osg::StateSet* normalState, osg::StateSet* transparentState, 00051 const Color& color){ 00052 this->scene = scene; 00053 for(int i=0; i<3; i++){ 00054 this->tesselhints[i] = tesselhints[i]; 00055 } 00056 this->normalState = normalState; 00057 this->transparentState = transparentState; 00058 this->color = color; 00059 } 00060 00061 OsgHandle OsgHandle::changeColor(const Color& color) const { 00062 OsgHandle copy(*this); 00063 copy.color = color; 00064 return copy; 00065 } 00066 00067 }