00001 /* 00002 * lib-controler-gmap : Le contrôleur de 3-G-cartes, surcouche de lib-controler. 00003 * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC 00004 * http://www.sic.sp2mi.univ-poitiers.fr/ 00005 * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS, 00006 * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/ 00007 * 00008 * This file is part of lib-controler-gmap 00009 * 00010 * This program is free software: you can redistribute it and/or modify 00011 * it under the terms of the GNU Lesser General Public License as published by 00012 * the Free Software Foundation, either version 3 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public License 00021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 //****************************************************************************** 00025 #include "controler-gmap.hh" 00026 #include "view-precompile.hh" 00027 #include "precompile.hh" 00028 #include "parameter-gmap-vertex.hh" 00029 #include "parameter-aimed-point.hh" 00030 #include "parameter-axis.hh" 00031 #include "parameter-dart.hh" 00032 #include "parameter-face.hh" 00033 #include "parameter-grid.hh" 00034 #include "parameter-normal-vector.hh" 00035 #include "parameter-object-transformation.hh" 00036 #include "parameter-preview.hh" 00037 #include "parameter-sew.hh" 00038 #include "parameter-spamod.hh" 00039 #include "parameter-vertex.hh" 00040 using namespace std; 00041 using namespace GMap3d; 00042 //****************************************************************************** 00043 CParameterGMapVertex* CControlerGMap::getParameterGMapVertex() const 00044 { return FParameterGMapVertex; } 00045 //****************************************************************************** 00046 CParameterSelection* CControlerGMap::getParameterSelection() const 00047 { return FParameterSelection; } 00048 //****************************************************************************** 00049 CParameterCreation* CControlerGMap::getParameterCreation() const 00050 { return FParameterCreation; } 00051 //****************************************************************************** 00052 CParameterPolylinePosition* CControlerGMap::getParameterPolylinePosition() const 00053 { return FParameterPolylinePosition; } 00054 //****************************************************************************** 00055 CParameterOperations* CControlerGMap::getParameterOperations() const 00056 { return FParameterOperations; } 00057 //****************************************************************************** 00058 CParameterObjectPosition* CControlerGMap::getParameterObjectPosition(int AIndex) const 00059 { 00060 assert( 0<=AIndex && AIndex<NB_PREDEFINED_OBJECTS ); 00061 return FParameterObjectPosition[AIndex]; 00062 } 00063 //****************************************************************************** 00064 CParameterObjectPosition* CControlerGMap::getParameterPolygonPosition() const 00065 { return FParameterObjectPosition[OBJECT_POLYGON]; } 00066 //****************************************************************************** 00067 CParameterObjectPosition* CControlerGMap::getParameterMeshPosition() const 00068 { return FParameterObjectPosition[OBJECT_MESH]; } 00069 //****************************************************************************** 00070 CParameterObjectPosition* CControlerGMap::getParameterSpherePosition() const 00071 { return FParameterObjectPosition[OBJECT_SPHERE]; } 00072 //****************************************************************************** 00073 CParameterObjectPosition* CControlerGMap::getParameterCylinderPosition() const 00074 { return FParameterObjectPosition[OBJECT_CYLINDER]; } 00075 //****************************************************************************** 00076 CParameterObjectPosition* CControlerGMap::getParameterPyramidPosition() const 00077 { return FParameterObjectPosition[OBJECT_PYRAMID]; } 00078 //****************************************************************************** 00079 CParameterObjectPosition* CControlerGMap::getParameterTorusPosition() const 00080 { return FParameterObjectPosition[OBJECT_TORUS]; } 00081 //****************************************************************************** 00082 CParameterObjectPonderation* CControlerGMap::getParameterObjectPonderation() const 00083 { return FParameterPonderation; } 00084 //****************************************************************************** 00085 CParameterDart* CControlerGMap::getParameterDart(TViewId AViewId) const 00086 { return static_cast<CParameterDart*> 00087 (getParameterPrecompile(AViewId, PRECOMPILE_DART)); 00088 } 00089 //****************************************************************************** 00090 CParameterFace* CControlerGMap::getParameterFace(TViewId AViewId) const 00091 { return static_cast<CParameterFace*> 00092 (getParameterPrecompile(AViewId, PRECOMPILE_FACE)); 00093 } 00094 //****************************************************************************** 00095 CParameterPreview* CControlerGMap::getParameterPreview(TViewId AViewId) const 00096 { return static_cast<CParameterPreview*> 00097 (getParameterPrecompile(AViewId, PRECOMPILE_PREVIEW)); 00098 } 00099 //****************************************************************************** 00100 CParameterNormalVector* CControlerGMap::getParameterNormalVector(TViewId AViewId) const 00101 { return static_cast<CParameterNormalVector*> 00102 (getParameterPrecompile(AViewId, PRECOMPILE_NORMAL_VECTOR)); 00103 } 00104 //****************************************************************************** 00105 CParameterObjectTransformation* 00106 CControlerGMap::getParameterObjectTransformation(TViewId AViewId) const 00107 { return static_cast<CParameterObjectTransformation*> 00108 (getParameterPrecompile(AViewId, PRECOMPILE_OBJECT_TRANSFORMATION)); 00109 } 00110 //****************************************************************************** 00111 CParameterSew* CControlerGMap::getParameterSew(TViewId AViewId) const 00112 { return static_cast<CParameterSew*> 00113 (getParameterPrecompile(AViewId, PRECOMPILE_SEW)); 00114 } 00115 //****************************************************************************** 00116 #ifdef MODULE_SPAMOD 00117 CParameterSpamod* CControlerGMap::getParameterSpamod(TViewId AViewId) const 00118 { return static_cast<CParameterSpamod*> 00119 (getParameterPrecompile(AViewId, PRECOMPILE_SPAMOD)); 00120 } 00121 #endif // MODULE_SPAMOD 00122 //****************************************************************************** 00123 CParameterVertex* CControlerGMap::getParameterVertex(TViewId AViewId) const 00124 { return static_cast<CParameterVertex*> 00125 (getParameterPrecompile(AViewId, PRECOMPILE_VERTEX)); 00126 } 00127 //******************************************************************************
1.5.8