Wildmeshing Toolkit
PositionMapEvaluator.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <memory>
3
#include <
wmtk/Types.hpp
>
4
#include <wmtk/image/Sampling.hpp>
5
6
namespace
wmtk::image
{
7
class
Image;
8
class
SamplingAnalyticFunction;
9
}
// namespace wmtk::image
10
11
namespace
wmtk::function::utils
{
12
class
PositionMapEvaluator
13
{
14
protected
:
15
std::unique_ptr<wmtk::image::Sampling>
m_sampling
;
16
17
public
:
18
PositionMapEvaluator
();
19
~PositionMapEvaluator
();
20
PositionMapEvaluator
(
PositionMapEvaluator
&&);
// move assignment operator
21
PositionMapEvaluator
&
operator=
(
PositionMapEvaluator
&&);
// move assignment operator
22
29
PositionMapEvaluator
(
const
image::Image& image);
30
31
PositionMapEvaluator
(
32
const
wmtk::image::SamplingAnalyticFunction::FunctionType type,
33
const
double
a,
34
const
double
b,
35
const
double
c);
36
37
38
// Dont forget to update this if we change autodiff tyeps (add declarations in the cpp)
39
template
<
typename
T>
40
Vector3<T>
uv_to_pos
(
const
Vector2<T>
& uv)
const
41
{
42
return
Vector3<T>
(uv.x(), uv.y(),
m_sampling
->sample(uv.x(), uv.y()));
43
}
44
};
45
46
}
// namespace wmtk::function::utils
Types.hpp
wmtk::function::utils::PositionMapEvaluator
Definition:
PositionMapEvaluator.hpp:13
wmtk::function::utils::PositionMapEvaluator::uv_to_pos
Vector3< T > uv_to_pos(const Vector2< T > &uv) const
Definition:
PositionMapEvaluator.hpp:40
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(PositionMapEvaluator &&)
wmtk::function::utils::PositionMapEvaluator::PositionMapEvaluator
PositionMapEvaluator()
wmtk::function::utils::PositionMapEvaluator::~PositionMapEvaluator
~PositionMapEvaluator()
wmtk::function::utils
Definition:
amips.cpp:5
wmtk::image
Definition:
PositionMapEvaluator.hpp:6
wmtk::Vector3
Vector< T, 3 > Vector3
Definition:
Types.hpp:24
wmtk::Vector2
Vector< T, 2 > Vector2
Definition:
Types.hpp:22
src
wmtk
function
utils
PositionMapEvaluator.hpp
Generated by
1.9.1