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

objectstate.h

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) 2004 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: objectstate.h,v 1.3 2004/04/08 14:31:45 markelic 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 #ifndef OBJECTSTATE_H
00023 #define OBJECTSTATE_H
00024 
00025 #include <oxygen/sceneserver/basenode.h>
00026 #include <oxygen/sceneserver/transform.h>
00027 
00028 class ObjectState : public oxygen::BaseNode
00029 {
00030 public:
00031     typedef enum TPerceptType
00032     {
00033         PT_Default,
00034         PT_TooFar,
00035     PT_Player
00036     };
00037 
00038 public:
00039     ObjectState();
00040     virtual ~ObjectState();
00041 
00043     virtual void SetPerceptName(const std::string& name,
00044                                 TPerceptType pt = PT_Default);
00045                 
00047     virtual void SetPerceptName(const std::string& name,
00048                                 TPerceptType pt ,
00049                                 TPerceptType pt );
00050 
00052     virtual std::string GetPerceptName(TPerceptType pt = PT_Default) const;
00053 
00055     virtual void SetID(const std::string& id, TPerceptType pt = PT_Default);
00056 
00058     virtual std::string GetID(TPerceptType pt = PT_Default) const;
00059 
00060     boost::shared_ptr<oxygen::Transform> GetTransformParent() const;
00061 
00062 protected:
00063     typedef std::map<TPerceptType, std::string> TPerceptStringMap;
00064 
00065     virtual void OnLink();
00066 
00067     virtual void OnUnlink();
00068 
00070     TPerceptStringMap mPerceptNames;
00071 
00073     TPerceptStringMap mIDs;
00074 
00076     boost::shared_ptr<oxygen::Transform> mTransformParent;
00077 };
00078 
00079 DECLARE_CLASS(ObjectState);
00080 
00081 #endif // OBJECTSTATE_H

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