PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: PhysicsCharacterController.h * 00003 * 00004 * Copyright (C) 2002-2012 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 __PLENGINE_CONTROLLER_PHYSICSCHARACTERCONTROLLER_H__ 00024 #define __PLENGINE_CONTROLLER_PHYSICSCHARACTERCONTROLLER_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include <PLInput/Input/Controller.h> 00032 #include <PLInput/Input/Controls/Axis.h> 00033 #include <PLInput/Input/Controls/Button.h> 00034 #include "PLEngine/PLEngine.h" 00035 00036 00037 //[-------------------------------------------------------] 00038 //[ Namespace ] 00039 //[-------------------------------------------------------] 00040 namespace PLEngine { 00041 00042 00043 //[-------------------------------------------------------] 00044 //[ Classes ] 00045 //[-------------------------------------------------------] 00046 /** 00047 * @brief 00048 * Physics character input controller 00049 * 00050 * @note 00051 * - Primary intended for rapid prototyping 00052 */ 00053 class PhysicsCharacterController : public PLInput::Controller { 00054 00055 00056 //[-------------------------------------------------------] 00057 //[ Class definition ] 00058 //[-------------------------------------------------------] 00059 pl_class(PL_RTTI_EXPORT, PhysicsCharacterController, "PLEngine", PLInput::Controller, "Physics character input controller") 00060 pl_class_end 00061 00062 00063 //[-------------------------------------------------------] 00064 //[ Controller definition ] 00065 //[-------------------------------------------------------] 00066 public: 00067 PLInput::Axis TransX; /**< X translation axis: Strafe left/right (+/-) */ 00068 PLInput::Axis TransY; /**< Y translation axis: Move up/down (+/-) */ 00069 PLInput::Axis TransZ; /**< Z translation axis: Move forwards/backwards (+/-) */ 00070 PLInput::Axis RotY; /**< Y rotation axis: Yaw (also called 'heading') change is turning to the left or right */ 00071 PLInput::Button Forward; /**< Move forwards */ 00072 PLInput::Button Backward; /**< Move backwards */ 00073 PLInput::Button Left; /**< Move (rotate) left */ 00074 PLInput::Button Right; /**< Move (rotate) right */ 00075 PLInput::Button StrafeLeft; /**< Strafe left */ 00076 PLInput::Button StrafeRight; /**< Strafe right */ 00077 PLInput::Button Up; /**< Move up */ 00078 PLInput::Button Down; /**< Move down */ 00079 PLInput::Button Run; /**< Keep pressed to run */ 00080 PLInput::Button Crouch; /**< Keep pressed to crouch */ 00081 PLInput::Button Jump; /**< Jump */ 00082 00083 00084 //[-------------------------------------------------------] 00085 //[ Public functions ] 00086 //[-------------------------------------------------------] 00087 public: 00088 /** 00089 * @brief 00090 * Constructor 00091 */ 00092 PL_API PhysicsCharacterController(); 00093 00094 /** 00095 * @brief 00096 * Destructor 00097 */ 00098 PL_API virtual ~PhysicsCharacterController(); 00099 00100 00101 }; 00102 00103 00104 //[-------------------------------------------------------] 00105 //[ Namespace ] 00106 //[-------------------------------------------------------] 00107 } // PLEngine 00108 00109 00110 #endif // __PLENGINE_CONTROLLER_PHYSICSCHARACTERCONTROLLER_H__
|