ViSP  2.9.0
vpLaserScan.h
1 /****************************************************************************
2  *
3  * $Id: vpLaserScan.h 4649 2014-02-07 14:57:11Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 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  : listScanPoints(), startTimestamp(0), endTimestamp(0), measurementId(0),
72  numSteps(0), startAngle(0), stopAngle(0), numPoints(0)
73  {
74  }
76  vpLaserScan(const vpLaserScan &scan)
77  : listScanPoints(), startTimestamp(0), endTimestamp(0), measurementId(0),
78  numSteps(0), startAngle(0), stopAngle(0), numPoints(0)
79  {
80  startTimestamp = scan.startTimestamp;
81  endTimestamp = scan.endTimestamp;
82  measurementId = scan.measurementId;
83  numSteps = scan.numSteps;
84  startAngle = scan.startAngle;
85  stopAngle = scan.stopAngle;
86  numPoints = scan.numPoints;
87  listScanPoints = scan.listScanPoints;
88  }
90  virtual ~vpLaserScan() {};
92  inline void addPoint(const vpScanPoint &p) {
93  listScanPoints.push_back( p );
94  }
96  inline void clear() {
97  listScanPoints.clear( );
98  }
100  inline std::vector<vpScanPoint> getScanPoints() {
101  return listScanPoints;
102  }
105  inline void setMeasurementId(const unsigned short &id) {
106  this->measurementId = id;
107  }
109  inline void setStartTimestamp(const double &start_timestamp) {
110  this->startTimestamp = start_timestamp;
111  }
113  inline void setEndTimestamp(const double &end_timestamp) {
114  this->endTimestamp = end_timestamp;
115  }
117  inline void setNumSteps(const unsigned short &num_steps) {
118  this->numSteps = num_steps;
119  }
121  inline void setStartAngle(const short &start_angle) {
122  this->startAngle = start_angle;
123  }
125  inline void setStopAngle(const short &stop_angle) {
126  this->stopAngle = stop_angle;
127  }
129  inline void setNumPoints(const unsigned short &num_points) {
130  this->numPoints = num_points;
131  }
133  inline double getStartTimestamp() {
134  return startTimestamp;
135  }
137  inline double getEndTimestamp() {
138  return endTimestamp;
139  }
140 
141  private:
142  std::vector<vpScanPoint> listScanPoints;
143  double startTimestamp;
144  double endTimestamp;
145  unsigned short measurementId;
146  unsigned short numSteps;
147  short startAngle;
148  short stopAngle;
149  unsigned short numPoints;
150 
151 };
152 
153 #endif
std::vector< vpScanPoint > getScanPoints()
Definition: vpLaserScan.h:100
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:96
Class that defines a single laser scanner point.
Definition: vpScanPoint.h:75
void setStartAngle(const short &start_angle)
Definition: vpLaserScan.h:121
void setNumPoints(const unsigned short &num_points)
Definition: vpLaserScan.h:129
virtual ~vpLaserScan()
Definition: vpLaserScan.h:90
double getStartTimestamp()
Definition: vpLaserScan.h:133
void setEndTimestamp(const double &end_timestamp)
Definition: vpLaserScan.h:113
void setNumSteps(const unsigned short &num_steps)
Definition: vpLaserScan.h:117
void addPoint(const vpScanPoint &p)
Definition: vpLaserScan.h:92
void setStartTimestamp(const double &start_timestamp)
Definition: vpLaserScan.h:109
void setMeasurementId(const unsigned short &id)
Definition: vpLaserScan.h:105
vpLaserScan(const vpLaserScan &scan)
Definition: vpLaserScan.h:76
void setStopAngle(const short &stop_angle)
Definition: vpLaserScan.h:125
double getEndTimestamp()
Definition: vpLaserScan.h:137