|
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
|
orcaqgui2dfactory/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 00031 void setData( const orca::FeatureMap2dData &featureData ); 00032 void paint( QPainter *p, int z ); 00033 bool paintThisLayer(int z) const {return z==hydroqguielementutil::Z_SLAM_MAP;} 00034 void setUseTransparency( bool useTransparency ) { useTransparency_= useTransparency; }; 00035 00036 void clear() {} 00037 00038 void toggleFeatureNumbers() { displayFeatureNumbers_ = !displayFeatureNumbers_; } 00039 void toggleUncertainty() { displayUncertainty_ = !displayUncertainty_; } 00040 void toggleDisplay() { isDisplay_ = !isDisplay_; } 00041 void toggleFlashing() { isFlashing_ = !isFlashing_; } 00042 00043 int saveMap( const QString fileName, hydroqguielementutil::IHumanManager *humanManager ) const; 00044 00045 private: 00046 00047 void 00048 paintPointFeature( QPainter *painter, 00049 int featureType, 00050 int featureNum, 00051 double probExists, 00052 double centreX, 00053 double centreY, 00054 double covXX, 00055 double covXY, 00056 double covYY ); 00057 00058 void paintPointFeature( QPainter *painter, 00059 const orca::CartesianPointFeature2d &f, 00060 int featureNum ); 00061 void paintPoseFeature( QPainter *painter, 00062 const orca::CartesianPoseFeature2d &f, 00063 int featureNum ); 00064 void paintLineFeature( QPainter *painter, 00065 const orca::CartesianLineFeature2d &f, 00066 int featureNum ); 00067 00068 orca::FeatureMap2dData data_; 00069 bool useTransparency_; 00070 bool displayFeatureNumbers_; 00071 bool displayUncertainty_; 00072 bool isDisplay_; 00073 bool isFlashing_; 00074 bool isFlashOn_; 00075 }; 00076 00077 } 00078 00079 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5