|
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
|
orcaqgui3dfactory/localise2dpainter.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 #ifndef ORCAGUI3D_LOCALISE2D_PAINTER_H 00011 #define ORCAGUI3D_LOCALISE2D_PAINTER_H 00012 00013 #include <QColor> 00014 #include <orca/localise2d.h> 00015 #include <hydroqguielementutil/paintutils.h> 00016 #include <osg/Group> 00017 #include <osg/Geode> 00018 #include <osg/PositionAttitudeTransform> 00019 00020 // forward declarations 00021 class QPainter; 00022 00023 namespace orcaqgui3d 00024 { 00025 00026 class Localise2dPainter 00027 { 00028 public: 00029 Localise2dPainter( bool beginDisplayHistory ); 00030 00031 void setData( const orca::Localise2dData& data ); 00032 void setCubicDescr( double length, 00033 double width, 00034 double height, 00035 const orca::Frame3d &platformToGeometryTransform ); 00036 void setCylindricalDescr( double radius, 00037 double height, 00038 const orca::Frame3d &platformToGeometryTransform ); 00039 00040 void clear(); 00041 void setColor( QColor color ); 00042 void setFocus( bool inFocus ); 00043 00044 void toggleMultiHypothesis() { isDisplayMultiHypothesis_ = !isDisplayMultiHypothesis_; } 00045 void setUseTransparency(bool u) { useTransparency_ = u; } 00046 00047 osg::Node *osgNode() const { return root_.get(); } 00048 00049 private: 00050 00051 void drawCuboidPlatform(); 00052 void drawCylindricalPlatform(); 00053 00054 void paintHypothesis( const orca::Pose2dHypothesis &hypothesis ); 00055 00056 QColor basicColor_; 00057 QColor currentColor_; 00058 00059 bool useTransparency_; 00060 bool isDisplayMultiHypothesis_; 00061 00062 osg::ref_ptr<osg::PositionAttitudeTransform> platformNode_; 00063 00064 osg::ref_ptr<osg::Group> root_; 00065 }; 00066 00067 } 00068 00069 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5