-
Notifications
You must be signed in to change notification settings - Fork 1
/
Get2DTexture.hh
79 lines (64 loc) · 1.89 KB
/
Get2DTexture.hh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// Created by wuschelbueb on 27.06.22.
//
#ifndef OPENFLIPPER_GET2DTEXTURE_HH
#define OPENFLIPPER_GET2DTEXTURE_HH
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <OpenMesh/Core/Utils/PropertyManager.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <MeshTools/MeshSelectionT.hh>
#include <ACG/Geometry/Types/PlaneT.hh>
#include <ACG/Scenegraph/TransformNode.hh>
#include <ACG/Utils/ColorCoder.hh>
#include <CoMISo/Solver/ConstrainedSolver.hh>
#include <gmm/gmm.h>
#include <functional>
#include <iostream>
#include <vector>
#include <float.h>
#include <cmath>
class Get2DTexture {
public:
using Point = OpenMesh::Vec3d;
// typedef ACG::Vec2d TexCoord2D;
typedef gmm::wsvector<double> CVectorType;
public:
/*
* is the same as:>
* Crossfield(TriMesh &trimesh, std::vector<int> &heInRange) {
* trimesh_ = trimesh;
* heInRange_ = heInRange;
* }
*/
Get2DTexture(TriMesh &trimesh)
: trimesh_{trimesh} {
}
~Get2DTexture() {
}
/**
* initialize property to zero.\n
* @param hp_texture property
*/
void initProperty();
/**
* get vertex position in u,v system.
* @param he halfedge handle
* @param u u parameter of u,v system
* @param v v parameter of u,v system
*/
void setQuadTexHeProperty(OpenMesh::SmartHalfedgeHandle he);
private:
TriMesh &trimesh_;
/**
* get column position in constraint matrix.\n
* is used when a vertex has multiple occurrences.\n
* returns int which indicates which position in vector should be accessed
* @param vh vertex handle
* @param cutGraphZone face property
* @return int
*/
int getPositionConstraintRow(OpenMesh::SmartVertexHandle &vh, int cutGraphZone);
};
#endif //OPENFLIPPER_GET2DTEXTURE_HH