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
|
particle2dpainter.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 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_PARTICLE2D_PAINTER_H 00012 #define ORCAGUI_PARTICLE2D_PAINTER_H 00013 00014 #include <QVector> 00015 #include <QLine> 00016 #include <orca/particle2d.h> 00017 #include <hydroqguielementutil/definitions2d.h> 00018 00019 // forward declarations 00020 class QPainter; 00021 00022 namespace orcaqgui2d { 00023 00028 class Particle2dPainter 00029 { 00030 00031 public: 00032 Particle2dPainter( int particlePenThickness=30 ); 00033 ~Particle2dPainter(); 00034 00035 void setData( const orca::Particle2dData& particleData ); 00036 void setColor( QColor color ); 00037 void paint( QPainter *p, int z1 ); 00038 bool paintThisLayer(int z) const { return z==hydroqguielementutil::Z_POSE+2; } 00039 void setUseTransparency( bool useTransparency ) { useTransparency_= useTransparency; }; 00040 void clear(); 00041 00042 private: 00043 00044 QVector<QLineF> qParticles_; // in mm 00045 std::vector<float> weights_; 00046 float maxWeight_; 00047 int particlePenThickness_; 00048 00049 bool useTransparency_; 00050 QColor activeColour_; 00051 QColor kaputColour_; 00052 QColor currentColour_; 00053 }; 00054 00055 } 00056 00057 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)