-
Notifications
You must be signed in to change notification settings - Fork 2
/
poisson.h
40 lines (30 loc) · 1.44 KB
/
poisson.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef POISSON_H
#define POISSON_H
#include <vector>
#include <Eigen/StdVector>
#include <Eigen/Sparse>
#include "poissonhelper.h"
EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Matrix2f)
EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Matrix3f)
EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Matrix3i)
using namespace Eigen;
class Poisson
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Poisson();
void reconstruct(const std::string infile, const std::string outfile);
void fillDivergenceVector(std::vector<Vector3f> positions, std::vector<Vector3f> normals,
int gridWidth, int gridHeight, int gridDepth, float cellWidth,
Vector3f corner, std::map<int, Vector3f> vectorField, Eigen::VectorXf &b);
void pointCloudToVectorField(std::vector<Vector3f> positions, std::vector<Vector3f> normals,
int gridWidth, int gridHeight, int gridDepth, float cellWidth,
Vector3f corner, std::map<int, Vector3f> &vectorField);
void fillLaplacianMatrix(int gridWidth, int gridHeight, int gridDepth, Eigen::SparseMatrix<float> &L);
void meshIsosurface(Eigen::VectorXf surface, std::vector<Vector3f> positions,
int gridWidth, int gridHeight, int gridDepth, float cellWidth,
Vector3f corner, std::string outfile);
private:
PoissonHelper poissonHelper;
};
#endif // POISSON_H