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

ObjectState Class Reference

#include <objectstate.h>

Inheritance diagram for ObjectState:

Inheritance graph
[legend]
Collaboration diagram for ObjectState:

Collaboration graph
[legend]
List of all members.

Public Types

enum  TPerceptType { PT_Default, PT_TooFar, PT_Player }

Public Member Functions

 ObjectState ()
virtual ~ObjectState ()
virtual void SetPerceptName (const std::string &name, TPerceptType pt=PT_Default)
 set the object name for perceptors
virtual void SetPerceptName (const std::string &name, TPerceptType pt, TPerceptType pt)
 set the object name for perceptors
virtual std::string GetPerceptName (TPerceptType pt=PT_Default) const
 returns the object name for perceptors
virtual void SetID (const std::string &id, TPerceptType pt=PT_Default)
 set the object id for perceptors
virtual std::string GetID (TPerceptType pt=PT_Default) const
 returns the object id
boost::shared_ptr< oxygen::TransformGetTransformParent () const

Protected Types

typedef std::map< TPerceptType,
std::string > 
TPerceptStringMap

Protected Member Functions

virtual void OnLink ()
 This method is called, when the hierarchy object has been linked to a parent.
virtual void OnUnlink ()
 This rountine is called, before the hierarchy object is removed from the parent.

Protected Attributes

TPerceptStringMap mPerceptNames
 object names
TPerceptStringMap mIDs
 object ids
boost::shared_ptr< oxygen::TransformmTransformParent
 reference to the parent transform node

Detailed Description

Definition at line 28 of file objectstate.h.


Member Typedef Documentation

typedef std::map<TPerceptType, std::string> ObjectState::TPerceptStringMap [protected]
 

Definition at line 63 of file objectstate.h.


Member Enumeration Documentation

enum ObjectState::TPerceptType
 

Enumerator:
PT_Default 
PT_TooFar 
PT_Player 

Definition at line 31 of file objectstate.h.


Constructor & Destructor Documentation

ObjectState::ObjectState  ) 
 

Definition at line 27 of file objectstate.cpp.

ObjectState::~ObjectState  )  [virtual]
 

Definition at line 31 of file objectstate.cpp.


Member Function Documentation

std::string ObjectState::GetID TPerceptType  pt = PT_Default  )  const [virtual]
 

returns the object id

Definition at line 68 of file objectstate.cpp.

References mIDs.

std::string ObjectState::GetPerceptName TPerceptType  pt = PT_Default  )  const [virtual]
 

returns the object name for perceptors

Definition at line 52 of file objectstate.cpp.

References mPerceptNames.

boost::shared_ptr< oxygen::Transform > ObjectState::GetTransformParent  )  const
 

Definition at line 78 of file objectstate.cpp.

References mTransformParent.

void ObjectState::OnLink  )  [protected, virtual]
 

This method is called, when the hierarchy object has been linked to a parent.

At that point, traversal can commence. It can be overridden to support custom 'link' behavior.

Reimplemented from zeitgeist::Leaf.

Definition at line 84 of file objectstate.cpp.

References SoccerBase::GetTransformParent(), mTransformParent, and zeitgeist::Leaf::OnLink().

Here is the call graph for this function:

void ObjectState::OnUnlink  )  [protected, virtual]
 

This rountine is called, before the hierarchy object is removed from the parent.

It can be overridden to support custom 'unlink' behavior.

Reimplemented from zeitgeist::Leaf.

Definition at line 91 of file objectstate.cpp.

References mTransformParent, and zeitgeist::Leaf::OnUnlink().

Here is the call graph for this function:

void ObjectState::SetID const std::string &  id,
TPerceptType  pt = PT_Default
[virtual]
 

set the object id for perceptors

Definition at line 62 of file objectstate.cpp.

References mIDs.

Referenced by AgentState::SetID(), and AgentState::SetUniformNumber().

void ObjectState::SetPerceptName const std::string &  name,
TPerceptType  pt,
TPerceptType  pt
[virtual]
 

set the object name for perceptors

Definition at line 42 of file objectstate.cpp.

References mPerceptNames.

void ObjectState::SetPerceptName const std::string &  name,
TPerceptType  pt = PT_Default
[virtual]
 

set the object name for perceptors

Definition at line 36 of file objectstate.cpp.

References mPerceptNames.


Member Data Documentation

TPerceptStringMap ObjectState::mIDs [protected]
 

object ids

Definition at line 73 of file objectstate.h.

Referenced by GetID(), and SetID().

TPerceptStringMap ObjectState::mPerceptNames [protected]
 

object names

Definition at line 70 of file objectstate.h.

Referenced by GetPerceptName(), and SetPerceptName().

boost::shared_ptr<oxygen::Transform> ObjectState::mTransformParent [protected]
 

reference to the parent transform node

Definition at line 76 of file objectstate.h.

Referenced by GetTransformParent(), OnLink(), and OnUnlink().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:39:35 2006 for rcssserver3d by  doxygen 1.4.4