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

dragcontroller_c.cpp

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) 2003 Koblenz University
00006    $Id: dragcontroller_c.cpp,v 1.1 2004/04/05 08:45:45 rollmark Exp $
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; version 2 of the License.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software
00019    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020 */
00021 
00022 #include "dragcontroller.h"
00023 
00024 using namespace oxygen;
00025 
00026 FUNCTION(DragController,getLinearDrag)
00027 {
00028     return obj->GetLinearDrag();
00029 }
00030 
00031 FUNCTION(DragController,setLinearDrag)
00032 {
00033     float inDrag;
00034 
00035     if (
00036         (in.GetSize() != 1) ||
00037         (! in.GetValue(in.begin(), inDrag))
00038          )
00039         {
00040             return false;
00041         }
00042 
00043         obj->SetLinearDrag(inDrag);
00044         return true;
00045 }
00046 
00047 FUNCTION(DragController,getAngularDrag)
00048 {
00049     return obj->GetAngularDrag();
00050 }
00051 
00052 FUNCTION(DragController,setAngularDrag)
00053 {
00054     float inDrag;
00055 
00056     if (
00057         (in.GetSize() != 1) ||
00058         (! in.GetValue(in.begin(), inDrag))
00059          )
00060         {
00061             return false;
00062         }
00063 
00064         obj->SetAngularDrag(inDrag);
00065         return true;
00066 }
00067 
00068 void CLASS(DragController)::DefineClass()
00069 {
00070     DEFINE_BASECLASS(oxygen/BodyController);
00071     DEFINE_FUNCTION(getLinearDrag);
00072     DEFINE_FUNCTION(setLinearDrag);
00073     DEFINE_FUNCTION(getAngularDrag);
00074     DEFINE_FUNCTION(setAngularDrag);
00075 }

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