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

DefaultActions.hpp

Go to the documentation of this file.
00001 /****************************************************************************\ 00002 * VRVis * 00003 * http://vrvis.sourceforge.net * 00004 * (C) 2004 by Alex Loeffler * 00005 * mailto:aloeffler@users.sourceforge.net * 00006 **************************************************************************** 00007 * License * 00008 * * 00009 * This library is free software; you can redistribute it and/or modify it * 00010 * under the terms of the GNU Library General Public License as published * 00011 * by the Free Software Foundation, version 2. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, but * 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Library General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Library General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00021 \****************************************************************************/ 00022 00023 #ifndef DEFAULTACTIONS_HPP 00024 #define DEFAULTACTIONS_HPP 00025 00026 #include <gmtl/Point.h> 00027 #include "Action.hpp" 00028 #include "Common.hpp" 00029 00030 namespace vrvis 00031 { 00032 00033 /****************************************************************************\ 00034 * TranslateAction * 00035 \****************************************************************************/ 00036 00038 class TranslateAction : public DigitalAction 00039 { 00040 // ================================================================== PUBLIC 00041 00042 public: 00043 00044 // ----------------------------------------------- Constructor & Destructor. 00045 00047 TranslateAction(void); 00049 ~TranslateAction(void); 00050 00051 // ------------------------------- Execution (Inherited from DigitalAction). 00052 00054 void execute(const gadget::Digital::State cButtonState); 00055 00056 // ================================================================= PRIVATE 00057 00058 private: 00059 00060 // ------------------------------------------------------ Matrix Operations. 00061 00063 void saveStartPositions(void); 00065 void translateMatrix(void); 00066 00067 // ---------------------------------------------------------------- Members. 00068 00070 gmtl::Point3f* mpWandStart; 00072 gmtl::Point3f* mpDrawStart; 00073 00074 // --------------------------------------------------------- Static Members. 00075 00077 static const float scTranslationFactor; 00078 }; 00079 00080 00081 00082 /****************************************************************************\ 00083 * ZoomAction * 00084 \****************************************************************************/ 00085 00087 class ZoomAction : public DigitalAction 00088 { 00089 // ================================================================== PUBLIC 00090 00091 public: 00092 00093 // ------------------------------------------------------------- Destructor. 00094 00096 virtual ~ZoomAction(void); 00097 00098 // -------------------------------------------------------------- Accessors. 00099 00101 static float getZoomFactor(void); 00102 00103 // ------------------------------- Execution (Inherited from DigitalAction). 00104 00106 virtual void execute(const gadget::Digital::State cButtonState) = 0; 00107 00108 // =============================================================== PROTECTED 00109 00110 protected: 00111 00112 // ------------------------------------------------------------ Constructor. 00113 00115 ZoomAction(const std::string& crName); 00116 00117 // --------------------------------------------------------- Static Members. 00118 00120 static float sZoomFactor; 00122 static const float scMultiplicator; 00124 static const float scMinZoomFactor; 00126 static const float scMaxZoomFactor; 00127 }; 00128 00129 /****************************************************************************\ 00130 * ZoomInAction * 00131 \****************************************************************************/ 00132 00134 class ZoomInAction : public ZoomAction 00135 { 00136 // ================================================================== PUBLIC 00137 00138 public: 00139 00140 // ----------------------------------------------- Constructor & Destructor. 00141 00143 ZoomInAction(void); 00145 ~ZoomInAction(void); 00146 00147 // ------------------------------- Execution (Inherited from DigitalAction). 00148 00150 void execute(const gadget::Digital::State cButtonState); 00151 }; 00152 00153 /****************************************************************************\ 00154 * ZoomOutAction * 00155 \****************************************************************************/ 00156 00158 class ZoomOutAction : public ZoomAction 00159 { 00160 // ================================================================== PUBLIC 00161 00162 public: 00163 00164 // ----------------------------------------------- Constructor & Destructor. 00165 00167 ZoomOutAction(void); 00169 ~ZoomOutAction(void); 00170 00171 // ------------------------------- Execution (Inherited from DigitalAction). 00172 00174 void execute(const gadget::Digital::State cButtonState); 00175 }; 00176 00177 /****************************************************************************\ 00178 * RotateAction * 00179 \****************************************************************************/ 00180 00182 class RotateAction : public AnalogAction 00183 { 00184 // ================================================================== PUBLIC 00185 00186 public: 00187 00188 // ------------------------------------------------------------- Destructor. 00189 00191 virtual ~RotateAction(void); 00192 00193 // -------------------------------- Execution (Inherited from AnalogAction). 00194 00196 void execute(const float cAnalogDataValue) = 0; 00197 00198 // =============================================================== PROTECTED 00199 00200 protected: 00201 00202 // ------------------------------------------------------------ Constructor. 00203 00205 RotateAction(const std::string& crName); 00206 00207 // --------------------------------------------------------- Static Members. 00208 00210 static const float scScaleFactor; 00211 }; 00212 00213 /****************************************************************************\ 00214 * RotateXAction * 00215 \****************************************************************************/ 00216 00218 class RotateXAction : public RotateAction 00219 { 00220 // ================================================================== PUBLIC 00221 00222 public: 00223 00224 // ----------------------------------------------- Constructor & Destructor. 00225 00227 RotateXAction(void); 00229 ~RotateXAction(void); 00230 00231 // -------------------------------- Execution (Inherited from AnalogAction). 00232 00234 void execute(const float cAnalogDataValue); 00235 }; 00236 00237 /****************************************************************************\ 00238 * RotateYAction * 00239 \****************************************************************************/ 00240 00242 class RotateYAction : public RotateAction 00243 { 00244 // ================================================================== PUBLIC 00245 00246 public: 00247 00248 // ----------------------------------------------- Constructor & Destructor. 00249 00251 RotateYAction(void); 00253 ~RotateYAction(void); 00254 00255 // -------------------------------- Execution (Inherited from AnalogAction). 00256 00258 void execute(const float cAnalogDataValue); 00259 }; 00260 00261 } // End namespace. 00262 00263 #endif // DEFAULTACTIONS_HPP

Generated on Tue Sep 21 07:31:08 2004 for VRVis by doxygen 1.3.8