|
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
|
pointcloudpainter.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 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_POINT_CLOUD_PAINTER_H 00012 #define ORCAGUI3D_POINT_CLOUD_PAINTER_H 00013 00014 #include <QColor> 00015 #include <orca/pointcloud.h> 00016 #include <osg/Group> 00017 #include <osg/Geode> 00018 #include <osg/PositionAttitudeTransform> 00019 00020 namespace orcaqgui3d 00021 { 00022 00026 class PointCloudPainter 00027 { 00028 00029 public: 00030 // -1 means 'default' 00031 PointCloudPainter( QColor outlineColor=QColor( 102,102,153, 255 ) ); 00032 00033 void setDescr( const orca::Frame3d &offset, 00034 const orca::Size3d &size ); 00035 00036 void setData( const orca::PointCloudData &pointCloud ); 00037 00038 void clear(); 00039 00040 void setColor( QColor color ); 00041 void setFocus( bool inFocus ); 00042 00043 void toggleDisplayScan() { isDisplayScan_ = !isDisplayScan_; } 00044 void toggleDisplayPoints() { isDisplayPoints_ = !isDisplayPoints_; } 00045 00046 osg::Node *osgNode() const { return root_.get(); } 00047 00048 private: 00049 00050 std::vector<float> ranges_; 00051 std::vector<unsigned char> intensities_; 00052 bool intensitiesValid_; 00053 00054 bool isDisplayScan_; 00055 bool isDisplayPoints_; 00056 00057 QColor outlineColor_; 00058 QColor basisColor_; 00059 00060 osg::ref_ptr<osg::PositionAttitudeTransform> xformNode_; 00061 osg::ref_ptr<osg::Geode> scanNode_; 00062 00063 osg::ref_ptr<osg::Group> root_; 00064 }; 00065 00066 } // namespace 00067 00068 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5