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
Transformation.hpp
1
#pragma once
2
3
#include "DM/config.hpp"
4
#include "DM/Handle.hpp"
5
#include "DM/IGeometry.hpp"
6
7
DM_NAMESPACE_BEGIN
8
9
/// Interface for generic geometry object coordinate transformation
10
class
DM_API
ITrafo
11
{
12
protected
:
13
virtual
~
ITrafo
() {}
14
15
public
:
16
/// \brief returns the dimension of transformation.
17
/// This info helps to optimize the actual transformation process of the geometry objects
18
///
19
/// \return 1 if only z values are changed
20
/// \return 2 for 2d transformations
21
/// \return 3 if all coordinate values may be changed
22
virtual
int
trafoDim()
const
= 0;
23
24
/// \brief returns flag if the chunked transform function should be use
25
/// the chunked transformation may results in high performance
26
virtual
bool
usedChunkedTrafo()
const
= 0;
27
28
/// \brief performs single point coordinate transformation (mandatory interface)
29
/// please note that coordinates must not be changed if not effected by the transformation
30
///
31
/// \param[in,out] x x-coordinate
32
/// \param[in,out] y y-coordinate
33
/// \param[in,out] z z-coordinate
34
/// \param[in] inv inversion flag if transformation should be inverted
35
virtual
void
transform
(
double
&x,
double
&y,
double
&z,
bool
inv =
false
)
const
= 0;
36
37
/// \brief performs chunked coordinate transformation (optional interface)
38
/// please note that coordinates must not be changed if not effected by the transformation
39
///
40
/// \param[in] count number of points
41
/// \param[in,out] x x-coordinate array
42
/// \param[in,out] y y-coordinate array
43
/// \param[in,out] z z-coordinate array
44
/// \param[in] inv inversion flag if transformation should be inverted
45
virtual
void
transform
(
size_t
count
,
double
*x,
double
*y,
double
*z,
bool
inv =
false
)
const
= 0;
46
47
};
48
49
/// \brief provides a generic framework for transforming geometry objects
50
void
DM_API
transform
(
const
ITrafo
&trafo,
IGeometry
&geom,
bool
inv =
false
);
51
52
DM_NAMESPACE_END
DM::ITrafo
Interface for generic geometry object coordinate transformation.
Definition:
Transformation.hpp:10
DM::transform
void DM_API transform(const ITrafo &trafo, IGeometry &geom, bool inv=false)
provides a generic framework for transforming geometry objects
DM::ColumnType::count
@ count
always last element
DM::IGeometry
Base class of all geometry objects.
Definition:
IGeometry.hpp:26