MrSID Decode SDK for LiDAR Reference Manual
1.1.3.4427
Main Page
Classes
Files
File List
File Members
PointIterator.h
Go to the documentation of this file.
1
/* //////////////////////////////////////////////////////////////////////////
2
// //
3
// This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western //
4
// Avenue, Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5
// prohibited. Access to and use of this code is permitted only under //
6
// license from LizardTech, Inc. Portions of the code are protected by //
7
// US and foreign patents and other filings. All Rights Reserved. //
8
// //
10
/* PUBLIC */
11
12
#ifndef __LIDAR_POINT_ITERATOR_H__
13
#define __LIDAR_POINT_ITERATOR_H__
14
15
#include "
lidar/Types.h
"
16
#include "
lidar/Object.h
"
17
#include "
lidar/PointData.h
"
18
#include "
lidar/ProgressDelegate.h
"
19
20
LT_BEGIN_LIDAR_NAMESPACE
21
31
class
PointIterator
:
public
Object
32
{
33
ABSTRACT_OBJECT(
PointIterator
);
34
public
:
43
virtual
size_t
getNextPoints
(
PointData
&points) = 0;
44
45
protected
:
60
void
init
(
const
Bounds
&bounds,
61
double
fraction,
62
const
PointInfo
&pointInfo,
63
ProgressDelegate
*delegate);
64
68
inline
bool
useSample
(
double
x,
double
y,
double
z)
69
{
70
if
(!
m_bounds
.contains(x, y, z))
71
return
false
;
72
else
73
{
74
m_accumulator
+=
m_fraction
;
75
if
(
m_accumulator
>
m_cutoff
)
76
{
77
m_accumulator
-= 1;
78
return
true
;
79
}
80
else
81
return
false
;
82
}
83
}
84
85
Bounds
m_bounds
;
86
double
m_fraction
;
87
double
m_accumulator
;
88
double
m_cutoff
;
89
ProgressDelegate
*
m_delegate
;
90
};
91
92
93
#define CONCRETE_ITERATOR(classname) \
94
DISABLE_COPY(classname); \
95
public: \
96
static classname *create(void) \
97
{ \
98
return new classname(); \
99
}
100
101
LT_END_LIDAR_NAMESPACE
102
#endif // __LIDAR_POINT_ITERATOR_H__
LizardTech