00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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_)