00001 /** 00002 * @file BodyPercept.cpp 00003 * 00004 * Implementation of class BodyPercept. 00005 */ 00006 00007 #include "BodyPercept.h" 00008 00009 BodyPercept::BodyPercept() 00010 { 00011 state = undefined; 00012 switches = 0; 00013 mouthState = mouthClosed; 00014 bodyPSDHighValue = false; 00015 acceleration = Vector3<double>(0,0,0); 00016 } 00017 00018 BodyPercept::~BodyPercept() 00019 { 00020 } 00021 00022 void BodyPercept::operator = (const BodyPercept& other) 00023 { 00024 state = other.getState(); 00025 switches = other.getSwitches(); 00026 mouthState = other.getMouthState(); 00027 bodyPSDHighValue = other.getBodyPSDHighValue(); 00028 acceleration = other.acceleration; 00029 } 00030 00031 In& operator>>(In& stream,BodyPercept& bodyPercept) 00032 { 00033 stream >> bodyPercept.frameNumber; 00034 stream.read(&bodyPercept,sizeof(BodyPercept)); 00035 return stream; 00036 } 00037 00038 Out& operator<<(Out& stream, const BodyPercept& bodyPercept) 00039 { 00040 stream << bodyPercept.frameNumber; 00041 stream.write(&bodyPercept,sizeof(BodyPercept)); 00042 return stream; 00043 } 00044 00045 00046 /* 00047 * Change log : 00048 * 00049 * $Log: BodyPercept.cpp,v $ 00050 * Revision 1.3 2004/05/25 12:36:51 tim 00051 * added body PSD data 00052 * 00053 * Revision 1.2 2004/05/24 14:16:06 juengel 00054 * New button evaluation. 00055 * 00056 * Revision 1.1.1.1 2004/05/22 17:25:31 cvsadm 00057 * created new repository GT2004_WM 00058 * 00059 * Revision 1.3 2004/01/28 08:31:47 dueffert 00060 * acceleration added 00061 * 00062 * Revision 1.2 2003/11/14 19:02:25 goehring 00063 * frameNumber added 00064 * 00065 * Revision 1.1 2003/10/07 10:09:36 cvsadm 00066 * Created GT2004 (M.J.) 00067 * 00068 * Revision 1.1.1.1 2003/07/02 09:40:22 cvsadm 00069 * created new repository for the competitions in Padova from the 00070 * tamara CVS (Tuesday 2:00 pm) 00071 * 00072 * removed unused solutions 00073 * 00074 * Revision 1.3 2003/04/01 22:40:45 cesarz 00075 * added mouth states 00076 * 00077 * Revision 1.2 2003/01/30 11:26:47 juengel 00078 * Added tailPosition to bodyPercept 00079 * 00080 * Revision 1.1 2002/09/10 15:26:40 cvsadm 00081 * Created new project GT2003 (M.L.) 00082 * - Cleaned up the /Src/DataTypes directory 00083 * - Removed Challenge Code 00084 * - Removed processing of incoming audio data 00085 * - Renamed AcousticMessage to SoundRequest 00086 * 00087 * Revision 1.1.1.1 2002/05/10 12:40:13 cvsadm 00088 * Moved GT2002 Project from ute to tamara. 00089 * 00090 * Revision 1.6 2002/02/23 16:37:15 risler 00091 * State in RobotState like BodyPercept state 00092 * 00093 * Revision 1.5 2002/02/05 03:30:52 loetzsch 00094 * replaced direct member access by 00095 * inline const VALUE& get...() const and 00096 * inline void set...(const Value&) methods. 00097 * 00098 * Revision 1.4 2002/01/18 11:19:41 petters 00099 * data fields and access methods added 00100 * 00101 * Revision 1.3 2001/12/10 17:47:05 risler 00102 * change log added 00103 * 00104 */