[2] | 1 | // %flair:license{
|
---|
| 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 4 | // %flair:license}
|
---|
| 5 | /*!
|
---|
| 6 | * \file RangeFinderPlot.h
|
---|
| 7 | * \brief Class displaying a 2D plot on the ground station for laser range finder like Hokuyo
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2014/07/23
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef RANGEFINDERPLOT_H
|
---|
| 14 | #define RANGEFINDERPLOT_H
|
---|
| 15 |
|
---|
| 16 | #include <SendData.h>
|
---|
| 17 | #include <stdint.h>
|
---|
| 18 |
|
---|
| 19 | namespace flair
|
---|
| 20 | {
|
---|
| 21 | namespace core
|
---|
| 22 | {
|
---|
| 23 | class cvmatrix;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | namespace flair
|
---|
| 28 | {
|
---|
| 29 | namespace gui
|
---|
| 30 | {
|
---|
| 31 |
|
---|
| 32 | class LayoutPosition;
|
---|
| 33 |
|
---|
| 34 | /*! \class RangeFinderPlot
|
---|
| 35 | *
|
---|
| 36 | * \brief Class displaying a 2D plot on the ground station for laser range finder like Hokuyo
|
---|
| 37 | *
|
---|
| 38 | */
|
---|
| 39 | class RangeFinderPlot: public SendData
|
---|
| 40 | {
|
---|
| 41 | public:
|
---|
| 42 | /*!
|
---|
| 43 | * \brief Constructor
|
---|
| 44 | *
|
---|
| 45 | * Construct a 2D plot at given position. \n
|
---|
| 46 | * The RangeFinderPlot will automatically be child of position->getLayout() Layout. After calling this constructor,
|
---|
| 47 | * position will be deleted as it is no longer usefull.
|
---|
| 48 | *
|
---|
| 49 | * \param position position to display the plot
|
---|
| 50 | * \param name name
|
---|
| 51 | * \param x_name name of x axis
|
---|
| 52 | * \param xmin default xmin of the plot
|
---|
| 53 | * \param xmax default xmax of the plot
|
---|
| 54 | * \param y_name name of y axis
|
---|
| 55 | * \param ymin default ymin of the plot
|
---|
| 56 | * \param ymax default ymax of the plot
|
---|
| 57 | * \param datas laser datas
|
---|
| 58 | * \param start_angle start angle of the laser
|
---|
| 59 | * \param end_angle end angle of the laser
|
---|
| 60 | * \param nb_samples number of samples
|
---|
| 61 | */
|
---|
| 62 | RangeFinderPlot(const LayoutPosition* position,std::string name,
|
---|
| 63 | std::string x_name,float xmin,float xmax,
|
---|
| 64 | std::string y_name,float ymin,float ymax,
|
---|
| 65 | const core::cvmatrix* datas,float start_angle,float end_angle,uint32_t nb_samples);
|
---|
| 66 |
|
---|
| 67 | /*!
|
---|
| 68 | * \brief Destructor
|
---|
| 69 | *
|
---|
| 70 | */
|
---|
| 71 | ~RangeFinderPlot();
|
---|
| 72 |
|
---|
| 73 | private:
|
---|
| 74 | /*!
|
---|
| 75 | * \brief Copy datas to specified buffer
|
---|
| 76 | *
|
---|
| 77 | * Reimplemented from SendData.
|
---|
| 78 | *
|
---|
| 79 | * \param buf output buffer
|
---|
| 80 | */
|
---|
| 81 | void CopyDatas(char* buf) const;
|
---|
| 82 |
|
---|
| 83 | /*!
|
---|
| 84 | * \brief Extra Xml event
|
---|
| 85 | *
|
---|
| 86 | * Reimplemented from SendData.
|
---|
| 87 | */
|
---|
| 88 | void ExtraXmlEvent(void){};
|
---|
| 89 |
|
---|
| 90 | const core::cvmatrix* datas;
|
---|
| 91 | };
|
---|
| 92 |
|
---|
| 93 | } // end namespace gui
|
---|
| 94 | } // end namespace flair
|
---|
| 95 |
|
---|
| 96 | #endif // RANGEFINDERPLOT_H
|
---|