Euclid
Geometry Processing and Shape Analysis in C++
WKS.h
1 #pragma once
2 
3 #include <Eigen/Core>
4 #include <Euclid/MeshUtil/MeshDefs.h>
5 
6 namespace Euclid
7 {
20 template<typename Mesh>
21 class WKS
22 {
23 public:
24  using FT = FT_t<Mesh>;
25  using Vec = Eigen::Matrix<FT, Eigen::Dynamic, 1>;
26  using Mat = Eigen::Matrix<FT, Eigen::Dynamic, Eigen::Dynamic>;
27 
28 public:
38  void build(const Mesh& mesh, unsigned k = 300);
39 
48  void build(const Mesh& mesh,
49  const Vec* eigenvalues,
50  const Mat* eigenfunctions);
51 
63  template<typename Derived>
64  void compute(Eigen::ArrayBase<Derived>& wks,
65  unsigned escales = 100,
66  float emin = 0.0f,
67  float emax = -1.0f,
68  float sigma = -1.0f);
69 
70 private:
71  const Mesh* _mesh;
72  Mat _phi2;
73  Vec _loglambda;
74  FT _lambda_max;
75  FT _lambda_min;
76 };
77 
79 } // namespace Euclid
80 
81 #include "src/WKS.cpp"
void compute(Eigen::ArrayBase< Derived > &wks, unsigned escales=100, float emin=0.0f, float emax=-1.0f, float sigma=-1.0f)
Compute wks for all vertices.
Definition: WKS.cpp:38
Definition: AABB.h:6
Wave kernel signature.
Definition: WKS.h:21
void build(const Mesh &mesh, unsigned k=300)
Build up the necessary computational components.
Definition: WKS.cpp:12