shadowcallback.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * callback class for a shadowed scene * 00003 * * 00004 ***************************************************************************/ 00005 /*************************************************************************** 00006 * Copyright (C) 2005 by Robot Group Leipzig * 00007 * martius@informatik.uni-leipzig.de * 00008 * fhesse@informatik.uni-leipzig.de * 00009 * der@informatik.uni-leipzig.de * 00010 * frankguettler@gmx.de * 00011 * * 00012 * This program is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU General Public License as published by * 00014 * the Free Software Foundation; either version 2 of the License, or * 00015 * (at your option) any later version. * 00016 * * 00017 * This program is distributed in the hope that it will be useful, * 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00020 * GNU General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU General Public License * 00023 * along with this program; if not, write to the * 00024 * Free Software Foundation, Inc., * 00025 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00026 * * 00027 * $Log: shadowcallback.h,v $ 00028 * Revision 1.2 2006/07/14 12:23:36 martius 00029 * selforg becomes HEAD 00030 * 00031 * Revision 1.1.2.1 2006/05/18 11:32:58 robot3 00032 * -first open version 00033 * -note that there is probably a precision problem that causes 00034 * the disappearing of the shadow after some time (after ca. 60 00035 * minutes simulation time) 00036 * -imports optimized 00037 * 00038 * * 00039 ***************************************************************************/ 00040 #ifndef __SHADOWCALLBACK_H 00041 #define __SHADOWCALLBACK_H 00042 00043 00044 #include <osg/CameraNode> 00045 #include <osg/TexGenNode> 00046 00047 00048 class ShadowDrawCallback : public osg::NodeCallback 00049 { 00050 public: 00051 00052 /** 00053 * creates the shadow draw callback for the shadowed scene 00054 * note that the sky and the ground is not shadowed, 00055 * use any playground for having shadows on the roof 00056 */ 00057 ShadowDrawCallback(osg::Vec3 posOfLight, osg::CameraNode* cameraNode, osg::TexGenNode* texgenNode); 00058 00059 virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); 00060 00061 protected: 00062 00063 virtual ~ShadowDrawCallback(); 00064 00065 osg::Vec3 posOfLight; 00066 osg::ref_ptr<osg::CameraNode> _cameraNode; 00067 osg::ref_ptr<osg::TexGenNode> _texgenNode; 00068 00069 }; 00070 00071 #endif

Generated on Tue Jan 16 02:14:38 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8