Euclid
Geometry Processing and Shape Analysis in C++
HolomorphicOneForms.h
1 
11 #pragma once
12 
13 #include <CGAL/boost/graph/Seam_mesh.h>
14 #include <CGAL/Surface_mesh_parameterization/Error_code.h>
15 #include <Eigen/Dense>
16 #include <Euclid/Topology/Chain.h>
17 
18 namespace Euclid
19 {
28 template<typename Mesh, typename DerivedA, typename DerivedB>
29 void holomorphic_one_form_basis(const Mesh& mesh,
30  Eigen::MatrixBase<DerivedA>& primal,
31  Eigen::MatrixBase<DerivedB>& conjugate);
32 
40 template<typename Mesh, typename DerivedA, typename DerivedB>
41 void holomorphic_one_form_basis(const Mesh& mesh,
42  const VertexChains<Mesh>& homology_generators,
43  Eigen::MatrixBase<DerivedA>& primal,
44  Eigen::MatrixBase<DerivedB>& conjugate);
45 
54 template<typename Mesh,
55  typename Derived,
56  typename SEM,
57  typename SVM,
58  typename VertexUVMap>
60  const Mesh& mesh,
61  const Eigen::MatrixBase<Derived>& one_forms,
62  CGAL::Seam_mesh<Mesh, SEM, SVM>& seam_mesh,
63  VertexUVMap uvmap);
64 
70 template<typename Mesh, typename SEM, typename SVM>
72 {
73 public:
74  using TriangleMesh = CGAL::Seam_mesh<Mesh, SEM, SVM>;
75  using halfedge_descriptor =
76  typename boost::graph_traits<TriangleMesh>::halfedge_descriptor;
77 
78 public:
83  explicit Holomorphic_one_forms_parameterizer3(const Mesh& mesh);
84 
91  const Mesh& mesh,
92  const VertexChains<Mesh>& homology_generators);
93 
102  template<typename Derived>
103  void set_coeffs(const Eigen::MatrixBase<Derived>& coeffs);
104 
116  template<typename VertexUVMap,
117  typename VertexIndexMap,
118  typename VertexParameterizedMap>
119  CGAL::Surface_mesh_parameterization::Error_code parameterize(
120  TriangleMesh& mesh,
121  halfedge_descriptor bhd,
122  VertexUVMap uvmap,
123  VertexIndexMap vimap,
124  VertexParameterizedMap vpmap);
125 
126 private:
127  using Scalar = typename CGAL::Kernel_traits<typename boost::property_traits<
128  typename boost::property_map<Mesh, boost::vertex_point_t>::type>::
129  value_type>::Kernel::FT;
130  using Vector = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
131  using Matrix = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
132 
133 private:
134  const Mesh& _underlying_mesh;
135  Matrix _primal;
136  Matrix _conjugate;
137  Matrix _one_forms;
138 };
139 
141 } // namespace Euclid
142 
143 #include "src/HolomorphicOneForms.cpp"
Compute plane parameterization with holomorphic 1-forms.
Definition: HolomorphicOneForms.h:71
void set_coeffs(const Eigen::MatrixBase< Derived > &coeffs)
Set the coeffecients for the basis.
Definition: HolomorphicOneForms.cpp:233
Definition: AABB.h:6
CGAL::Surface_mesh_parameterization::Error_code parameterize(TriangleMesh &mesh, halfedge_descriptor bhd, VertexUVMap uvmap, VertexIndexMap vimap, VertexParameterizedMap vpmap)
Parameterize the surface.
Definition: HolomorphicOneForms.cpp:246
void integrate_holomorphic_one_forms(const Mesh &mesh, const Eigen::MatrixBase< Derived > &one_forms, CGAL::Seam_mesh< Mesh, SEM, SVM > &seam_mesh, VertexUVMap uvmap)
Integrate holomorphic 1-forms.
Definition: HolomorphicOneForms.cpp:192
void holomorphic_one_form_basis(const Mesh &mesh, const VertexChains< Mesh > &homology_generators, Eigen::MatrixBase< DerivedA > &primal, Eigen::MatrixBase< DerivedB > &conjugate)
Compute the holomorphic basis.
Definition: HolomorphicOneForms.cpp:132
Holomorphic_one_forms_parameterizer3(const Mesh &mesh)
Constructor.
Definition: HolomorphicOneForms.cpp:209