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

visionperceptor_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) 2002,2003 Koblenz University
00006    Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: visionperceptor_c.cpp,v 1.7 2004/07/21 08:53:02 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 
00023 #include "visionperceptor.h"
00024 
00025 using namespace boost;
00026 using namespace oxygen;
00027 using namespace std;
00028 
00029 FUNCTION(VisionPerceptor,setNoiseParams)
00030 {
00031     float inDist;
00032     float inPhi;
00033     float inTheta;
00034     float inErrorAbs;
00035 
00036     if (
00037         (in.GetSize() != 4) ||
00038         (! in.GetValue(in[0],inDist)) ||
00039         (! in.GetValue(in[1],inPhi)) ||
00040         (! in.GetValue(in[2],inTheta)) ||
00041         (! in.GetValue(in[3],inErrorAbs))
00042         )
00043         {
00044             return false;
00045         }
00046 
00047     obj->SetNoiseParams(inDist,inPhi,inTheta,inErrorAbs);
00048     return true;
00049 }
00050 
00051 FUNCTION(VisionPerceptor,addNoise)
00052 {
00053     bool inAddNoise;
00054 
00055     if (
00056         (in.GetSize() != 1) ||
00057         (! in.GetValue(in.begin(),inAddNoise))
00058         )
00059     {
00060         return false;
00061     }
00062 
00063     obj->AddNoise(inAddNoise);
00064     return true;
00065 }
00066 
00067 FUNCTION(VisionPerceptor,useRandomNoise)
00068 {
00069     bool inRandomNoise;
00070 
00071     if (
00072         (in.GetSize() != 1) ||
00073         (! in.GetValue(in.begin(),inRandomNoise))
00074         )
00075     {
00076         return false;
00077     }
00078 
00079     obj->UseRandomNoise(inRandomNoise);
00080     return true;
00081 }
00082 
00083 FUNCTION(VisionPerceptor,setSenseMyPos)
00084 {
00085     bool inSenseMyPos;
00086 
00087     if (
00088         (in.GetSize() != 1) ||
00089         (! in.GetValue(in.begin(),inSenseMyPos))
00090         )
00091         {
00092             return false;
00093         }
00094 
00095     obj->SetSenseMyPos(inSenseMyPos);
00096     return true;
00097 }
00098 
00099 FUNCTION(VisionPerceptor,setStaticSenseAxis)
00100 {
00101     bool inStaticAxis;
00102 
00103     if (
00104         (in.GetSize() != 1) ||
00105         (! in.GetValue(in.begin(),inStaticAxis))
00106         )
00107         {
00108             return false;
00109         }
00110 
00111     obj->SetStaticSenseAxis(inStaticAxis);
00112     return true;
00113 }
00114 
00115 void CLASS(VisionPerceptor)::DefineClass()
00116 {
00117     DEFINE_BASECLASS(oxygen/Perceptor);
00118     DEFINE_FUNCTION(setNoiseParams);
00119     DEFINE_FUNCTION(addNoise);
00120     DEFINE_FUNCTION(useRandomNoise);
00121     DEFINE_FUNCTION(setSenseMyPos);
00122     DEFINE_FUNCTION(setStaticSenseAxis);
00123 }

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