GLImageModifier.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2009
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ////////////////////////////////////////////////////////////////////////////////
00020 
00021 #if !defined(AFX_ImageMODIFIER_H__3C6E8BBF_1AB2_4847_BEB1_934C97C76F05__INCLUDED_)
00022 #define AFX_ImageMODIFIER_H__3C6E8BBF_1AB2_4847_BEB1_934C97C76F05__INCLUDED_
00023 
00024 #include <image/Image.h>
00025 #include <landscapemap/HeightMap.h>
00026 #include <common/Vector.h>
00027 
00028 class ScorchedContext;
00029 namespace ImageModifier  
00030 {
00031         bool findIntersection(HeightMap &hMap,
00032                                                         Vector start,
00033                                                         Vector end,
00034                                                         float &dist,
00035                                                         float stopDist);
00036 
00037         void tileBitmap(Image &src, Image &dest);
00038 
00039         void addLightMapToBitmap(Image &bitmap, 
00040                                                         HeightMap &hMap,
00041                                                         Vector &sunPos,
00042                                                         Vector &ambience,
00043                                                         Vector &diffuse,
00044                                                         ProgressCounter *counter = 0);
00045 
00046         void addHeightToBitmap(HeightMap &hMap,
00047                                                         Image &destBitmap, 
00048                                                         Image &destSplat1Bitmap,
00049                                                         Image &destSplat2Bitmap,
00050                                                         Image &slopeBitmap,
00051                                                         Image &shoreBitmap,
00052                                                         Image **heightBitmaps,
00053                                                         int numberSources,
00054                                                         int destBitmapScaleSize,
00055                                                         ProgressCounter *counter = 0);
00056 
00057         void redBitmap(
00058                 Image &destBitmap);
00059 
00060         void addTexturesToBitmap(
00061                 Image &destBitmap,
00062                 Image &slopeBitmap,
00063                 Image &shoreBitmap,
00064                 Image **heightBitmaps,
00065                 int numberSources);
00066 
00067 
00068         void addWaterToBitmap(HeightMap &hMap,
00069                                                         Image &destBitmap,
00070                                                         Image &waterBitmap,
00071                                                         float waterHeight);
00072 
00073         void removeWaterFromBitmap(HeightMap &hMap,
00074                                                         Image &srcBitmap,
00075                                                         Image &destBitmap,
00076                                                         Image &alphaBitmap,
00077                                                         float waterHeight);
00078 
00079         ImageHandle makeArenaBitmap();
00080         ImageHandle makeArenaSurroundBitmap();
00081 
00082         void addBorderToBitmap(Image &destBitmap,
00083                 int borderWidth,
00084                 float colors[3]);
00085 
00086         void makeBitmapTransparent(Image &output,
00087                 Image &input,
00088                 Image &mask);
00089 
00090         void addCircleToLandscape(
00091                 ScorchedContext &context,
00092                 float sx, float sy, float sw, float opacity);
00093         void addCircle(Image &destBitmap,
00094                 float sx, float sy, float sw, float opacity);
00095 
00096         void addBitmapToLandscape(
00097                 ScorchedContext &context,
00098                 Image &srcBitmap,
00099                 float sx, float sy, float scalex, float scaley, 
00100                 bool commit = false);
00101         void addBitmap(Image &destBitmap,
00102                 Image &srcBitmap,
00103                 float sx, float sy, float scalex, float scaley, 
00104                 bool commit);
00105 
00106         void scalePlanBitmap(Image &destBitmap,
00107                 Image &srcBitmap,
00108                 int landscapeX, int landscapeY);
00109 };
00110 
00111 #endif // !defined(AFX_ImageMODIFIER_H__3C6E8BBF_1AB2_4847_BEB1_934C97C76F05__INCLUDED_)

Generated on Mon Feb 16 15:14:44 2009 for Scorched3D by  doxygen 1.5.3