src/fogcube.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by                                                 *
00003  *         Pierre-yves JEZEQUEL, Julien MICHOT, Loic MOISAN,               *
00004  *         Julien PAPILLON, Sebastien PINEAUD, Barthelemy SERRES           *
00005  *                                                                         *
00006  *   https://sourceforge.net/projects/anidam                               *
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 #ifndef FOGCUBE_H
00024 #define FOGCUBE_H
00025 
00026 #include <iostream>
00027 #include <osg/Fog>
00028 #include <osgUtil/IntersectVisitor>
00029 #include <osgUtil/SmoothingVisitor>
00030 
00031 
00035 class FogCube : public osg::Fog
00036 {
00037         private:
00039                 float xmin,xmax,ymin,ymax,zmin,zmax;
00041                 osg::Node* node; 
00042         public:
00043                 FogCube();
00044                 ~FogCube();
00046                 void setCube(float xmin,float xmax,float ymin,float ymax,float zmin,float zmax);
00048                 void setNode(osg::Node* node);
00050                 bool addFog(osg::Node* node);
00052                 void addStaticFogCoords(osg::Node* node);
00054                 void addDynamicFogCoords(osg::Node* node);
00055                 
00057                 osg::Node* createMultiplesDrawables();
00058                 
00059         private:
00060                 bool isInTheCube( float x,float y,float z);
00061 };
00062 
00063 #endif

Generated on Tue Jun 5 16:56:48 2007 for Anidam by  doxygen 1.5.1