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

world_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: world_c.cpp,v 1.7 2004/03/22 13:51:25 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 "world.h"
00023 
00024 using namespace boost;
00025 using namespace oxygen;
00026 using namespace zeitgeist;
00027 using namespace salt;
00028 
00029 FUNCTION(World,setGravity)
00030 {
00031     Vector3f inGravity;
00032     if (
00033         (in.GetSize() == 0) ||
00034         (! in.GetValue(in.begin(),inGravity))
00035         )
00036         {
00037             return false;
00038         }
00039 
00040     obj->SetGravity(inGravity);
00041     return true;
00042 }
00043 
00044 FUNCTION(World,setERP)
00045 {
00046     float inERP;
00047 
00048     if (
00049         (in.GetSize() != 1) ||
00050         (! in.GetValue(in.begin(),inERP))
00051         )
00052         {
00053             return false;
00054         }
00055 
00056     obj->SetERP(inERP);
00057     return true;
00058 }
00059 
00060 FUNCTION(World,getERP)
00061 {
00062     return obj->GetERP();
00063 }
00064 
00065 FUNCTION(World,setCFM)
00066 {
00067     float inCFM;
00068 
00069     if (
00070         (in.GetSize() != 1) ||
00071         (! in.GetValue(in.begin(),inCFM))
00072         )
00073         {
00074             return false;
00075         }
00076 
00077     obj->SetCFM(inCFM);
00078     return true;
00079 }
00080 
00081 FUNCTION(World,getCFM)
00082 {
00083     return obj->GetCFM();
00084 }
00085 
00086 void CLASS(World)::DefineClass()
00087 {
00088     DEFINE_BASECLASS(oxygen/ODEObject);
00089     DEFINE_FUNCTION(setGravity);
00090     DEFINE_FUNCTION(setERP);
00091     DEFINE_FUNCTION(getERP);
00092     DEFINE_FUNCTION(setCFM);
00093     DEFINE_FUNCTION(getCFM);
00094 }

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