00001 // ---------------------------------------------------------------------------- 00002 // 00003 // $Id$ 00004 // 00005 // Copyright 2008, 2009, 2010, 2011, 2012 Antonio Franchi and Paolo Stegagno 00006 // 00007 // This file is part of MIP. 00008 // 00009 // MIP is free software: you can redistribute it and/or modify 00010 // it under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation, either version 3 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // MIP is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>. 00021 // 00022 // Contact info: franchi@diag.uniroma1.it stegagno@diag.uniroma1.it 00023 // 00024 // ---------------------------------------------------------------------------- 00025 00026 00027 /* 00028 * utils.h 00029 * 00030 * Copyright 2007 player <player@joey> 00031 * 00032 * This program is free software; you can redistribute it and/or modify 00033 * it under the terms of the GNU General Public License as published by 00034 * the Free Software Foundation; either version 2 of the License, or 00035 * (at your option) any later version. 00036 * 00037 * This program is distributed in the hope that it will be useful, 00038 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00039 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00040 * GNU General Public License for more details. 00041 * 00042 * You should have received a copy of the GNU General Public License 00043 * along with this program; if not, write to the Free Software 00044 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00045 */ 00046 00047 00048 #ifndef __UTILS_H 00049 #define __UTILS_H 00050 00051 #include <libplayerc++/playerc++.h> 00052 #include <iostream> 00053 #include <vector> 00054 #include <assert.h> 00055 #include <math.h> 00056 00057 00058 using namespace PlayerCc; 00059 using namespace std; 00060 00061 00062 // int sign( const double num ) 00063 // { 00064 // if( num > 0 ) 00065 // return 1; 00066 // if( num < 0 ) 00067 // return -1; 00068 // return 0; 00069 // } 00070 00071 // void initColors( ) 00072 // { 00073 // gColorFrontier.alpha = 255; 00074 // gColorFrontier.red = 210; 00075 // gColorFrontier.green = 0; 00076 // gColorFrontier.blue = 0; 00077 // 00078 // gColorObstacle.alpha = 255; 00079 // gColorObstacle.red = 170; 00080 // gColorObstacle.green = 255; 00081 // gColorObstacle.blue = 170; 00082 // 00083 // gColorFreeArc.alpha = 255; 00084 // gColorFreeArc.red = 170; 00085 // gColorFreeArc.green = 170; 00086 // gColorFreeArc.blue = 255; 00087 // 00088 // gColorCapture.alpha = 255; 00089 // gColorCapture.red = 0; 00090 // gColorCapture.green = 0; 00091 // gColorCapture.blue = 0; 00092 // 00093 // player_color_t color; 00094 // 00095 // // 0 Chartreuse 00096 // color.alpha = 255; 00097 // color.red = 127; 00098 // color.green = 255; 00099 // color.blue = 0; 00100 // 00101 // gColorGreen = color; 00102 // 00103 // gColorVec.push_back(color); 00104 // 00105 // // 1 Blue 00106 // color.alpha = 255; 00107 // color.red = 0; 00108 // color.green = 0; 00109 // color.blue = 255; 00110 // 00111 // gColorBlue = color; 00112 // 00113 // gColorVec.push_back(color); 00114 // 00115 // // 2 Coral 00116 // color.alpha = 255; 00117 // color.red = 255; 00118 // color.green = 127; 00119 // color.blue = 80; 00120 // 00121 // gColorVec.push_back(color); 00122 // 00123 // // 3 Cyan 00124 // color.alpha = 255; 00125 // color.red = 0; 00126 // color.green = 255; 00127 // color.blue = 255; 00128 // 00129 // gColorVec.push_back(color); 00130 // 00131 // // 4 Dark magenta 00132 // color.alpha = 255; 00133 // color.red = 139; 00134 // color.green = 0; 00135 // color.blue = 139; 00136 // 00137 // gColorVec.push_back(color); 00138 // 00139 // // 5 Dark cyan 00140 // color.alpha = 255; 00141 // color.red = 0; 00142 // color.green = 139; 00143 // color.blue = 139; 00144 // 00145 // gColorVec.push_back(color); 00146 // 00147 // // 6 Gold 00148 // color.alpha = 255; 00149 // color.red = 255; 00150 // color.green = 215; 00151 // color.blue = 0; 00152 // 00153 // gColorVec.push_back(color); 00154 // 00155 // // 7 Forest green 00156 // color.alpha = 255; 00157 // color.red = 34; 00158 // color.green = 139; 00159 // color.blue = 34; 00160 // 00161 // gColorVec.push_back(color); 00162 // 00163 // // 8 Deep pink 00164 // color.alpha = 255; 00165 // color.red = 255; 00166 // color.green = 20; 00167 // color.blue = 147; 00168 // 00169 // gColorRed = color; 00170 // 00171 // gColorVec.push_back(color); 00172 // 00173 // // 9 Peru 00174 // color.alpha = 255; 00175 // color.red = 205; 00176 // color.green = 133; 00177 // color.blue = 63; 00178 // 00179 // gColorVec.push_back(color); 00180 // 00181 // // 10 Dark Gray 00182 // color.alpha = 255; 00183 // color.red = 169; 00184 // color.green = 169; 00185 // color.blue = 169; 00186 // 00187 // gColorVec.push_back(color); 00188 // 00189 // // 11 Silver 00190 // color.alpha = 255; 00191 // color.red = 192; 00192 // color.green = 192; 00193 // color.blue = 192; 00194 // 00195 // gColorGray = color; 00196 // 00197 // gColorVec.push_back(color); 00198 // } 00199 00200 #endif //UTILS_H