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

# Representations/Cognition/PlayersModel.cpp

Go to the documentation of this file.

    00001 /**
    00002 * @file PlayersModel.cpp
    00003 *
    00004 * Implementation of class PlayersModel.
    00005 *
    00006 * @author <A href=mailto:marc.dassler@web.de>Marc Dassler</A>
    00007 */
    00008
    00009
    00010
    00011 #include "PlayersModel.h"
    00012 #include "Tools/FieldDimensions.h"
    00013
    00014
    00015 PlayersModel::PlayersModel():timeStampToSeenOwnPlayerAhead(0),
    00016                             freeSpaceAroundRobot(0),
    00017                             distanceToOppInSectorAhead(0),
    00018                             distanceToOppInSectorBehind(0),
    00019                             distanceToOppInSectorLeft(0),
    00020                             distanceToOppInSectorRight(0)
    00021 {
    00022   positionOfOwnPlayerAhead.x = 0;
    00023   positionOfOwnPlayerAhead.y = 0;
    00024 }
    00025
    00026
    00027 In& operator>>(In& stream,PlayersModel& playersModel)
    00028 {
    00029   stream.read(&playersModel,sizeof(PlayersModel));
    00030   return stream;
    00031 }
    00032
    00033 Out& operator<<(Out& stream, const PlayersModel& playersModel)
    00034 {
    00035   stream.write(&playersModel,sizeof(PlayersModel));
    00036   return stream;
    00037 }
    00038