Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
cabcccf8
Commit
cabcccf8
authored
Jun 14, 2012
by
Thery Sylvain
Browse files
Minor modification tutu_histo (update mesh colorization)
parent
f2e7e195
Changes
3
Hide whitespace changes
Inline
Side-by-side
Apps/Tuto/tuto_histo.cpp
View file @
cabcccf8
...
...
@@ -173,12 +173,16 @@ void MyQT::cb_keyPress(int keycode)
l_nbc
++
;
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
l_histo
->
histoColorizeVBO
(
*
m_colorVBO2
);
updateGL
();
break
;
case
'-'
:
if
(
l_nbc
>
0
)
l_nbc
--
;
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
l_histo
->
histoColorizeVBO
(
*
m_colorVBO2
);
updateGL
();
break
;
case
'p'
:
...
...
@@ -205,6 +209,8 @@ void MyQT::cb_keyPress(int keycode)
l_histo
->
centerOnZero
();
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
l_histo
->
histoColorizeVBO
(
*
m_colorVBO2
);
updateGL
();
break
;
case
'w'
:
...
...
@@ -214,6 +220,8 @@ void MyQT::cb_keyPress(int keycode)
l_histo
->
setMax
(
av
*
0.1
+
l_histo
->
getMax
()
*
0.9
);
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
l_histo
->
histoColorizeVBO
(
*
m_colorVBO2
);
updateGL
();
}
break
;
case
'x'
:
...
...
@@ -223,6 +231,8 @@ void MyQT::cb_keyPress(int keycode)
l_histo
->
setMax
(
-
0.1
*
av
+
l_histo
->
getMax
()
*
1.1
);
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
l_histo
->
histoColorizeVBO
(
*
m_colorVBO2
);
updateGL
();
}
break
;
...
...
include/Utils/qem.h
View file @
cabcccf8
...
...
@@ -26,6 +26,7 @@
#define __QEM__
#include
"Utils/os_spec.h"
// allow compilation under windows
#include
<cmath>
#include
"Geometry/vector_gen.h"
#include
"Geometry/matrix.h"
...
...
@@ -155,7 +156,7 @@ private:
bool
optimize
(
VEC4
&
v
)
const
{
if
(
isnan
(
A
(
0
,
0
)))
if
(
std
::
isnan
(
A
(
0
,
0
)))
return
false
;
MATRIX44
A2
(
A
)
;
...
...
src/Utils/Qt/qthistodraw.cpp
View file @
cabcccf8
...
...
@@ -170,7 +170,7 @@ void RenderHistogram::drawHisto(QPainter& painter)
const
char
*
ptr
=
sv
.
c_str
();
QString
qsv
(
ptr
);
painter
.
drawText
(
1
,
h
-
6
,
widthAxl
,
1
2
,
Qt
::
AlignRight
,
qsv
);
painter
.
drawText
(
1
,
h
-
6
,
widthAxl
,
1
5
,
Qt
::
AlignRight
,
qsv
);
}
painter
.
setPen
(
QColor
(
0
,
0
,
0
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment