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

Representations/Perception/LinesPercept.cpp

Go to the documentation of this file.
00001 /**
00002  * @file LinesPercept.cpp
00003  *
00004  * Implementation of class LinesPercept.
00005  * @author <A href=mailto:juengel@informatik.hu-berlin.de>Matthias Juengel</A>
00006  */
00007 
00008 #include "LinesPercept.h"
00009 
00010 void LinesPercept::reset(unsigned long frameNumber)
00011 {
00012   this->frameNumber = frameNumber;
00013   for(int i = 0; i < numberOfTypes; ++i)
00014     points[i].numberOfPoints = 0;
00015 
00016   /* stuff for the mshselflocator */
00017   numberOfLineCrossings = 0;
00018   centerCircleFound = false;
00019 }
00020 
00021 void LinesPercept::add(LineType type, const Vector2<int>& pointOnField, const Vector2<int>& pointInImage, 
00022                                       double angleOnField, double angleInImage)
00023 {
00024   if(points[type].numberOfPoints < maxNumberOfPoints)
00025   {
00026     points[type].pointsOnField[points[type].numberOfPoints] = LinePoint(pointOnField, angleOnField);
00027     points[type].pointsInImage[points[type].numberOfPoints++] = LinePoint(pointInImage, angleInImage);
00028     // pointsOnField[type][numberOfPoints[type]] = LinePoint(pointOnField, angleOnField);
00029     // pointsInImage[type][numberOfPoints[type]++] = LinePoint(pointInImage, angleInImage);
00030   }
00031 }

Generated on Mon Mar 20 22:00:03 2006 for GT2005 by doxygen 1.3.6