SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
smtk
mesh
interpolation
InverseDistanceWeighting.h
1
//=========================================================================
2
// Copyright (c) Kitware, Inc.
3
// All rights reserved.
4
// See LICENSE.txt for details.
5
//
6
// This software is distributed WITHOUT ANY WARRANTY; without even
7
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8
// PURPOSE. See the above copyright notice for more information.
9
//=========================================================================
10
11
#ifndef smtk_mesh_InverseDistanceWeighting_h
12
#define smtk_mesh_InverseDistanceWeighting_h
13
14
#include "smtk/CoreExports.h"
15
#include "
smtk/PublicPointerDefs.h
"
16
17
#include <array>
18
#include <functional>
19
20
namespace
smtk
21
{
22
namespace
mesh
23
{
24
25
class
PointCloud;
26
class
StructuredGrid;
27
37
class
SMTKCORE_EXPORT
InverseDistanceWeighting
38
{
39
public
:
40
InverseDistanceWeighting
(
41
const
PointCloud
& pointcloud,
42
double
power = 1.,
43
std::function<
bool
(
double
)> prefilter = [](
double
) {
return
true
; });
44
InverseDistanceWeighting
(
45
const
StructuredGrid
& structuredgrid,
46
double
power = 1.,
47
std::function<
bool
(
double
)> prefilter = [](
double
) {
return
true
; });
48
49
double
operator()(std::array<double, 3> x)
const
{
return
m_function(x); }
50
51
private
:
52
std::function<double(std::array<double, 3>)> m_function;
53
};
54
}
// namespace mesh
55
}
// namespace smtk
56
57
#endif
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition:
doc.h:33
PublicPointerDefs.h
smtk::mesh::PointCloud
A wrapper for point cloud data.
Definition:
PointCloud.h:37
smtk::mesh::InverseDistanceWeighting
A functor that converts an external data set into a continuous field via inverse distance weighting.
Definition:
InverseDistanceWeighting.h:37
smtk::mesh::StructuredGrid
A wrapper for structured data.
Definition:
StructuredGrid.h:35
Generated by
1.8.17