Technische Universität Wien
Orientation and Processing of Airborne Laser Scanning data
Department of Geodesy and Geoinformation - Research Groups Photogrammetry and Remote Sensing
distroDM
c++_api
inc
DM
IPointSet.hpp
1
#pragma once
2
3
#include "DM/config.hpp"
4
#include "DM/IAddInfoLayout.hpp"
5
#include "DM/Handle.hpp"
6
#include "DM/IGeometry.hpp"
7
#include "DM/IAddInfo.hpp"
8
#include "DM/IAddInfoContainer.hpp"
9
#include "DM/IPoint.hpp"
10
#include "DM/Iterator.hpp"
11
#include "DM/AutoLink.hpp"
//enable autolink
12
13
DM_NAMESPACE_BEGIN
14
15
/// \brief a set of 3d point object
16
class
DM_API
IPointSet
:
public
IGeometry
17
{
18
public
:
19
typedef
ConstIterator<IPoint>
const_iterator_point
;
///< Point iterator
20
21
///create a new point set with size points
22
static
IPointSet
* New(
unsigned
size = 0);
23
24
protected
:
25
virtual
~
IPointSet
() {}
26
27
public
:
28
virtual
unsigned
sizePoint()
const
= 0;
///< number of points within the set
29
virtual
void
reservePoint(
unsigned
size) = 0;
///< reserve memory for points
30
virtual
void
resizePoint(
unsigned
resize) = 0;
///< resize memory for points
31
virtual
void
removePoint(
unsigned
) = 0;
///< remove points at the given index
32
virtual
void
clearPoint() = 0;
///< remove all points from point set
33
virtual
void
addPoint(
const
DM::IPoint
&pt) = 0;
34
virtual
void
addPoint(
const
DM::PointHandle
&pt) = 0;
35
virtual
void
addPoint(
double
x,
double
y,
double
z) = 0;
36
37
/// \brief sorting points by distance to given reference point
38
/**
39
\param[in] refPt reference point used for distance computation
40
\param[in] dim dimension of distance (2 = 2d distance, 3 = 3d distance)
41
\param[in] ascending sort in ascending or descending order
42
*/
43
virtual
void
sortByDistance(
const
DM::IPoint
&refPt,
int
dim,
bool
ascending =
true
) = 0;
44
/// \brief sorting points by distance to given reference point and remove points that exceeds a certain distance
45
/**
46
\param[in] refPt reference point used for distance computation
47
\param[in] dim dimension of distance (2 = 2d distance, 3 = 3d distance)
48
\param[in] maxDistance all points that are further away than the given distance are dropped
49
\param[in] ascending sort in ascending or descending order
50
*/
51
virtual
void
sortByDistanceAndClip(
const
DM::IPoint
&refPt,
int
dim,
double
maxDistance,
bool
ascending =
true
) = 0;
52
53
virtual
const_iterator_point beginPoint()
const
= 0;
54
virtual
const_iterator_point endPoint()
const
= 0;
55
56
virtual
const
IPoint
& operator[](
unsigned
)
const
= 0;
57
virtual
IPoint
& operator[](
unsigned
) = 0;
58
59
virtual
const
PointHandle
& operator()(
unsigned
idx)
const
= 0;
60
virtual
PointHandle
& operator()(
unsigned
idx) = 0;
61
};
62
63
typedef
Handle< IPointSet > PointSetHandle;
64
65
DM_NAMESPACE_END
DM::ConstIterator
Definition:
Iterator.hpp:96
DM::IGeometry
Base class of all geometry objects.
Definition:
IGeometry.hpp:26
DM::IPointSet::const_iterator_point
ConstIterator< IPoint > const_iterator_point
Point iterator.
Definition:
IPointSet.hpp:19
DM::Handle
Smart pointer class using reference counting with support for DM objects (see ObjectBase)
Definition:
Handle.hpp:98
DM::IPointSet
a set of 3d point object
Definition:
IPointSet.hpp:16
DM::IPoint
3d point object
Definition:
IPoint.hpp:14