LocalizationMapEntity.h

00001 #include "Image/PixelsTypes.H"
00002 #include "Image/Point2D.H"
00003 #include "Image/Image.H"
00004 #include "Image/DrawOps.H"
00005 #include "LocalizationUtil.h"
00006 
00007 #ifndef LOCALIZATIONMAPENTITY_H_
00008 #define LOCALIZATIONMAPENTITY_H_
00009 
00010 class LocalizationMapEntity
00011 {
00012 public:
00013         struct FillType
00014         {
00015                         const static int none = 0;
00016                         const static int fill = 1;
00017                         const static int grid = 2;
00018         };
00019 
00020         struct InteractionType
00021         {
00022                         const static int internal = 0; //use this for normal objects
00023                         const static int external = 1; //use this if the robot will be inside and bounded by the object
00024                         const static int passive =  2;
00025         };
00026 
00027         struct ShapeType
00028         {
00029                         const static int rect =   0;
00030                         const static int line =   1;
00031                         const static int square = 2;
00032                         const static int circle = 3;
00033         };
00034 
00035         struct ObjectType
00036         {
00037                 const static int none = 0;
00038                 const static int boundary = 1;
00039                 const static int pipe = 2;
00040                 const static int bin = 3;
00041                 const static int buoy = 4;
00042         };
00043 
00044         LocalizationMapEntity();
00045         LocalizationMapEntity(Point2D<float> center, float orientation, Point2D<float> dim, int shapeType, PixRGB<byte> color = PixRGB<byte>(255, 255, 255), int mObjectType = ObjectType::none, int interactionType = InteractionType::internal, int fillType = FillType::none);
00046 
00047         void drawMe(Image<PixRGB<byte> > &img, const Camera cam);
00048         void drawShape(Image<PixRGB<byte> > &img, const Camera cam);
00049         void drawBackground(Image<PixRGB<byte> > &img, const Camera cam, Rectangle theRect);
00050 
00051         Point2D<float> mCenter;
00052                 float mOrientation;
00053                 Point2D<float> mDim;
00054                 PixRGB<byte> mColor;
00055 
00056         int mShapeType; //how to draw this object
00057         int mFillType; //how to fill in this object
00058         int mInteractionType; //determines how the object should interact with sensors
00059         int mObjectType; //physical object description, of any
00060 };
00061 
00062 #endif /* LOCALIZATIONMAPENTITY_H_ */
Generated on Sun May 8 08:41:38 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3