Ponca
aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
Loading...
Searching...
No Matches
defines.h
1
/*
2
This Source Code Form is subject to the terms of the Mozilla Public
3
License, v. 2.0. If a copy of the MPL was not distributed with this
4
file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
*/
6
7
8
#pragma once
9
18
#include "../Common/defines.h"
19
20
#define PONCA_EXPLICIT_CAST_OPERATORS(CLASSNAME,CONVERTER) \
21
\
22
PONCA_MULTIARCH inline \
23
CLASSNAME<DataPoint, _WFunctor, T>& CONVERTER() \
24
{ return * static_cast<CLASSNAME<DataPoint, _WFunctor, T>*>(this); } \
25
\
26
PONCA_MULTIARCH inline \
27
const CLASSNAME<DataPoint, _WFunctor, T>& CONVERTER() const \
28
{ return * static_cast<const CLASSNAME<DataPoint, _WFunctor, T>*>(this); }
29
30
// CAST OPERATORS
31
32
#define PONCA_EXPLICIT_CAST_OPERATORS_DER(CLASSNAME,CONVERTER) \
33
\
34
PONCA_MULTIARCH inline \
35
CLASSNAME<DataPoint, _WFunctor, DiffType, T>& CONVERTER() \
36
{ return * static_cast<CLASSNAME<DataPoint, _WFunctor, DiffType, T>*>(this); } \
37
\
38
PONCA_MULTIARCH inline \
39
const CLASSNAME<DataPoint, _WFunctor, DiffType, T>& CONVERTER() const \
40
{ return * static_cast<const CLASSNAME<DataPoint, _WFunctor, DiffType, T>*>(this); }
41
42
43
// FIT DEFAULT TYPES
44
46
#define PONCA_FITTING_DECLARE_DEFAULT_TYPES \
47
protected: \
48
using Base = T; \
49
public: \
50
using Scalar = typename DataPoint::Scalar; \
51
using VectorType = typename Base::VectorType; \
52
using WFunctor = typename Base::WFunctor;
55
#define PONCA_FITTING_DECLARE_MATRIX_TYPE \
56
public: \
57
using MatrixType = typename DataPoint::MatrixType; \
58
60
#define PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES \
61
public: \
62
using ScalarArray = typename Base::ScalarArray; \
63
using VectorArray = typename Base::VectorArray;
65
// FIT API DOCUMENTATION
66
#define PONCA_FITTING_APIDOC_SETWFUNC \
67
68
#define PONCA_FITTING_APIDOC_INIT \
69
70
#define PONCA_FITTING_APIDOC_ADDNEIGHBOR \
71
72
#define PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER \
73
74
#define PONCA_FITTING_APIDOC_FINALIZE \
75
77
// FIT API DECLARATION
78
80
#define PONCA_FITTING_IS_SIGNED(IS_SIGNED) \
81
\
82
PONCA_MULTIARCH inline \
83
constexpr bool isSigned() { return IS_SIGNED; }
84
86
#define PONCA_FITTING_DECLARE_INIT \
87
PONCA_FITTING_APIDOC_INIT \
88
PONCA_MULTIARCH inline void init (const VectorType& _evalPos);
89
91
#define PONCA_FITTING_DECLARE_ADDNEIGHBOR \
92
PONCA_FITTING_APIDOC_ADDNEIGHBOR \
93
PONCA_MULTIARCH inline bool addLocalNeighbor(Scalar w, const VectorType &localQ, const DataPoint &attributes);
94
96
#define PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
97
PONCA_FITTING_APIDOC_ADDNEIGHBOR_DER \
98
PONCA_MULTIARCH inline bool \
99
addLocalNeighbor(Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw);
100
102
#define PONCA_FITTING_DECLARE_FINALIZE \
103
PONCA_FITTING_APIDOC_FINALIZE \
104
PONCA_MULTIARCH inline FIT_RESULT finalize();
105
106
#define PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE \
107
PONCA_FITTING_DECLARE_INIT \
108
PONCA_FITTING_DECLARE_ADDNEIGHBOR \
109
PONCA_FITTING_DECLARE_FINALIZE
110
111
#define PONCA_FITTING_DECLARE_INIT_ADDDER_FINALIZE \
112
PONCA_FITTING_DECLARE_INIT \
113
PONCA_FITTING_DECLARE_ADDNEIGHBOR_DER \
114
PONCA_FITTING_DECLARE_FINALIZE
src
Ponca
src
Fitting
defines.h
Generated on Tue Oct 29 2024 09:49:07 for Ponca by
1.9.6