Wildmeshing Toolkit
PositionMapEvaluator.cpp
Go to the documentation of this file.
1
#include "
PositionMapEvaluator.hpp
"
2
#include <wmtk/function/PerSimplexDifferentiableAutodiffFunction.hpp>
3
#include <wmtk/image/Image.hpp>
4
#include <wmtk/image/Sampling.hpp>
5
#include <wmtk/image/bicubic_interpolation.hpp>
6
7
8
namespace
wmtk::function::utils
{
9
10
PositionMapEvaluator::PositionMapEvaluator
() =
default
;
11
PositionMapEvaluator::~PositionMapEvaluator
() =
default
;
12
PositionMapEvaluator::PositionMapEvaluator
(PositionMapEvaluator&&) =
13
default
;
// move assignment operator
14
PositionMapEvaluator&
PositionMapEvaluator::operator=
(PositionMapEvaluator&&) =
15
default
;
// move assignment operator
16
23
PositionMapEvaluator::PositionMapEvaluator
(
const
image::Image& image)
24
{
25
m_sampling
= std::make_unique<wmtk::image::SamplingBicubic>(image);
26
}
27
28
PositionMapEvaluator::PositionMapEvaluator
(
29
const
wmtk::image::SamplingAnalyticFunction::FunctionType type,
30
const
double
a,
31
const
double
b,
32
const
double
c)
33
{
34
m_sampling
= std::make_unique<wmtk::image::SamplingAnalyticFunction>(type, a, b, c);
35
}
36
/*
37
template <typename T>
38
Vector3<T> PositionMapEvaluator::uv_to_pos(const Vector2<T>& uv) const
39
{
40
return Vector3<T>(uv.x(), uv.y(), m_sampling->sample(uv.x(), uv.y()));
41
}
42
43
template <>
44
Vector3<double> PositionMapEvaluator::uv_to_pos(const Vector2<double>& uv) const;
45
46
47
template <>
48
auto PositionMapEvaluator::uv_to_pos(const
49
Vector2<wmtk::function::PerSimplexDifferentiableAutodiffFunction::DScalar>& uv) const ->
50
Vector3<wmtk::function::PerSimplexDifferentiableAutodiffFunction::DScalar>;
51
*/
52
}
// namespace wmtk::function::utils
PositionMapEvaluator.hpp
wmtk::function::utils::PositionMapEvaluator::m_sampling
std::unique_ptr< wmtk::image::Sampling > m_sampling
Definition:
PositionMapEvaluator.hpp:15
wmtk::function::utils::PositionMapEvaluator::operator=
PositionMapEvaluator & operator=(PositionMapEvaluator &&)
wmtk::function::utils::PositionMapEvaluator::PositionMapEvaluator
PositionMapEvaluator()
wmtk::function::utils::PositionMapEvaluator::~PositionMapEvaluator
~PositionMapEvaluator()
wmtk::function::utils
Definition:
amips.cpp:5
src
wmtk
function
utils
PositionMapEvaluator.cpp
Generated by
1.9.1