Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

fpscontroller.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002 
00003    this file is part of rcssserver3D
00004    Fri May 9 2003
00005    Copyright (C) 2002,2003 Koblenz University
00006    Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: fpscontroller.h,v 1.8 2004/04/05 08:47:56 rollmark Exp $
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; version 2 of the License.
00012 
00013    This program 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 General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 */
00022 #ifndef OXYGEN_FPSCONTROLLER_H
00023 #define OXYGEN_FPSCONTROLLER_H
00024 
00025 #include <oxygen/physicsserver/bodycontroller.h>
00026 
00027 namespace oxygen
00028 {
00029 
00037 class FPSController : public BodyController
00038 {
00039     //
00040     // Functions
00041     //
00042 public:
00043     FPSController();
00044     virtual ~FPSController();
00045 
00047     void AdjustHAngle(const float delta);
00048 
00050     void AdjustVAngle(const float delta);
00051 
00053     void Forward(const bool state);
00054 
00056     void Backward(const bool state);
00057 
00059     void StrafeLeft(const bool state);
00060 
00062     void StrafeRight(const bool state);
00063 
00065     void Up(const bool state);
00066 
00068     void Down(const bool state);
00069 
00071     void SetAcceleration(const float accel);
00072 
00074     float GetAcceleration() const;
00075 
00076 protected:
00079     virtual void PrePhysicsUpdateInternal(float deltaTime);
00080 
00081     //
00082     // Members
00083     //
00084 protected:
00086     float   mAcceleration;
00087 
00089     float   mHAngle;
00090 
00092     float   mVAngle;
00093 
00094     // event states
00095 
00097     bool    mForward;
00098 
00100     bool    mBackward;
00101 
00103     bool    mLeft;
00104 
00106     bool    mRight;
00107 
00109     bool    mUp;
00110 
00112     bool    mDown;
00113 };
00114 
00115 DECLARE_CLASS(FPSController);
00116 
00117 } //namespace oxygen
00118 
00119 #endif //OXYGEN_FPSCONTROLLER_H

Generated on Thu Apr 6 15:25:38 2006 for rcssserver3d by  doxygen 1.4.4