|
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/laserscanner2dpainter.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 ORCAGUI_LASERSCANNER2D_PAINTER_H 00012 #define ORCAGUI_LASERSCANNER2D_PAINTER_H 00013 00014 #include <QColor> 00015 #include <QPolygonF> 00016 #include <orca/laserscanner2d.h> 00017 #include <hydroqguielementutil/definitions2d.h> 00018 #include <hydroqgui/hydroqgui.h> 00019 00020 class QPainter; 00021 00022 namespace orcaqgui2d 00023 { 00024 00028 class LaserScanner2dPainter 00029 { 00030 00031 public: 00032 // -1 means 'default' 00033 LaserScanner2dPainter( QColor outlineColor=QColor( 102,102,153, 255 ), 00034 float outlineThickness=-1, 00035 float brightReturnWidth=0.2 ); 00036 00037 void setOffset( orca::Frame3d &offset ); 00038 void setData( const orca::RangeScanner2dDataPtr &scan ); 00039 00040 void paint( QPainter *p, int z ); 00041 bool paintThisLayer(int z) const {return z==hydroqguielementutil::Z_LASER;} 00042 00043 void clear(); 00044 00045 void execute( int action ); 00046 00047 void setLaserMaxRange( float laserMaxRange ) { laserMaxRange_ = laserMaxRange; } 00048 00049 void setColor( QColor color ); 00050 void setFocus( bool inFocus ); 00051 00052 private: 00053 00054 std::vector<float> ranges_; 00055 std::vector<unsigned char> intensities_; 00056 bool intensitiesValid_; 00057 00058 // The scan (set of points for drawing the scan outline) 00059 QPolygonF qScan_; 00060 // The actual returns (doesn't include a point at the origin) 00061 QPolygonF qReturns_; 00062 00063 double laserMaxRange_; 00064 00065 bool isDisplayScan_; 00066 bool isDisplayPoints_; 00067 bool isDisplayWalls_; 00068 bool isDisplayReflectors_; 00069 bool isFilledPolygon_; 00070 QColor outlineColor_; 00071 QColor fillColor_; 00072 QColor basisColor_; 00073 float outlineThickness_; 00074 float brightReturnWidth_; 00075 00076 double offsetX_; 00077 double offsetY_; 00078 double offsetYaw_; 00079 double offsetPitch_; 00080 00081 bool isUpsideDown_; 00082 }; 00083 00084 } // namespace 00085 00086 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5