orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
featuremap2dpainter.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef QORC_FEATUREMAP2D_PAINTER_H 00012 #define QORC_FEATUREMAP2D_PAINTER_H 00013 00014 00015 #include <qcolor.h> 00016 #include <orca/featuremap2d.h> 00017 #include <hydroqguielementutil/definitions2d.h> 00018 #include <hydroqgui/hydroqgui.h> 00019 00020 // forward declarations 00021 class QPainter; 00022 00023 namespace orcaqgui2d { 00024 00025 00026 class FeatureMap2dPainter 00027 { 00028 public: 00029 FeatureMap2dPainter(); 00030 ~FeatureMap2dPainter(); 00031 00032 void setData( const orca::FeatureMap2dData &featureData ); 00033 void paint( QPainter *p, int z ); 00034 bool paintThisLayer(int z) const {return z==hydroqguielementutil::Z_SLAM_MAP;} 00035 void setUseTransparency( bool useTransparency ) { useTransparency_= useTransparency; }; 00036 00037 void clear(); 00038 00039 void toggleFeatureNumbers() { displayFeatureNumbers_ = !displayFeatureNumbers_; } 00040 void toggleUncertainty() { displayUncertainty_ = !displayUncertainty_; } 00041 00042 int saveMap( const QString fileName, hydroqguielementutil::IHumanManager *humanManager ) const; 00043 00044 private: 00045 00046 void 00047 paintPointFeature( QPainter *painter, 00048 int featureType, 00049 int featureNum, 00050 double probExists, 00051 double centreX, 00052 double centreY, 00053 double covXX, 00054 double covXY, 00055 double covYY ); 00056 00057 void paintPointFeature( QPainter *painter, 00058 const orca::CartesianPointFeature2d &f, 00059 int featureNum ); 00060 void paintPoseFeature( QPainter *painter, 00061 const orca::CartesianPoseFeature2d &f, 00062 int featureNum ); 00063 void paintLineFeature( QPainter *painter, 00064 const orca::CartesianLineFeature2d &f, 00065 int featureNum ); 00066 00067 orca::FeatureMap2dData data_; 00068 bool useTransparency_; 00069 bool displayFeatureNumbers_; 00070 bool displayUncertainty_; 00071 }; 00072 00073 } 00074 00075 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)