DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
geometry
surfaces
estimation
CNormalVectorEstimator.h
1
17
#pragma once
18
31
#if defined(CNormalVectorEstimator_RECURSES)
32
#error Recursive header files inclusion detected in CNormalVectorEstimator.h
33
#else // defined(CNormalVectorEstimator_RECURSES)
34
35
#define CNormalVectorEstimator_RECURSES
36
37
#if !defined CNormalVectorEstimator_h
38
39
#define CNormalVectorEstimator_h
40
42
// Inclusions
43
#include <iostream>
44
#include <boost/concept_archetype.hpp>
45
#include "DGtal/base/Common.h"
46
#include "DGtal/topology/CCellularGridSpaceND.h"
48
49
namespace
DGtal
50
{
51
53
// class CNormalVectorEstimator
92
template
<
typename
T>
93
struct
CNormalVectorEstimator
94
{
95
// ----------------------- Concept checks ------------------------------
96
public
:
97
typedef
typename
T::Surface
Surface
;
98
typedef
typename
T::SCell
SCell
;
99
typedef
typename
T::ConstIterator
ConstIterator
;
100
typedef
typename
T::Quantity
Quantity
;
101
102
BOOST_CONCEPT_ASSERT
((
CCellularGridSpaceND< typename Surface::KSpace >
));
103
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< SCell, typename Surface::SCell >::value
));
104
BOOST_CONCEPT_ASSERT
(( boost::InputIterator< ConstIterator > ));
105
106
BOOST_CONCEPT_USAGE
(
CNormalVectorEstimator
)
107
{
108
ConceptUtils::sameType
(
mySurface
,
myX
.surface() );
109
ConceptUtils::sameType
(
myQuantity
,
myX
.eval(
mySCell
) );
110
ConceptUtils::sameType
(
myOutIt
,
myX
.evalAll(
myOutIt
) );
111
checkConstConstraints
();
112
}
113
void
checkConstConstraints
()
const
114
{
115
}
116
// ------------------------- Private Datas --------------------------------
117
private
:
118
T
myX
;
// do not require T to be default constructible.
119
Surface
mySurface
;
120
SCell
mySCell
;
121
Quantity
myQuantity
;
122
boost::output_iterator_archetype<Quantity>
myOutIt
;
123
124
// ------------------------- Internals ------------------------------------
125
private
:
126
127
};
// end of concept CNormalVectorEstimator
128
129
}
// namespace DGtal
130
131
// //
133
134
#endif // !defined CNormalVectorEstimator_h
135
136
#undef CNormalVectorEstimator_RECURSES
137
#endif // else defined(CNormalVectorEstimator_RECURSES)
Generated on Wed Dec 19 2012 19:10:20 for DGtal by
1.8.1.1