Changeset 15 in flair-src for trunk/lib/FlairCore/src/RangeFinderPlot.cpp


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (9 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/RangeFinderPlot.cpp

    r2 r15  
    1111//  version:    $Id: $
    1212//
    13 //  purpose:    Class displaying a 2D plot on the ground station for laser range finder like Hokuyo
     13//  purpose:    Class displaying a 2D plot on the ground station for laser range
     14//  finder like Hokuyo
    1415//
    1516//
     
    2627using namespace flair::core;
    2728
    28 namespace flair { namespace gui {
     29namespace flair {
     30namespace gui {
    2931
    30 RangeFinderPlot::RangeFinderPlot(const LayoutPosition* position,string name,
    31                                  string x_name,float xmin,float xmax,
    32                                  string y_name,float ymin,float ymax,
    33                                  const cvmatrix* datas,float start_angle,float end_angle,uint32_t nb_samples):
    34                                  SendData(position,name,"RangeFinderPlot",200) {
    35     this->datas=datas;
     32RangeFinderPlot::RangeFinderPlot(const LayoutPosition *position, string name,
     33                                 string x_name, float xmin, float xmax,
     34                                 string y_name, float ymin, float ymax,
     35                                 const cvmatrix *datas, float start_angle,
     36                                 float end_angle, uint32_t nb_samples)
     37    : SendData(position, name, "RangeFinderPlot", 200) {
     38  this->datas = datas;
    3639
    37     SetSendSize(datas->GetDataType().GetSize());
     40  SetSendSize(datas->GetDataType().GetSize());
    3841
    39     SetVolatileXmlProp("xmin",xmin);
    40     SetVolatileXmlProp("xmax",xmax);
    41     SetVolatileXmlProp("ymin",ymin);
    42     SetVolatileXmlProp("ymax",ymax);
    43     SetVolatileXmlProp("x_name",x_name);
    44     SetVolatileXmlProp("y_name",y_name);
    45     SetVolatileXmlProp("start_angle",start_angle);
    46     SetVolatileXmlProp("end_angle",end_angle);
    47     SetVolatileXmlProp("nb_samples",nb_samples);
    48     SetVolatileXmlProp("type",datas->GetDataType().GetElementDataType().GetDescription());
    49     SendXml();
     42  SetVolatileXmlProp("xmin", xmin);
     43  SetVolatileXmlProp("xmax", xmax);
     44  SetVolatileXmlProp("ymin", ymin);
     45  SetVolatileXmlProp("ymax", ymax);
     46  SetVolatileXmlProp("x_name", x_name);
     47  SetVolatileXmlProp("y_name", y_name);
     48  SetVolatileXmlProp("start_angle", start_angle);
     49  SetVolatileXmlProp("end_angle", end_angle);
     50  SetVolatileXmlProp("nb_samples", nb_samples);
     51  SetVolatileXmlProp(
     52      "type", datas->GetDataType().GetElementDataType().GetDescription());
     53  SendXml();
    5054
    51     if(datas->Cols()!=1 || datas->Rows()!=nb_samples) Err("Wrong input matrix size\n");
     55  if (datas->Cols() != 1 || datas->Rows() != nb_samples)
     56    Err("Wrong input matrix size\n");
    5257}
    5358
    5459RangeFinderPlot::~RangeFinderPlot() {}
    5560
    56 void RangeFinderPlot::CopyDatas(char* buf) const {
    57     datas->GetMutex();
    58     memcpy(buf,datas->getCvMat()->data.ptr,datas->GetDataType().GetSize());
    59     datas->ReleaseMutex();
     61void RangeFinderPlot::CopyDatas(char *buf) const {
     62  datas->GetMutex();
     63  memcpy(buf, datas->getCvMat()->data.ptr, datas->GetDataType().GetSize());
     64  datas->ReleaseMutex();
    6065}
    6166
Note: See TracChangeset for help on using the changeset viewer.