Skip to content

Commit ce786f9

Browse files
committed
Merge branch 'CGAL-Qt5_support-GF'
Fixes various issues in demos Improve runtime of Side_of_triangle_mesh
2 parents f5eec04 + b399e8f commit ce786f9

File tree

49 files changed

+772
-678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+772
-678
lines changed

AABB_tree/demo/AABB_tree/Scene.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,9 +1230,9 @@ void Scene::cut_segment_plane()
12301230
changed();
12311231
}
12321232

1233-
void Scene::cutting_plane()
1233+
void Scene::cutting_plane(bool override)
12341234
{
1235-
if(ready_to_cut)
1235+
if(ready_to_cut || override)
12361236
{
12371237
ready_to_cut = false;
12381238
switch( m_cut_plane )

AABB_tree/demo/AABB_tree/Scene.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class Scene : public QObject
256256

257257
public slots:
258258
// cutting plane
259-
void cutting_plane();
259+
void cutting_plane(bool override = false);
260260
void changed();
261261
}; // end class Scene
262262

AABB_tree/demo/AABB_tree/Viewer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ void Viewer::setScene(Scene* pScene)
1818

1919
void Viewer::draw()
2020
{
21+
glEnable(GL_DEPTH_TEST);
2122
QGLViewer::draw();
2223
if(m_pScene != NULL)
2324
{
@@ -39,7 +40,7 @@ void Viewer::mousePressEvent(QMouseEvent* e)
3940
{
4041
m_pScene->set_fast_distance(true);
4142
// Refresh distance function
42-
m_pScene->cutting_plane();
43+
m_pScene->cutting_plane(true);
4344
m_custom_mouse = true;
4445
}
4546

@@ -53,7 +54,7 @@ void Viewer::mouseReleaseEvent(QMouseEvent* e)
5354
m_pScene->set_fast_distance(false);
5455
// Recompute distance function
5556
QApplication::setOverrideCursor(Qt::WaitCursor);
56-
m_pScene->cutting_plane();
57+
m_pScene->cutting_plane(true);
5758
QApplication::restoreOverrideCursor();
5859

5960
m_custom_mouse = false;

Linear_cell_complex/demo/Linear_cell_complex/Viewer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void Viewer::compile_shaders()
232232
//Vertex source code
233233
const char vertex_source[] =
234234
{
235-
"#version 330 \n"
235+
"#version 140 \n"
236236
"in highp vec4 vertex;\n"
237237
"in highp vec3 normal;\n"
238238
"in highp vec4 color;\n"
@@ -254,7 +254,7 @@ void Viewer::compile_shaders()
254254
//Vertex source code
255255
const char fragment_source[] =
256256
{
257-
"#version 330 \n"
257+
"#version 140 \n"
258258
"in highp vec4 fP; \n"
259259
"in highp vec3 fN; \n"
260260
"in highp vec4 fColor; \n"
@@ -310,7 +310,7 @@ void Viewer::compile_shaders()
310310
//Vertex source code
311311
const char vertex_source_p_l[] =
312312
{
313-
"#version 330 \n"
313+
"#version 140 \n"
314314
"in highp vec4 vertex;\n"
315315
"uniform highp mat4 mvp_matrix;\n"
316316
"void main(void)\n"
@@ -321,7 +321,7 @@ void Viewer::compile_shaders()
321321
//Vertex source code
322322
const char fragment_source_p_l[] =
323323
{
324-
"#version 330 \n"
324+
"#version 140 \n"
325325
"uniform highp vec4 color; \n"
326326
"void main(void) { \n"
327327
"gl_FragColor = color; \n"

Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
2828
#include <CGAL/iterator.h>
2929
#include <CGAL/trace.h>
30+
#include <CGAL/use.h>
3031

3132
#include <vector>
3233
#include <stack>
@@ -61,6 +62,8 @@ class Lookup_table {
6162
CGAL_assertion(i >= 0 && i < n);
6263
CGAL_assertion(j >= 0 && j < n);
6364
CGAL_assertion(i < j);
65+
CGAL_USE(i);
66+
CGAL_USE(j);
6467
// previous implementation was based on directly vector and i supposed to be always smaller than j.
6568
// this check actually can be removed and i =min(i,j) j = max(i,j) can be used for reflexive access
6669
return true;
@@ -122,6 +125,8 @@ class Lookup_table_map {
122125
CGAL_assertion(i >= 0 && i < n);
123126
CGAL_assertion(j >= 0 && j < n);
124127
CGAL_assertion(i < j);
128+
CGAL_USE(i);
129+
CGAL_USE(j);
125130
return true;
126131
}
127132
Map table;

Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Ray_3_Triangle_3_traversal_traits
4747
Ray_3_Triangle_3_traversal_traits(std::pair<boost::logic::tribool,std::size_t>& status,
4848
const AABBTraits& aabb_traits)
4949
:m_status(status),m_stop(false), m_aabb_traits(aabb_traits)
50-
{}
50+
{m_status.first=true;}
5151

5252
bool go_further() const { return !m_stop; }
5353

@@ -63,7 +63,6 @@ class Ray_3_Triangle_3_traversal_traits
6363
if (res.first){
6464
switch (res.second){
6565
case internal::R3T3_intersection::CROSS_FACET:
66-
m_status.first = true;
6766
++m_status.second;
6867
break;
6968
case internal::R3T3_intersection::ENDPOINT_IN_TRIANGLE:

Polyhedron/demo/Polyhedron/Color_map.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ compute_color_map(QColor base_color,
1414

1515
qreal h = hue;
1616
for(unsigned i = 0; i < nb_of_colors; ++i) {
17-
h += step;
17+
if (h!=-1) h += step;
1818
if ( h > 1 ) { h -= 1; }
19+
1920
*out++ = QColor::fromHsvF(h,
2021
base_color.saturationF(),
2122
base_color.valueF());

Polyhedron/demo/Polyhedron/Fairing_widget.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<item>
7777
<widget class="QPushButton" name="Fair_button">
7878
<property name="text">
79-
<string>Fair</string>
79+
<string>Fair a region defined by a selection of vertices</string>
8080
</property>
8181
</widget>
8282
</item>
@@ -116,7 +116,7 @@
116116
<item>
117117
<widget class="QPushButton" name="Refine_button">
118118
<property name="text">
119-
<string>Refine</string>
119+
<string>Refine a region defined by a selection of faces</string>
120120
</property>
121121
</widget>
122122
</item>

Polyhedron/demo/Polyhedron/MainWindow.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ MainWindow::MainWindow(QWidget* parent)
190190
connect(scene, SIGNAL(updated_bbox()),
191191
this, SLOT(updateViewerBBox()));
192192

193+
connect(scene, SIGNAL(selectionChanged(int)),
194+
this, SLOT(selectSceneItem(int)));
195+
193196
connect(sceneView->selectionModel(),
194197
SIGNAL(selectionChanged ( const QItemSelection & , const QItemSelection & ) ),
195198
this, SLOT(updateInfo()));

Polyhedron/demo/Polyhedron/MainWindow.ui

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,23 +363,23 @@
363363
</action>
364364
<action name="actionUnion">
365365
<property name="text">
366-
<string>&amp;Union</string>
366+
<string>&amp;Union (A/B)</string>
367367
</property>
368368
<property name="shortcut">
369369
<string>Ctrl+O, U</string>
370370
</property>
371371
</action>
372372
<action name="actionIntersection">
373373
<property name="text">
374-
<string>&amp;Intersection</string>
374+
<string>&amp;Intersection (A/B)</string>
375375
</property>
376376
<property name="shortcut">
377377
<string>Ctrl+O, I</string>
378378
</property>
379379
</action>
380380
<action name="actionDifference">
381381
<property name="text">
382-
<string>&amp;Difference</string>
382+
<string>&amp;Difference (A/B)</string>
383383
</property>
384384
<property name="shortcut">
385385
<string>Ctrl+O, D</string>
@@ -603,7 +603,7 @@
603603
</action>
604604
<action name="actionMinkowskiSum">
605605
<property name="text">
606-
<string>&amp;Minkowski sum</string>
606+
<string>&amp;Minkowski sum (A/B)</string>
607607
</property>
608608
<property name="shortcut">
609609
<string>Ctrl+O, M</string>

0 commit comments

Comments
 (0)