00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- 00002 00003 this file is part of rcssserver3D 00004 Wed Nov 9 2005 00005 Copyright (C) 2005 RoboCup Soccer Server 3D Maintenance Group 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 HINGEEFFECTOR_H 00021 #define HINGEEFFECTOR_H 00022 00023 #include <oxygen/agentaspect/effector.h> 00024 #include <oxygen/physicsserver/hingejoint.h> 00025 00026 class HingeEffector : public oxygen::Effector 00027 { 00028 public: 00029 HingeEffector(); 00030 virtual ~HingeEffector(); 00031 00033 virtual bool Realize(boost::shared_ptr<oxygen::ActionObject> action); 00034 00036 virtual std::string GetPredicate() { return GetName(); } 00037 00039 virtual boost::shared_ptr<oxygen::ActionObject> 00040 GetActionObject(const oxygen::Predicate& predicate); 00041 00042 protected: 00044 virtual void OnLink(); 00045 00047 virtual void OnUnlink(); 00048 00049 protected: 00051 boost::shared_ptr<oxygen::HingeJoint> mJoint; 00052 00053 }; 00054 00055 DECLARE_CLASS(HingeEffector); 00056 00057 #endif // HINGEEFFECTOR_H