Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/BehaviorControl/CommonXabsl2Symbols/MathFunctions.h

Go to the documentation of this file.
00001 /** 
00002 * @file MathFunctions.h
00003 *
00004 * Declaration of class MathFunctions.
00005 *
00006 * @author Matthias Jüngel
00007 */
00008 
00009 #ifndef __MathFunctions_h_
00010 #define __MathFunctions_h_
00011 
00012 #include "../BehaviorControl.h"
00013 #include "Tools/Xabsl2/Xabsl2Engine/Xabsl2Engine.h"
00014 
00015 /**
00016 * The Xabsl2 symbols that are defined in "math-functions.xml"
00017 *
00018 * @author Matthias Jüngel
00019 */ 
00020 class MathFunctions : public Xabsl2FunctionProvider, public BehaviorControlInterfaces
00021 {
00022 public:
00023 /*
00024 * Constructor.
00025 * @param interfaces The paramters of the BehaviorControl module.
00026   */
00027   MathFunctions(const BehaviorControlInterfaces& interfaces);
00028   
00029   /** registers the symbols at an engine */
00030   void registerSymbols(Xabsl2Engine& engine);
00031   
00032     /** updates the symbols */
00033   void update();
00034 
00035   //!@name Input symbols
00036   //!@{
00037   /** calculates the decimal input function "distance-to" */
00038   double distanceTo();
00039   
00040   /** The parameter "distance-to.x" of the function "distance-to" */
00041   double distanceToX;
00042   
00043   /** The parameter "distance-to.y" of the function "distance-to" */
00044   double distanceToY;
00045     
00046   /** calculates the decimal input function "angle-to" */
00047   double angleTo();
00048   
00049   /** The parameter "angle-to.x" of the function "angle-to" */
00050   double angleToX;
00051   
00052   /** The parameter "angle-to.y" of the function "angle-to" */
00053   double angleToY;
00054     
00055   /** The parameter "normalize.angle" of the function "normalize" */
00056   double normalizeAngle;
00057 
00058   /** calculates the decimal input function "sgn" */
00059   double getSgn();
00060 
00061   /** calculates the decimal input function "min" */
00062   double getMin();
00063 
00064   /** calculates the decimal input function "max" */
00065   double getMax();
00066 
00067   /** calculates the decimal input function "abs" */
00068   double getAbs();
00069 
00070   /** calculates the decimal input function "random" */
00071   double getRandom();
00072 
00073   /** calculates the decimal input function "sin" */
00074   double getSin();
00075 
00076   /** calculates the decimal input function "cos" */
00077   double getCos();
00078 
00079   /** calculates the decimal input function "normalize" */
00080   double getNormalize();
00081 
00082   /** The parameter "sgn.value" of the function "sgn" */
00083   double sgnValue;
00084 
00085   /** The parameter "abs.value" of the function "abs" */
00086   double absValue;
00087 
00088   /** The parameter "min0.value" of the function "min" */
00089   double min0Value;
00090 
00091   /** The parameter "min1.value" of the function "min" */
00092   double min1Value;
00093 
00094   /** The parameter "max.value0" of the function "max" */
00095   double max0Value;
00096 
00097   /** The parameter "max.value1" of the function "max" */
00098   double max1Value;
00099 
00100   /** The parameter "*.alpha" of the function "sin" and "cos" */
00101   double alphaValue;
00102 
00103   /** calculates the value for the symbol "freeze.value" */
00104   double getFrozenValue(); 
00105 
00106   /** The parameter "freeze.value" of the function "freeze" */
00107   double valueToFreeze;
00108 
00109   /** The function returns 1 if the value is in the interval between a and b (order doesn't matter) */
00110   double isInInterval();
00111 
00112   double isInIntervalValue;
00113   double isInIntervalA;
00114   double isInIntervalB;
00115 
00116 private:
00117 
00118   /* A flag to release frozenValue*/
00119   int unFreezeValue;
00120 
00121   /* The stored frozen value*/
00122   double frozenValue;
00123 
00124   //!@}
00125 };
00126 
00127 
00128 #endif // __MathFunctions_h_
00129 
00130 /*
00131 * Change Log
00132 * 
00133 * $Log: MathFunctions.h,v $
00134 * Revision 1.1.1.1  2004/05/22 17:16:59  cvsadm
00135 * created new repository GT2004_WM
00136 *
00137 * Revision 1.5  2004/04/08 15:33:01  wachter
00138 * GT04 checkin of Microsoft-Hellounds
00139 *
00140 * Revision 1.4  2004/03/16 14:00:21  juengel
00141 * Integrated Improvments from "Günne"
00142 * -ATH2004ERS7Behavior
00143 * -ATHHeadControl
00144 * -KickSelectionTable
00145 * -KickEditor
00146 *
00147 * Revision 1.3  2004/03/08 00:58:56  roefer
00148 * Interfaces should be const
00149 *
00150 * Revision 1.2  2004/03/11 17:32:20  loetzsch
00151 * added input function "angle-to"
00152 *
00153 * Revision 1.2  2004/01/08 13:51:22  loetzsch
00154 * added input function sin and cos
00155 *
00156 * Revision 1.1  2003/10/22 22:18:44  loetzsch
00157 * prepared the cloning of the GT2003BehaviorControl
00158 *
00159 * Revision 1.1  2003/10/06 13:39:28  cvsadm
00160 * Created GT2004 (M.J.)
00161 *
00162 * Revision 1.2  2003/07/02 17:48:01  risler
00163 * added math function abs
00164 *
00165 * Revision 1.1.1.1  2003/07/02 09:40:23  cvsadm
00166 * created new repository for the competitions in Padova from the 
00167 * tamara CVS (Tuesday 2:00 pm)
00168 *
00169 * removed unused solutions
00170 *
00171 * Revision 1.3  2003/06/24 10:08:23  risler
00172 * added function normalize
00173 *
00174 * Revision 1.2  2003/06/19 14:48:24  risler
00175 * symbol random added
00176 *
00177 * Revision 1.1  2003/05/07 17:54:39  juengel
00178 * Added missing symbols to GT2003BehaviorControl.
00179 *
00180 */
00181 

Generated on Thu Sep 23 19:57:25 2004 for GT2004 by doxygen 1.3.6