00001 /* 00002 * lib-controler : Un contrôleur générique de scène 3D. 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 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 #ifndef VIEW_HH 00026 #define VIEW_HH 00027 //****************************************************************************** 00030 //****************************************************************************** 00031 00039 class CView 00040 { 00041 public: 00042 //@name Constructeurs et destructeur. 00044 00045 CView(); 00046 00048 virtual ~CView(); 00050 00051 //@name Méthodes pour l'affichage 00053 00060 virtual void initScene() = 0; 00061 00066 virtual void drawScene() = 0; 00067 00069 virtual void update() = 0; 00070 00072 00073 //@name Méthodes pour le picking 00075 00077 virtual void pick(int AX, int AY) = 0; 00078 00080 00081 00082 //@name Méthodes pour la conversion 2D <=> 3D 00084 00092 virtual void unproject(float x, float y, float res[]) = 0; 00093 00102 virtual void project(float x, float y, float z, float res[]) = 0; 00103 00105 00106 //@name Méthodes pour activer ou désactiver la vue 00108 00110 virtual void enable(); 00111 00113 virtual void disable(); 00114 00116 virtual bool isEnabled(); 00117 00119 00120 protected: 00121 00122 //@name Méthodes protected devant être utilisées uniquement par la méthode 00123 // drawScene 00125 00130 virtual void setScenePosition() = 0; 00131 00136 virtual void display() = 0; 00137 00139 00140 private: 00142 bool FEnable; 00143 }; 00144 00145 //****************************************************************************** 00146 #endif // VIEW_HH 00147 //******************************************************************************
1.5.8