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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

localise3dpainter.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp, Ben Upcroft
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 ORCAGUI_LOCALISE3D_PAINTER_H
00011 #define ORCAGUI_LOCALISE3D_PAINTER_H
00012 
00013 #include <QColor>
00014 #include <hydroqguielementutil/definitions2d.h>
00015 #include <orca/localise3d.h>
00016 #include <hydroqguielementutil/paintutils.h>
00017 #include <orcaqgui2dfactory/localise2dpainter.h> // for PlatformType
00018 
00019 // forward declarations
00020 class QPainter;
00021 
00022 namespace orcaqgui2d
00023 {
00024 
00025 class Localise3dPainter
00026 {
00027   public:
00028     // The default color is the color when the robot is not selected.
00029     Localise3dPainter( bool beginDisplayHistory );
00030 
00031     void setData( const orca::Localise3dData& data );
00032     void setPlatformType( PlatformType &type );
00033     
00034     void setTypeAndGeometry( PlatformType type, double length, double width ) { platformType_ = type; length_ = length; width_ = width;};
00035     void setTypeAndGeometry( PlatformType type, double radius ) { platformType_ = type; radius_ = radius; };
00036     void setOrigin( double x, double y, double o ) { originX_ = x; originY_ = y; originRot_ = o; };
00037 
00038     void paint( QPainter *p, int z );
00039     bool paintThisLayer(int z) const {return z==hydroqguielementutil::Z_POSE || z==hydroqguielementutil::Z_POSE-2;}
00040     void setUseTransparency( bool useTransparency ) { useTransparency_= useTransparency; };
00041     void clear();
00042     void setColor( QColor color );
00043     void setFocus( bool inFocus );
00044 
00045     void toggleDisplayHistory()  { isDisplayHistory_ = !isDisplayHistory_; }
00046     void toggleMultiHypothesis() { isDisplayMultiHypothesis_ = !isDisplayMultiHypothesis_; }
00047 
00048   private:
00049       
00050     double length_;
00051     double width_;
00052     double radius_;
00053     PlatformType platformType_;
00054     
00055     double originX_;
00056     double originY_;
00057     double originRot_;
00058 
00059     void paintHypothesis( QPainter* p, const orca::Pose3dHypothesis &hypothesis );
00060 
00061     orca::Localise3dData data_;
00062     bool isDataAvailable_;
00063 
00064     QColor basicColor_;
00065     QColor currentColor_;
00066 
00067     bool useTransparency_;
00068     bool isDisplayHistory_;
00069     hydroqguielementutil::PoseHistory history_;
00070 
00071     bool isDisplayMultiHypothesis_;
00072 };
00073 
00074 }
00075 
00076 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5