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

dragcontroller.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002    this file is part of rcssserver3D
00003    Fri May 9 2003
00004    Copyright (C) 2003 Koblenz University
00005    $Id: dragcontroller.h,v 1.1 2004/04/05 08:45:45 rollmark Exp $
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; version 2 of the License.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 #ifndef OXYGEN_DRAGCONTROLLER_H
00021 #define OXYGEN_DRAGCONTROLLER_H
00022 
00023 #include <oxygen/physicsserver/bodycontroller.h>
00024 
00025 namespace oxygen
00026 {
00027 
00031 class DragController : public BodyController
00032 {
00033     //
00034     // Functions
00035     //
00036 public:
00037     DragController();
00038     virtual ~DragController();
00039 
00040     // returns the applied linear drag
00041     float GetLinearDrag();
00042 
00043     // sets the applied linear drag
00044     void SetLinearDrag(float d);
00045 
00046     // returns the applied angular drag
00047     float GetAngularDrag();
00048 
00049     // sets the applied angular drag
00050     void SetAngularDrag(float d);
00051 
00052 protected:
00054     virtual void PrePhysicsUpdateInternal(float deltaTime);
00055 
00056     //
00057     // Members
00058     //
00059 protected:
00060     // the applied linear drag acceleration
00061     float mLinearDrag;
00062 
00063     // the applied angual drag acceleration
00064     float mAngularDrag;
00065 };
00066 
00067 DECLARE_CLASS(DragController);
00068 
00069 } // namespace oxygen
00070 
00071 
00072 #endif // OXYGEN_DRAGCONTROLLER_H

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