From: Markus R. <rol...@us...> - 2007-02-18 12:55:21
|
Update of /cvsroot/simspark/simspark/contrib/plugin/soccer/soccernode In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30785/soccernode Added Files: Tag: WIN32 .cvsignore soccernode.cpp soccernode.h soccernode_c.cpp Log Message: - added minimal set off socces classes to support hoap2 bot. Rebased all nodes on 'SoccerNode' class --- NEW FILE: .cvsignore --- *.lo .deps .dirstamp .libs Makefile Makefile.in initeffector.la --- NEW FILE: soccernode.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2004 RoboCup Soccer Server 3D Maintenance Group $Id: soccernode.cpp,v 1.1.2.1 2007/02/18 12:55:12 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "soccernode.h" #include <oxygen/sceneserver/transform.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; using namespace boost; SoccerNode::SoccerNode() : BaseNode() { } SoccerNode::~SoccerNode() { } boost::shared_ptr<oxygen::Transform> SoccerNode::GetTransformParent() const { return mTransformParent; } void SoccerNode::UpdateCached() { BaseNode::UpdateCached(); mTransformParent = shared_dynamic_cast<Transform> (GetParentSupportingClass("Transform").lock()); if (mTransformParent.get() == 0) { GetLog()->Error() << "Error: (SoccerNode: " << GetName() << ") parent node is not derived from TransformNode\n"; } } void SoccerNode::OnLink() { BaseNode::OnLink(); UpdateCached(); } void SoccerNode::OnUnlink() { BaseNode::OnUnlink(); mTransformParent.reset(); } --- NEW FILE: soccernode_c.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: soccernode_c.cpp,v 1.1.2.1 2007/02/18 12:55:13 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "soccernode.h" using namespace boost; using namespace oxygen; using namespace std; void CLASS(SoccerNode)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); } --- NEW FILE: soccernode.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2004 RoboCup Soccer Server 3D Maintenance Group $Id: soccernode.h,v 1.1.2.1 2007/02/18 12:55:13 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SOCCERNODE_H #define SOCCERNODE_H #include <oxygen/sceneserver/basenode.h> namespace oxygen { class Transform; } class SoccerNode : public oxygen::BaseNode { public: SoccerNode(); virtual ~SoccerNode(); boost::shared_ptr<oxygen::Transform> GetTransformParent() const; /** update variables from a script */ virtual void UpdateCached(); protected: virtual void OnLink(); virtual void OnUnlink(); /** reference to the parent transform node*/ boost::shared_ptr<oxygen::Transform> mTransformParent; }; DECLARE_CLASS(SoccerNode); #endif // SOCCERNODE_H |