PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: VirtualStandardController.h * 00003 * 00004 * Copyright (C) 2002-2011 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLINPUT_VIRTUALSTANDARDCONTROLLER_H__ 00024 #define __PLINPUT_VIRTUALSTANDARDCONTROLLER_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLInput/Input/Virtual/VirtualController.h" 00032 #include "PLInput/Input/Controls/Button.h" 00033 #include "PLInput/Input/Controls/Axis.h" 00034 00035 00036 //[-------------------------------------------------------] 00037 //[ Namespace ] 00038 //[-------------------------------------------------------] 00039 namespace PLInput { 00040 00041 00042 //[-------------------------------------------------------] 00043 //[ Classes ] 00044 //[-------------------------------------------------------] 00045 /** 00046 * @brief 00047 * Standard virtual input controller 00048 * 00049 * @remarks 00050 * 3D coordinate system: 00051 * @code 00052 * y = > Translation: Move up/down (+/-) => Rotation: Yaw (also called 'heading') change is turning to the left or right 00053 * | 00054 * | 00055 * *---x => Translation: Strafe left/right (+/-) => Rotation: Pitch (also called 'bank') change is moving the nose down and the tail up (or vice-versa) 00056 * / 00057 * z => Translation: Move forwards/backwards (+/-) => Rotation: Roll (also called 'attitude') change is moving one wingtip up and the other down 00058 * @endcode 00059 **/ 00060 class VirtualStandardController : public VirtualController { 00061 00062 00063 //[-------------------------------------------------------] 00064 //[ Class definition ] 00065 //[-------------------------------------------------------] 00066 pl_class(PLINPUT_RTTI_EXPORT, VirtualStandardController, "PLInput", PLInput::VirtualController, "Standard virtual input controller") 00067 pl_class_end 00068 00069 00070 //[-------------------------------------------------------] 00071 //[ Controller definition ] 00072 //[-------------------------------------------------------] 00073 public: 00074 // Mouse 00075 Axis MouseX; /**< X axis (movement data, no absolute data) */ 00076 Axis MouseY; /**< Y axis (movement data, no absolute data) */ 00077 Axis MouseWheel; /**< Mouse wheel (movement data, no absolute data) */ 00078 Button MouseLeft; /**< Left mouse button (mouse button #0) */ 00079 Button MouseRight; /**< Right mouse button (mouse button #1) */ 00080 Button MouseMiddle; /**< Middle mouse button (mouse button #2) */ 00081 Button MouseButton4; /**< Mouse button #4 */ 00082 Button MouseButton5; /**< Mouse button #5 */ 00083 Button MouseButton6; /**< Mouse button #6 */ 00084 Button MouseButton7; /**< Mouse button #7 */ 00085 Button MouseButton8; /**< Mouse button #8 */ 00086 Button MouseButton9; /**< Mouse button #9 */ 00087 Button MouseButton10; /**< Mouse button #10 */ 00088 Button MouseButton11; /**< Mouse button #11 */ 00089 Button MouseButton12; /**< Mouse button #12 */ 00090 00091 // Keyboard 00092 Button KeyboardBackspace; /**< Backspace */ 00093 Button KeyboardTab; /**< Tab */ 00094 Button KeyboardClear; /**< Clear (not available everywhere) */ 00095 Button KeyboardReturn; /**< Return (often the same as "Enter") */ 00096 Button KeyboardShift; /**< Shift */ 00097 Button KeyboardControl; /**< Control ("Ctrl") */ 00098 Button KeyboardAlt; /**< Alt */ 00099 Button KeyboardPause; /**< Pause */ 00100 Button KeyboardCapsLock; /**< Caps lock */ 00101 Button KeyboardEscape; /**< Escape */ 00102 Button KeyboardSpace; /**< Space */ 00103 Button KeyboardPageUp; /**< Page up */ 00104 Button KeyboardPageDown; /**< Page down */ 00105 Button KeyboardEnd; /**< End */ 00106 Button KeyboardHome; /**< Home */ 00107 Button KeyboardLeft; /**< Left arrow */ 00108 Button KeyboardUp; /**< Up arrow */ 00109 Button KeyboardRight; /**< Right arrow */ 00110 Button KeyboardDown; /**< Down arrow */ 00111 Button KeyboardSelect; /**< Select (not available everywhere) */ 00112 Button KeyboardExecute; /**< Execute (not available everywhere) */ 00113 Button KeyboardPrint; /**< Print screen */ 00114 Button KeyboardInsert; /**< Insert */ 00115 Button KeyboardDelete; /**< Delete */ 00116 Button KeyboardHelp; /**< Help (not available everywhere) */ 00117 Button Keyboard0; /**< 0 */ 00118 Button Keyboard1; /**< 1 */ 00119 Button Keyboard2; /**< 2 */ 00120 Button Keyboard3; /**< 3 */ 00121 Button Keyboard4; /**< 4 */ 00122 Button Keyboard5; /**< 5 */ 00123 Button Keyboard6; /**< 6 */ 00124 Button Keyboard7; /**< 7 */ 00125 Button Keyboard8; /**< 8 */ 00126 Button Keyboard9; /**< 9 */ 00127 Button KeyboardA; /**< A */ 00128 Button KeyboardB; /**< B */ 00129 Button KeyboardC; /**< C */ 00130 Button KeyboardD; /**< D */ 00131 Button KeyboardE; /**< E */ 00132 Button KeyboardF; /**< F */ 00133 Button KeyboardG; /**< G */ 00134 Button KeyboardH; /**< H */ 00135 Button KeyboardI; /**< I */ 00136 Button KeyboardJ; /**< J */ 00137 Button KeyboardK; /**< K */ 00138 Button KeyboardL; /**< L */ 00139 Button KeyboardM; /**< M */ 00140 Button KeyboardN; /**< N */ 00141 Button KeyboardO; /**< O */ 00142 Button KeyboardP; /**< P */ 00143 Button KeyboardQ; /**< Q */ 00144 Button KeyboardR; /**< R */ 00145 Button KeyboardS; /**< S */ 00146 Button KeyboardT; /**< T */ 00147 Button KeyboardU; /**< U */ 00148 Button KeyboardV; /**< V */ 00149 Button KeyboardW; /**< W */ 00150 Button KeyboardX; /**< X */ 00151 Button KeyboardY; /**< Y */ 00152 Button KeyboardZ; /**< Z */ 00153 Button KeyboardNumpad0; /**< Numeric keypad 0 */ 00154 Button KeyboardNumpad1; /**< Numeric keypad 1 */ 00155 Button KeyboardNumpad2; /**< Numeric keypad 2 */ 00156 Button KeyboardNumpad3; /**< Numeric keypad 3 */ 00157 Button KeyboardNumpad4; /**< Numeric keypad 4 */ 00158 Button KeyboardNumpad5; /**< Numeric keypad 5 */ 00159 Button KeyboardNumpad6; /**< Numeric keypad 6 */ 00160 Button KeyboardNumpad7; /**< Numeric keypad 7 */ 00161 Button KeyboardNumpad8; /**< Numeric keypad 8 */ 00162 Button KeyboardNumpad9; /**< Numeric keypad 9 */ 00163 Button KeyboardNumpadMultiply; /**< Numeric keypad "Multiply" */ 00164 Button KeyboardNumpadAdd; /**< Numeric keypad "Add" */ 00165 Button KeyboardNumpadSeparator; /**< Numeric keypad "Separator" */ 00166 Button KeyboardNumpadSubtract; /**< Numeric keypad "Subtract" */ 00167 Button KeyboardNumpadDecimal; /**< Numeric keypad "Decimal" */ 00168 Button KeyboardNumpadDivide; /**< Numeric keypad "Divide" */ 00169 Button KeyboardF1; /**< F1 */ 00170 Button KeyboardF2; /**< F2 */ 00171 Button KeyboardF3; /**< F3 */ 00172 Button KeyboardF4; /**< F4 */ 00173 Button KeyboardF5; /**< F5 */ 00174 Button KeyboardF6; /**< F6 */ 00175 Button KeyboardF7; /**< F7 */ 00176 Button KeyboardF8; /**< F8 */ 00177 Button KeyboardF9; /**< F9 */ 00178 Button KeyboardF10; /**< F10 */ 00179 Button KeyboardF11; /**< F11 */ 00180 Button KeyboardF12; /**< F12 */ 00181 Button KeyboardNumLock; /**< Num lock */ 00182 Button KeyboardScrollLock; /**< Scroll lock */ 00183 Button KeyboardCircumflex; /**< Circumflex (^) */ 00184 00185 // Main character controls 00186 Axis TransX; /**< X translation axis: Strafe left/right (+/-) */ 00187 Axis TransY; /**< Y translation axis: Move up/down (+/-) */ 00188 Axis TransZ; /**< Z translation axis: Move forwards/backwards (+/-) */ 00189 Button Pan; /**< Keep pressed to pan */ 00190 Axis PanX; /**< X pan translation axis: Strafe left/right (+/-) */ 00191 Axis PanY; /**< Y pan translation axis: Move up/down (+/-) */ 00192 Axis PanZ; /**< Z pan translation axis: Move forwards/backwards (+/-) */ 00193 Axis RotX; /**< X rotation axis: Pitch (also called 'bank') change is moving the nose down and the tail up (or vice-versa) */ 00194 Axis RotY; /**< Y rotation axis: Yaw (also called 'heading') change is turning to the left or right */ 00195 Axis RotZ; /**< Z rotation axis: Roll (also called 'attitude') change is moving one wingtip up and the other down */ 00196 Button Rotate; /**< Keep pressed to rotate */ 00197 Button Forward; /**< Move forwards */ 00198 Button Backward; /**< Move backwards */ 00199 Button Left; /**< Move (rotate) left */ 00200 Button Right; /**< Move (rotate) right */ 00201 Button StrafeLeft; /**< Strafe left */ 00202 Button StrafeRight; /**< Strafe right */ 00203 Button Up; /**< Move up */ 00204 Button Down; /**< Move down */ 00205 Button Run; /**< Keep pressed to run */ 00206 Button Crouch; /**< Keep pressed to crouch */ 00207 Button Jump; /**< Jump */ 00208 Button Zoom; /**< Keep pressed to zoom */ 00209 Axis ZoomAxis; /**< Zoom axis to zoom in or out (+/-) */ 00210 Button Button1; /**< Button for action #1 */ 00211 Button Button2; /**< Button for action #2 */ 00212 Button Button3; /**< Button for action #3 */ 00213 Button Button4; /**< Button for action #4 */ 00214 Button Button5; /**< Button for action #5 */ 00215 00216 // Interaction 00217 Button Pickup; /**< Keep pressed to pickup */ 00218 Button Throw; /**< Throw the picked object */ 00219 Button IncreaseForce; /**< Keep pressed to increase the force applied to the picked object */ 00220 Button DecreaseForce; /**< Keep pressed to decrease the force applied to the picked object */ 00221 Axis PushPull; /**< Used to push/pull the picked object */ 00222 00223 00224 //[-------------------------------------------------------] 00225 //[ Public functions ] 00226 //[-------------------------------------------------------] 00227 public: 00228 /** 00229 * @brief 00230 * Constructor 00231 */ 00232 PLINPUT_API VirtualStandardController(); 00233 00234 /** 00235 * @brief 00236 * Destructor 00237 */ 00238 PLINPUT_API virtual ~VirtualStandardController(); 00239 00240 00241 //[-------------------------------------------------------] 00242 //[ Public virtual VirtualController functions ] 00243 //[-------------------------------------------------------] 00244 public: 00245 PLINPUT_API virtual void ConnectToDevices() override; 00246 00247 00248 }; 00249 00250 00251 //[-------------------------------------------------------] 00252 //[ Namespace ] 00253 //[-------------------------------------------------------] 00254 } // PLInput 00255 00256 00257 #endif // __PLINPUT_VIRTUALSTANDARDCONTROLLER_H__
|