MrSID Decode SDK for LiDAR Reference Manual 1.1.5.5244
PointIterator.h
Go to the documentation of this file.
1//
2// This code is property of Celartem, Inc dba Extensis.
3// Copyright (c) 1995-2023. All rights reserved.
4// Use permitted only under license from Extensis.
5//
6/* PUBLIC */
7
8#ifndef __LIDAR_POINT_ITERATOR_H__
9#define __LIDAR_POINT_ITERATOR_H__
10
11#include "lidar/Types.h"
12#include "lidar/Object.h"
13#include "lidar/PointData.h"
15
16LT_BEGIN_LIDAR_NAMESPACE
17
27class PointIterator : public Object
28{
30public:
39 virtual size_t getNextPoints(PointData &points) = 0;
40};
41
43{
45protected:
56 void init(const Bounds &bounds,
57 const PointInfo &pointInfo,
58 ProgressDelegate *delegate);
59
63 inline bool useSample(double x, double y, double z)
64 {
65 return m_bounds.contains(x, y, z);
66 }
67
70};
71
73{
75protected:
89 void init(const Bounds &bounds,
90 double fraction,
91 const PointInfo &pointInfo,
92 ProgressDelegate *delegate);
93
97 inline bool useSample(double x, double y, double z)
98 {
99 if (!m_bounds.contains(x, y, z))
100 return false;
101 else
102 {
105 {
106 m_accumulator -= 1;
107 return true;
108 }
109 else
110 return false;
111 }
112 }
113
118 double m_cutoff;
119};
120
121
122#define CONCRETE_ITERATOR(classname) \
123 DISABLE_COPY(classname); \
124 public: \
125 static classname *create(void) \
126 { \
127 return new classname(); \
128 }
129
130LT_END_LIDAR_NAMESPACE
131#endif // __LIDAR_POINT_ITERATOR_H__
#define ABSTRACT_OBJECT(classname)
Macros for defining boilerplate parts of derived Object classes.
Definition: Object.h:41
Object is the base class for implementing reference counting.
Definition: Object.h:31
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:182
PointData is a group of ChannelData objects.
Definition: PointData.h:433
PointIterator is the base class for accessing the point cloud.
Definition: PointIterator.h:28
virtual size_t getNextPoints(PointData &points)=0
Get the next set of points.
void init(const Bounds &bounds, const PointInfo &pointInfo, ProgressDelegate *delegate)
Initialize the iterator.
ProgressDelegate * m_delegate
Definition: PointIterator.h:68
bool useSample(double x, double y, double z)
This method does the bounds tests.
Definition: PointIterator.h:63
bool useSample(double x, double y, double z)
This method does the bounds and subsample tests.
Definition: PointIterator.h:97
void init(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)
Initialize the iterator.
ProgressDelegate * m_delegate
ProgressDelegate is the base class for progress and interrupt reporting.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:124

Extensis