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

# Modules/SelfLocator/GT2005StableSelfLocator/GT2005StableLineCrossingsTable.h

Go to the documentation of this file.

    00001 #ifndef GT2005StableLineCrossingsTable_h
    00002 #define GT2005StableLineCrossingsTable_h
    00003
    00004
    00005 #include "Tools/Boundary.h"
    00006 #include "Tools/FieldDimensions.h"
    00007 #include "Tools/Debugging/DebugDrawings.h"
    00008 #include "Tools/Math/Pose2D.h"
    00009
    00010
    00011 class GT2005StableLineCrossingsTable
    00012 {
    00013 public:
    00014
    00015   enum CrossingType{
    00016     lineCrossing,
    00017     middleCircle
    00018   };
    00019
    00020   enum CrossingClass{
    00021     unknownCrossing,
    00022     virtualCrossing,
    00023     lCrossing,
    00024     tCrossing,
    00025     falseCrossing
    00026   };
    00027
    00028   static int NO_POINT_DISTANCE;
    00029
    00030   GT2005StableLineCrossingsTable();
    00031   Vector2<double> getClosestPoint(const Vector2<double>& point, CrossingType type);
    00032   Vector2<double> getClassifiedClosestPoint(const Vector2<double>& point, CrossingClass crossingClass);
    00033
    00034
    00035   enum{
    00036     NUMBER_OF_CROSSINGS = 20,
    00037     NUMBER_OF_CLASSIFIED_CROSSINGS = 18,
    00038     NUMBER_OF_VIRTUAL_CROSSINGS = 4,
    00039     NUMBER_OF_T_CROSSINGS = 6,
    00040     NUMBER_OF_L_CROSSINGS = 8,
    00041     NUMBER_OF_FALSE_CROSSINGS = 2
    00042   };
    00043
    00044   static double crossingsX[NUMBER_OF_CROSSINGS];
    00045   static double crossingsY[NUMBER_OF_CROSSINGS];
    00046
    00047   Vector2<double> allCrossings[NUMBER_OF_CLASSIFIED_CROSSINGS];
    00048   Vector2<double> virtualCrossings[NUMBER_OF_VIRTUAL_CROSSINGS];
    00049   Vector2<double> tCrossings[NUMBER_OF_T_CROSSINGS];
    00050   Vector2<double> lCrossings[NUMBER_OF_L_CROSSINGS];
    00051   Vector2<double> falseCrossings[NUMBER_OF_FALSE_CROSSINGS];
    00052
    00053
    00054 private:
    00055
    00056   // private vars
    00057
    00058   // private methods
    00059   void initAllCrossings();
    00060   void initVirtualCrossings();
    00061   void initTCrossings();
    00062   void initLCrossings();
    00063   void initFalseCrossings();
    00064 };
    00065 #endif