9 #include <QtCore/qmath.h> 13 #include <QTextStream> 21 #include "predicate.h" 22 #include "it_faceiterator.h" 23 #include "it_vertexcirculator.h" 24 #include "it_convexhullcirculator.h" 38 g_Point(
const float &_x,
const float &_y,
const float &_z) : QVector3D(_x, _y, _z) {}
39 friend std::ostream& operator<< (std::ostream& os,
const g_Point &p) {
40 os <<
"[" << p.x() <<
", " << p.y() <<
", " << p.z() <<
"]";
87 void load_off(
const QString &filename);
88 bool load_tri(
const QString &filename);
89 bool load_ctri(
const QString &filename);
90 void save_off(
const QString &name);
107 bool contains(
int triangle,
const QVector3D &point);
108 bool contains(
int triangle,
int point);
109 QVector<FaceIterator> getFacesContainingPoint(
int ind);
110 int add_voronoi_centers();
112 g_Point center_of_gravity(
const g_Face &f);
113 g_Point center_of_circumscribed_circle(
const g_Face & f,
float &r);
114 g_Point center_of_circumscribed_circle(
const g_Face & f);
117 float radius_of_circumscribed_circle(
const g_Face & f);
121 void make_topology();
125 int the_walking_face(
const QVector3D &v);
126 bool isInfiniteFace(
const int &i);
127 bool isInfiniteFace(
const g_Face &f);
134 void triangulation_naive();
135 void add_vertex_naive(
const g_Point &v);
136 void add_vertex_naive(
const int &ind_vertex);
137 void add_point_in_face_naive(
const int &v,
const int &f);
141 void triangulation_delaunay();
142 void add_vertex_inc(
const g_Point &v);
143 void add_vertex_inc(
const int &ind_vertex);
144 void add_point_in_face_inc(
const int &v,
const int &f);
145 void full_flip(
const QVector<QVector<FaceIterator>> & to_flip);
149 void setConstrainedTriangulation();
152 void splitSeg(
const g_Edge &edge);
153 bool isConstrainedEdge(
const g_Edge &e);
155 void removeConstrainedEdge(
const g_Edge &e);
156 bool isWellFormed(
const g_Face &f,
const float &angle = 20);
void swapDisplayCircles()
Swap circumscribed circles display, draw circles or not.
Definition: m_mesh.h:99
Definition: it_vertexcirculator.h:14
Definition: it_faceiterator.h:11
QVector< g_Point > vertices
List of vertices.
Definition: m_mesh.h:165
QVector< QVector< int > > crust_lines
List of Crust edges, used for display.
Definition: m_mesh.h:174
void swapDisplayCrust()
Swap Crust display, draw border or triangulation with Voronoï centers.
Definition: m_mesh.h:97
bool b_circles
Display of circumscribed circles.
Definition: m_mesh.h:183
QVector< int > g_Edge
Edge, index pair of vertex.
Definition: m_mesh.h:61
bool b_add_vertex_mode
Interactive vertex adding.
Definition: m_mesh.h:187
QVector< g_Face > getFaces()
Get list of faces.
Definition: m_mesh.h:161
bool b_crusted
Display of Crust border.
Definition: m_mesh.h:181
QVector< t_Face > topology
Topology of each face, topology[ii][jj] define the neighbor of face ii which is in front of vertex jj...
Definition: m_mesh.h:169
QVector< int > g_Face
Geometry face.
Definition: m_mesh.h:57
bool b_constrained
Display of constrained egdes.
Definition: m_mesh.h:185
QVector< g_Face > faces
List of faces, vertex index triplet.
Definition: m_mesh.h:167
bool getAddVertexMode()
Get interactive vertex adding mode state.
Definition: m_mesh.h:103
QVector< QVector< int > > crust_border
List of Crust edges sorted without doublons, used for display.
Definition: m_mesh.h:176
QVector< int > t_Face
Topology face.
Definition: m_mesh.h:59
QVector< g_Point > getVertices()
Get list of vertices.
Definition: m_mesh.h:159
QVector< g_Point > voronoi_center
List of Voronoï centers added, used for display.
Definition: m_mesh.h:172
void swapAddVertexMode()
Swap interactive vertex adding mode.
Definition: m_mesh.h:101
Definition: it_convexhullcirculator.h:16
QVector< QVector< int > > constrained_edges
List of constrained edges, used for display.
Definition: m_mesh.h:178