Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Representations/Perception/BodyPercept.cpp

Go to the documentation of this file.

    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 }