Crazy Eddies GUI System 0.7.5

CEGUIBasicInterpolators.h

00001 /***********************************************************************
00002     filename:   CEGUIBasicInterpolators.h
00003     created:    7/8/2010
00004     author:     Martin Preisler
00005 
00006     purpose:    Defines basic integrated interpolators
00007 *************************************************************************/
00008 /***************************************************************************
00009  *   Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
00010  *
00011  *   Permission is hereby granted, free of charge, to any person obtaining
00012  *   a copy of this software and associated documentation files (the
00013  *   "Software"), to deal in the Software without restriction, including
00014  *   without limitation the rights to use, copy, modify, merge, publish,
00015  *   distribute, sublicense, and/or sell copies of the Software, and to
00016  *   permit persons to whom the Software is furnished to do so, subject to
00017  *   the following conditions:
00018  *
00019  *   The above copyright notice and this permission notice shall be
00020  *   included in all copies or substantial portions of the Software.
00021  *
00022  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00023  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00024  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00025  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00026  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00027  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00028  *   OTHER DEALINGS IN THE SOFTWARE.
00029  ***************************************************************************/
00030 #ifndef _CEGUIBasicInterpolators_h_
00031 #define _CEGUIBasicInterpolators_h_
00032 
00033 #include "CEGUIInterpolator.h"
00034 
00035 // Start of CEGUI namespace section
00036 namespace CEGUI
00037 {
00038 
00039 // this does no interpolation! it just chooses left or right value based on
00040 // position!
00041 class CEGUIEXPORT StringInterpolator : public Interpolator
00042 {
00043 public:
00044     virtual ~StringInterpolator(void) {};
00045 
00046     virtual const String& getType() const;
00047 
00048     virtual String interpolateAbsolute(const String& value1,
00049                                        const String& value2,
00050                                        float position);
00051     virtual String interpolateRelative(const String& base,
00052                                        const String& value1,
00053                                        const String& value2,
00054                                        float position);
00055     virtual String interpolateRelativeMultiply(const String& base,
00056             const String& value1,
00057             const String& value2,
00058             float position);
00059 };
00060 
00061 class CEGUIEXPORT FloatInterpolator : public Interpolator
00062 {
00063 public:
00064     virtual ~FloatInterpolator(void) {};
00065 
00066     virtual const String& getType() const;
00067 
00068     virtual String interpolateAbsolute(const String& value1,
00069                                        const String& value2,
00070                                        float position);
00071     virtual String interpolateRelative(const String& base,
00072                                        const String& value1,
00073                                        const String& value2,
00074                                        float position);
00075     virtual String interpolateRelativeMultiply(const String& base,
00076             const String& value1,
00077             const String& value2,
00078             float position);
00079 };
00080 
00081 class CEGUIEXPORT UintInterpolator : public Interpolator
00082 {
00083 public:
00084     virtual ~UintInterpolator(void) {};
00085 
00086     virtual const String& getType() const;
00087 
00088     virtual String interpolateAbsolute(const String& value1,
00089                                        const String& value2,
00090                                        float position);
00091     virtual String interpolateRelative(const String& base,
00092                                        const String& value1,
00093                                        const String& value2,
00094                                        float position);
00095     virtual String interpolateRelativeMultiply(const String& base,
00096             const String& value1,
00097             const String& value2,
00098             float position);
00099 };
00100 
00101 class CEGUIEXPORT IntInterpolator : public Interpolator
00102 {
00103 public:
00104     virtual ~IntInterpolator(void) {};
00105 
00106     virtual const String& getType() const;
00107 
00108     virtual String interpolateAbsolute(const String& value1,
00109                                        const String& value2,
00110                                        float position);
00111     virtual String interpolateRelative(const String& base,
00112                                        const String& value1,
00113                                        const String& value2,
00114                                        float position);
00115     virtual String interpolateRelativeMultiply(const String& base,
00116             const String& value1,
00117             const String& value2,
00118             float position);
00119 };
00120 
00121 // this does no interpolation! it just chooses left or right value based on
00122 // position!
00123 class CEGUIEXPORT BoolInterpolator : public Interpolator
00124 {
00125 public:
00126     virtual ~BoolInterpolator(void) {};
00127 
00128     virtual const String& getType() const;
00129 
00130     virtual String interpolateAbsolute(const String& value1,
00131                                        const String& value2,
00132                                        float position);
00133     virtual String interpolateRelative(const String& base,
00134                                        const String& value1,
00135                                        const String& value2,
00136                                        float position);
00137     virtual String interpolateRelativeMultiply(const String& base,
00138             const String& value1,
00139             const String& value2,
00140             float position);
00141 };
00142 
00143 class CEGUIEXPORT SizeInterpolator : public Interpolator
00144 {
00145 public:
00146     virtual ~SizeInterpolator(void) {};
00147 
00148     virtual const String& getType() const;
00149 
00150     virtual String interpolateAbsolute(const String& value1,
00151                                        const String& value2,
00152                                        float position);
00153     virtual String interpolateRelative(const String& base,
00154                                        const String& value1,
00155                                        const String& value2,
00156                                        float position);
00157     virtual String interpolateRelativeMultiply(const String& base,
00158             const String& value1,
00159             const String& value2,
00160             float position);
00161 };
00162 
00163 class CEGUIEXPORT PointInterpolator : public Interpolator
00164 {
00165 public:
00166     virtual ~PointInterpolator(void) {};
00167 
00168     virtual const String& getType() const;
00169 
00170     virtual String interpolateAbsolute(const String& value1,
00171                                        const String& value2,
00172                                        float position);
00173     virtual String interpolateRelative(const String& base,
00174                                        const String& value1,
00175                                        const String& value2,
00176                                        float position);
00177     virtual String interpolateRelativeMultiply(const String& base,
00178             const String& value1,
00179             const String& value2,
00180             float position);
00181 };
00182 
00183 class CEGUIEXPORT Vector3Interpolator : public Interpolator
00184 {
00185 public:
00186     virtual ~Vector3Interpolator(void) {};
00187 
00188     virtual const String& getType() const;
00189 
00190     virtual String interpolateAbsolute(const String& value1,
00191                                        const String& value2,
00192                                        float position);
00193     virtual String interpolateRelative(const String& base,
00194                                        const String& value1,
00195                                        const String& value2,
00196                                        float position);
00197     virtual String interpolateRelativeMultiply(const String& base,
00198             const String& value1,
00199             const String& value2,
00200             float position);
00201 };
00202 
00203 class CEGUIEXPORT RectInterpolator : public Interpolator
00204 {
00205 public:
00206     virtual ~RectInterpolator(void) {};
00207 
00208     virtual const String& getType() const;
00209 
00210     virtual String interpolateAbsolute(const String& value1,
00211                                        const String& value2,
00212                                        float position);
00213     virtual String interpolateRelative(const String& base,
00214                                        const String& value1,
00215                                        const String& value2,
00216                                        float position);
00217     virtual String interpolateRelativeMultiply(const String& base,
00218             const String& value1,
00219             const String& value2,
00220             float position);
00221 };
00222 
00223 class CEGUIEXPORT ColourInterpolator : public Interpolator
00224 {
00225 public:
00226     virtual ~ColourInterpolator(void) {};
00227 
00228     virtual const String& getType() const;
00229 
00230     virtual String interpolateAbsolute(const String& value1,
00231                                        const String& value2,
00232                                        float position);
00233     virtual String interpolateRelative(const String& base,
00234                                        const String& value1,
00235                                        const String& value2,
00236                                        float position);
00237     virtual String interpolateRelativeMultiply(const String& base,
00238             const String& value1,
00239             const String& value2,
00240             float position);
00241 };
00242 
00243 class CEGUIEXPORT ColourRectInterpolator : public Interpolator
00244 {
00245 public:
00246     virtual ~ColourRectInterpolator(void) {};
00247 
00248     virtual const String& getType() const;
00249 
00250     virtual String interpolateAbsolute(const String& value1,
00251                                        const String& value2,
00252                                        float position);
00253     virtual String interpolateRelative(const String& base,
00254                                        const String& value1,
00255                                        const String& value2,
00256                                        float position);
00257     virtual String interpolateRelativeMultiply(const String& base,
00258             const String& value1,
00259             const String& value2,
00260             float position);
00261 };
00262 
00263 class CEGUIEXPORT UDimInterpolator : public Interpolator
00264 {
00265 public:
00266     virtual ~UDimInterpolator(void) {};
00267 
00268     virtual const String& getType() const;
00269 
00270     virtual String interpolateAbsolute(const String& value1,
00271                                        const String& value2,
00272                                        float position);
00273     virtual String interpolateRelative(const String& base,
00274                                        const String& value1,
00275                                        const String& value2,
00276                                        float position);
00277     virtual String interpolateRelativeMultiply(const String& base,
00278             const String& value1,
00279             const String& value2,
00280             float position);
00281 };
00282 
00283 class CEGUIEXPORT UVector2Interpolator : public Interpolator
00284 {
00285 public:
00286     virtual ~UVector2Interpolator(void) {};
00287 
00288     virtual const String& getType() const;
00289 
00290     virtual String interpolateAbsolute(const String& value1,
00291                                        const String& value2,
00292                                        float position);
00293     virtual String interpolateRelative(const String& base,
00294                                        const String& value1,
00295                                        const String& value2,
00296                                        float position);
00297     virtual String interpolateRelativeMultiply(const String& base,
00298             const String& value1,
00299             const String& value2,
00300             float position);
00301 };
00302 
00303 class CEGUIEXPORT URectInterpolator : public Interpolator
00304 {
00305 public:
00306     virtual ~URectInterpolator(void) {};
00307 
00308     virtual const String& getType() const;
00309 
00310     virtual String interpolateAbsolute(const String& value1,
00311                                        const String& value2,
00312                                        float position);
00313     virtual String interpolateRelative(const String& base,
00314                                        const String& value1,
00315                                        const String& value2,
00316                                        float position);
00317     virtual String interpolateRelativeMultiply(const String& base,
00318             const String& value1,
00319             const String& value2,
00320             float position);
00321 };
00322 
00323 class CEGUIEXPORT UBoxInterpolator : public Interpolator
00324 {
00325 public:
00326     virtual ~UBoxInterpolator(void) {};
00327 
00328     virtual const String& getType() const;
00329 
00330     virtual String interpolateAbsolute(const String& value1,
00331                                        const String& value2,
00332                                        float position);
00333     virtual String interpolateRelative(const String& base,
00334                                        const String& value1,
00335                                        const String& value2,
00336                                        float position);
00337     virtual String interpolateRelativeMultiply(const String& base,
00338             const String& value1,
00339             const String& value2,
00340             float position);
00341 };
00342 
00343 } // End of  CEGUI namespace section
00344 
00345 #endif  // end of guard _CEGUIBasicInterpolators_h_
00346