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
48c2a09d
Commit
48c2a09d
authored
Mar 07, 2011
by
Pierre Kraemer
Browse files
pliant remeshing v1 ok
parent
33275120
Changes
3
Hide whitespace changes
Inline
Side-by-side
Apps/Examples/miniTest.cpp
View file @
48c2a09d
...
...
@@ -668,6 +668,31 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
break
;
}
case
'0'
:
{
GLint
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
Algo
::
Modelisation
::
reverseOrientation
<
PFP
>
(
myMap
)
;
GLint
t2
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
GLfloat
seconds
=
(
t2
-
t1
)
/
1000.0
f
;
std
::
cout
<<
"pliant remeshing: "
<<
seconds
<<
"sec"
<<
std
::
endl
;
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
updateVBOprimitives
(
Algo
::
Render
::
VBO
::
TRIANGLES
|
Algo
::
Render
::
VBO
::
LINES
|
Algo
::
Render
::
VBO
::
POINTS
)
;
updateVBOdata
(
Algo
::
Render
::
VBO
::
POSITIONS
|
Algo
::
Render
::
VBO
::
NORMALS
)
;
topo_render
->
updateData
<
PFP
>
(
myMap
,
position
,
0.9
f
,
0.9
f
)
;
t2
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
seconds
=
(
t2
-
t1
)
/
1000.0
f
;
std
::
cout
<<
"display update: "
<<
seconds
<<
"sec"
<<
std
::
endl
;
glutPostRedisplay
()
;
break
;
}
case
'9'
:
{
CellMarker
markVisit
(
myMap
,
VERTEX_CELL
)
;
...
...
include/Algo/Geometry/normal.hpp
View file @
48c2a09d
...
...
@@ -64,8 +64,8 @@ typename PFP::VEC3 faceNormal(typename PFP::MAP& map, Dart d, const typename PFP
do
{
VEC3
n
=
triangleNormal
<
PFP
>
(
map
,
it
,
position
)
;
//if(!std::isnan(n[0]))
if
(
n
[
0
]
==
n
[
0
])
//if(!std::isnan(n[0])
&& !std::isnan(n[1]) && !std::isnan(n[2])
)
if
(
n
[
0
]
==
n
[
0
]
&&
n
[
1
]
==
n
[
1
]
&&
n
[
2
]
==
n
[
2
]
)
N
+=
n
;
it
=
map
.
phi1
(
it
)
;
}
while
(
it
!=
d
)
;
...
...
include/Geometry/vector_gen.hpp
View file @
48c2a09d
...
...
@@ -280,7 +280,7 @@ template <unsigned int DIM, typename T>
inline
bool
Vector
<
DIM
,
T
>::
hasNan
()
const
{
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
if
(
isnan
(
m_data
[
i
])
)
if
(
m_data
[
i
]
!=
m_data
[
i
])
return
true
;
return
false
;
}
...
...
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