ViSP  2.8.0
vpLaserScan.h
1 /****************************************************************************
2  *
3  * $Id: vpLaserScan.h 4056 2013-01-05 13:04:42Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Laser scan data structure.
36  *
37  * Authors:
38  * Fabien Spindler
39  *
40  *****************************************************************************/
41 #ifndef vpLaserScan_h
42 #define vpLaserScan_h
43 
51 #include "visp/vpScanPoint.h"
52 
53 #include <vector>
54 
66 class VISP_EXPORT vpLaserScan
67 {
68  public:
71  startTimestamp = 0;
72  endTimestamp = 0;
73  measurementId = 0;
74  numSteps = 0;
75  startAngle = 0;
76  stopAngle = 0;
77  numPoints = 0;
78  }
80  vpLaserScan(const vpLaserScan &scan) {
81  startTimestamp = scan.startTimestamp;
82  endTimestamp = scan.endTimestamp;
83  measurementId = scan.measurementId;
84  numSteps = scan.numSteps;
85  startAngle = scan.startAngle;
86  stopAngle = scan.stopAngle;
87  numPoints = scan.numPoints;
88  listScanPoints = scan.listScanPoints;
89  }
91  virtual ~vpLaserScan() {};
93  inline void addPoint(const vpScanPoint &p) {
94  listScanPoints.push_back( p );
95  }
97  inline void clear() {
98  listScanPoints.clear( );
99  }
101  inline std::vector<vpScanPoint> getScanPoints() {
102  return listScanPoints;
103  }
106  inline void setMeasurementId(const unsigned short &measurementId) {
107  this->measurementId = measurementId;
108  }
110  inline void setStartTimestamp(const double &startTimestamp) {
111  this->startTimestamp = startTimestamp;
112  }
114  inline void setEndTimestamp(const double &endTimestamp) {
115  this->endTimestamp = endTimestamp;
116  }
118  inline void setNumSteps(const unsigned short &numSteps) {
119  this->numSteps = numSteps;
120  }
122  inline void setStartAngle(const short &startAngle) {
123  this->startAngle = startAngle;
124  }
126  inline void setStopAngle(const short &stopAngle) {
127  this->stopAngle = stopAngle;
128  }
130  inline void setNumPoints(const unsigned short &numPoints) {
131  this->numPoints = numPoints;
132  }
134  inline double getStartTimestamp() {
135  return startTimestamp;
136  }
138  inline double getEndTimestamp() {
139  return endTimestamp;
140  }
141 
142  private:
143  std::vector<vpScanPoint> listScanPoints;
144  double startTimestamp;
145  double endTimestamp;
146  unsigned short measurementId;
147  unsigned short numSteps;
148  short startAngle;
149  short stopAngle;
150  unsigned short numPoints;
151 
152 };
153 
154 #endif
void setMeasurementId(const unsigned short &measurementId)
Definition: vpLaserScan.h:106
std::vector< vpScanPoint > getScanPoints()
Definition: vpLaserScan.h:101
void setNumPoints(const unsigned short &numPoints)
Definition: vpLaserScan.h:130
void setStartAngle(const short &startAngle)
Definition: vpLaserScan.h:122
Implements a laser scan data structure that contains especially the list of scanned points that have ...
Definition: vpLaserScan.h:66
void clear()
Definition: vpLaserScan.h:97
void setEndTimestamp(const double &endTimestamp)
Definition: vpLaserScan.h:114
Class that defines a single laser scanner point.
Definition: vpScanPoint.h:74
virtual ~vpLaserScan()
Definition: vpLaserScan.h:91
void setStopAngle(const short &stopAngle)
Definition: vpLaserScan.h:126
double getStartTimestamp()
Definition: vpLaserScan.h:134
void setNumSteps(const unsigned short &numSteps)
Definition: vpLaserScan.h:118
void addPoint(const vpScanPoint &p)
Definition: vpLaserScan.h:93
void setStartTimestamp(const double &startTimestamp)
Definition: vpLaserScan.h:110
vpLaserScan(const vpLaserScan &scan)
Definition: vpLaserScan.h:80
double getEndTimestamp()
Definition: vpLaserScan.h:138