Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CGoGN
CGoGN
Commits
4481e868
Commit
4481e868
authored
Jun 08, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compil pb
parent
1c7c7d22
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
22 deletions
+36
-22
Apps/Tuto/tuto_histo.cpp
Apps/Tuto/tuto_histo.cpp
+1
-1
CGoGN/include/Algo/Decimation/edgeSelector.hpp
CGoGN/include/Algo/Decimation/edgeSelector.hpp
+1
-1
CGoGN/include/Algo/MovingObjects/particle_cell_2D.hpp
CGoGN/include/Algo/MovingObjects/particle_cell_2D.hpp
+4
-4
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
+4
-4
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp
...clude/Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp
+4
-4
CGoGN/include/Geometry/vector_gen.h
CGoGN/include/Geometry/vector_gen.h
+3
-1
CGoGN/include/Geometry/vector_gen.hpp
CGoGN/include/Geometry/vector_gen.hpp
+17
-7
CGoGN/include/Utils/quantization.hpp
CGoGN/include/Utils/quantization.hpp
+2
-0
No files found.
Apps/Tuto/tuto_histo.cpp
View file @
4481e868
...
...
@@ -115,7 +115,7 @@ void MyQT::createMap(const std::string& filename)
// create a popup window
l_popup
=
new
Utils
::
QT
::
QtPopUp
(
this
);
l_popup
=
new
Utils
::
QT
::
QtPopUp
();
// create the widget to view histogram
l_histodraw
=
new
Algo
::
Histogram
::
RenderHistogram
(
l_popup
,
*
l_histo
);
...
...
CGoGN/include/Algo/Decimation/edgeSelector.hpp
View file @
4481e868
...
...
@@ -2017,7 +2017,7 @@ typename PFP::VEC3 EdgeSelector_GeomColOptGradient<PFP>::computeEdgeGradientColo
//const VEC3 e0 = Pj - Pi ;
const REAL areaIJ0sq = (ei ^ ej).norm2() ;
const REAL areaIJ0 = REAL(sqrt(areaIJ0sq)/2.0f) ;
const REAL areaIJ0 = REAL(
std::
sqrt(areaIJ0sq)/2.0f) ;
areaSum += areaIJ0 ;
// per-channel treatment
...
...
CGoGN/include/Algo/MovingObjects/particle_cell_2D.hpp
View file @
4481e868
...
...
@@ -99,7 +99,7 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& goal)
#ifdef DEBUG
CGoGNout
<<
"vertexState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
goal
.
isFinite
())
;
assert
(
Geometry
::
isFinite
(
goal
))
;
crossCell
=
CROSS_OTHER
;
...
...
@@ -195,7 +195,7 @@ void ParticleCell2D<PFP>::edgeState(const VEC3& goal, Geom::Orientation2D sideOf
CGoGNout
<<
"goal :"
<<
goal
<<
CGoGNendl
;
#endif
assert
(
goal
.
isFinite
())
;
assert
(
Geometry
::
isFinite
(
goal
));
// assert(Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));
if
(
crossCell
==
NO_CROSS
)
...
...
@@ -327,8 +327,8 @@ void ParticleCell2D<PFP>::faceState(const VEC3& goal)
CGoGNout
<<
"faceState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
this
->
getPosition
()
.
isFinite
(
));
assert
(
goal
.
isFinite
())
;
assert
(
Geometry
::
isFinite
(
this
->
getPosition
()));
assert
(
Geometry
::
isFinite
(
goal
));
// assert(Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true));
Dart
dd
=
d
;
...
...
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
View file @
4481e868
...
...
@@ -114,7 +114,7 @@ void ParticleCell2DAndHalf<PFP>::vertexState(VEC3 goal)
#ifdef DEBUG
CGoGNout
<<
"vertexState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
goal
.
isFinite
())
;
assert
(
Geometry
::
isFinite
(
goal
));
crossCell
=
CROSS_OTHER
;
...
...
@@ -189,7 +189,7 @@ void ParticleCell2DAndHalf<PFP>::edgeState(VEC3 goal, Geom::Orientation3D sideOf
CGoGNout
<<
"edgeState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
goal
.
isFinite
())
;
assert
(
Geometry
::
isFinite
(
goal
));
// assert(Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));
if
(
crossCell
==
NO_CROSS
)
...
...
@@ -261,8 +261,8 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 goal)
CGoGNout
<<
"faceState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
goal
.
isFinite
())
;
assert
(
this
->
getPosition
()
.
isFinite
(
))
;
assert
(
Geometry
::
isFinite
(
goal
));
assert
(
Geometry
::
isFinite
(
this
->
getPosition
()));
//project goal within face plane
VEC3
n1
=
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
...
...
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp
View file @
4481e868
...
...
@@ -106,7 +106,7 @@ void ParticleCell2DAndHalfMemo<PFP>::vertexState(VEC3 current, CellMarkerMemo<MA
#ifdef DEBUG
CGoGNout
<<
"vertexState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
current
.
isFinite
());
assert
(
Geometry
::
isFinite
(
current
));
this
->
crossCell
=
CROSS_OTHER
;
...
...
@@ -177,7 +177,7 @@ void ParticleCell2DAndHalfMemo<PFP>::edgeState(VEC3 current, CellMarkerMemo<MAP,
CGoGNout
<<
"edgeState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
current
.
isFinite
());
assert
(
Geometry
::
isFinite
(
current
));
// assert(Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));
if
(
this
->
crossCell
==
NO_CROSS
)
...
...
@@ -249,8 +249,8 @@ void ParticleCell2DAndHalfMemo<PFP>::faceState(VEC3 current, CellMarkerMemo<MAP,
if
(
memo_cross
.
isMarked
(
this
->
d
))
return
;
memo_cross
.
mark
(
this
->
d
);
assert
(
this
->
getPosition
()
.
isFinite
(
));
assert
(
current
.
isFinite
());
assert
(
Geometry
::
isFinite
(
this
->
getPosition
()));
assert
(
Geometry
::
isFinite
(
current
));
// assert(Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true));
//project current within face plane
...
...
CGoGN/include/Geometry/vector_gen.h
View file @
4481e868
...
...
@@ -163,7 +163,7 @@ public:
bool
hasNan
()
const
;
bool
isFinite
()
const
;
//
bool isFinite() const ;
/**
* Tests if the vector is normalized
...
...
@@ -235,6 +235,8 @@ Vector<DIM, T> slerp(const Vector<DIM, T> &v1, const Vector<DIM, T> &v2, const T
template
<
unsigned
int
DIM
,
typename
T
,
typename
T2
>
Vector
<
DIM
,
T
>
operator
*
(
T2
b
,
const
Vector
<
DIM
,
T
>&
v
);
template
<
unsigned
int
DIM
,
typename
T
>
bool
isFinite
(
const
Vector
<
DIM
,
T
>&
vec
);
/**********************************************/
/* SOME USEFUL TYPEDEFS */
...
...
CGoGN/include/Geometry/vector_gen.hpp
View file @
4481e868
...
...
@@ -358,13 +358,13 @@ inline bool Vector<DIM, T>::hasNan() const
return
false
;
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
bool
Vector
<
DIM
,
T
>::
isFinite
()
const
{
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
if
(
!
std
::
isfinite
(
m_data
[
i
]))
return
false
;
return
true
;
}
//
template <unsigned int DIM, typename T>
//
inline bool Vector<DIM, T>::isFinite() const
//
{
//
for (unsigned int i = 0; i < DIM; ++i)
//
if (!std::isfinite(m_data[i])) return false ;
//
return true ;
//
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
bool
Vector
<
DIM
,
T
>::
isNormalized
(
const
T
&
epsilon
)
const
...
...
@@ -392,6 +392,16 @@ inline bool Vector<DIM, T>::isNear(const Vector<DIM, T>& v, int precision) const
return
isNull2
(
norm2
,
precision
)
;
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
bool
isFinite
(
const
Vector
<
DIM
,
T
>&
vec
)
{
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
if
(
!
std
::
isfinite
(
vec
[
i
]))
return
false
;
return
true
;
}
/**********************************************/
/* STREAM OPERATORS */
/**********************************************/
...
...
CGoGN/include/Utils/quantization.hpp
View file @
4481e868
...
...
@@ -24,8 +24,10 @@
#include "Utils/cgognStream.h"
#include <cmath>
#include <limits>
namespace
CGoGN
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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