INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
orcaqgui3dfactory/laserscanner2dpainter.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 Alex Brooks 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 ORCAGUI3D_LASERSCANNER2D_PAINTER_H 00012 #define ORCAGUI3D_LASERSCANNER2D_PAINTER_H 00013 00014 #include <QColor> 00015 #include <orca/laserscanner2d.h> 00016 #include <osg/Group> 00017 #include <osg/Geode> 00018 #include <osg/PositionAttitudeTransform> 00019 00020 namespace orcaqgui3d 00021 { 00022 00026 class LaserScanner2dPainter 00027 { 00028 00029 public: 00030 // -1 means 'default' 00031 LaserScanner2dPainter( QColor outlineColor=QColor( 102,102,153, 255 ) ); 00032 00033 void setDescr( const orca::Frame3d &offset, 00034 const orca::Size3d &size, 00035 double minRange, 00036 double maxRange ); 00037 00038 void setData( const orca::RangeScanner2dDataPtr &scan ); 00039 00040 void clear(); 00041 00042 void setColor( QColor color ); 00043 void setFocus( bool inFocus ); 00044 00045 void toggleDisplayScan() { isDisplayScan_ = !isDisplayScan_; } 00046 void toggleDisplayPoints() { isDisplayPoints_ = !isDisplayPoints_; } 00047 00048 osg::Node *osgNode() const { return root_.get(); } 00049 00050 private: 00051 00052 std::vector<float> ranges_; 00053 std::vector<unsigned char> intensities_; 00054 bool intensitiesValid_; 00055 00056 bool isDisplayScan_; 00057 bool isDisplayPoints_; 00058 double minRange_; 00059 double maxRange_; 00060 00061 QColor outlineColor_; 00062 QColor basisColor_; 00063 00064 osg::ref_ptr<osg::PositionAttitudeTransform> platformToSensorXformNode_; 00065 osg::ref_ptr<osg::Geode> scanNode_; 00066 00067 osg::ref_ptr<osg::Group> root_; 00068 }; 00069 00070 } // namespace 00071 00072 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)