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
Thomas Pitiot
CGoGN
Commits
f6a88c8a
Commit
f6a88c8a
authored
May 21, 2014
by
Sylvain Thery
Browse files
bug fix collector
parent
413747e6
Changes
8
Hide whitespace changes
Inline
Side-by-side
apps_cmake.txt
View file @
f6a88c8a
...
...
@@ -113,6 +113,13 @@ IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC -std=c++11")
if(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs")
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
endif(CMAKE_COMPILER_IS_GNUCXX)
ENDIF(WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
...
...
include/Algo/Decimation/decimation.hpp
View file @
f6a88c8a
...
...
@@ -195,7 +195,7 @@ int decimate(
return
-
1
;
// init failed
}
unsigned
int
nbVertices
=
map
.
template
getNbOrbits
<
VERTEX
>()
;
unsigned
int
nbVertices
=
Algo
::
Topo
::
getNbOrbits
<
VERTEX
>
(
map
)
;
bool
finished
=
false
;
while
(
!
finished
)
...
...
include/Algo/Filtering/average.h
View file @
f6a88c8a
...
...
@@ -22,7 +22,7 @@
* *
*******************************************************************************/
#include
"Topology/generic/traversorCell.h"
#include
"Topology/generic/
traversor/
traversorCell.h"
#include
"Algo/Filtering/functors.h"
#include
"Algo/Selection/collector.h"
...
...
include/Algo/Filtering/average_normals.h
View file @
f6a88c8a
...
...
@@ -22,7 +22,7 @@
* *
*******************************************************************************/
#include
"Topology/generic/traversorCell.h"
#include
"Topology/generic/
traversor/
traversorCell.h"
#include
"Topology/generic/traversor2.h"
namespace
CGoGN
...
...
include/Algo/Filtering/bilateral.h
View file @
f6a88c8a
...
...
@@ -23,7 +23,7 @@
*******************************************************************************/
#include
<math.h>
#include
"Topology/generic/traversorCell.h"
#include
"Topology/generic/
traversor/
traversorCell.h"
namespace
CGoGN
{
...
...
include/Algo/Geometry/normal.h
View file @
f6a88c8a
...
...
@@ -71,7 +71,7 @@ void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT&
template
<
typename
PFP
,
typename
V_ATT
>
typename
PFP
::
REAL
computeAngleBetweenNormalsOnEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
V_ATT
&
position
)
;
typename
PFP
::
REAL
computeAngleBetweenNormalsOnEdge
(
typename
PFP
::
MAP
&
map
,
Edge
d
,
const
V_ATT
&
position
)
;
template
<
typename
PFP
,
typename
V_ATT
,
typename
E_ATT
>
void
computeAnglesBetweenNormalsOnEdges
(
typename
PFP
::
MAP
&
map
,
const
V_ATT
&
position
,
E_ATT
&
angles
,
unsigned
int
thread
=
0
)
;
...
...
include/Algo/Selection/collector.hpp
View file @
f6a88c8a
...
...
@@ -119,7 +119,7 @@ void Collector_OneRing<PFP>::collectAll(Dart d)
this
->
insideVertices
.
push_back
(
d
);
foreach_incident2
<
EDGE
>
(
this
->
map
,
d
,
[
&
]
(
Edge
e
)
foreach_incident2
<
EDGE
>
(
this
->
map
,
Vertex
(
d
)
,
[
&
]
(
Edge
e
)
{
this
->
insideEdges
.
push_back
(
e
);
this
->
insideFaces
.
push_back
(
e
.
dart
);
...
...
@@ -133,7 +133,7 @@ void Collector_OneRing<PFP>::collectBorder(Dart d)
this
->
init
(
d
);
this
->
border
.
reserve
(
12
);
foreach_incident2
<
FACE
>
(
this
->
map
,
d
,
[
&
]
(
Face
f
)
foreach_incident2
<
FACE
>
(
this
->
map
,
Vertex
(
d
)
,
[
&
]
(
Face
f
)
{
this
->
border
.
push_back
(
this
->
map
.
phi1
(
f
.
dart
));
});
...
...
@@ -146,7 +146,7 @@ typename PFP::REAL Collector_OneRing<PFP>::computeArea(const VertexAttribute<VEC
REAL
area
=
0
;
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
insideFaces
.
begin
();
it
!=
this
->
insideFaces
.
end
();
++
it
)
for
(
std
::
vector
<
Face
>::
const_iterator
it
=
this
->
insideFaces
.
begin
();
it
!=
this
->
insideFaces
.
end
();
++
it
)
area
+=
Algo
::
Surface
::
Geometry
::
triangleArea
<
PFP
>
(
this
->
map
,
*
it
,
pos
);
return
area
;
...
...
@@ -160,7 +160,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor
.
zero
()
;
// collect edges inside the neighborhood
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
for
(
std
::
vector
<
Edge
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
[
*
it
]
*
(
1
/
e
.
norm
())
;
...
...
@@ -186,7 +186,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor
.
zero
()
;
// collect edges inside the neighborhood
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
for
(
std
::
vector
<
Edge
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
const
REAL
edgeangle
=
Algo
::
Surface
::
Geometry
::
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
...
...
@@ -272,7 +272,7 @@ typename PFP::REAL Collector_OneRing_AroundEdge<PFP>::computeArea(const VertexAt
REAL
area
=
0
;
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
insideFaces
.
begin
();
it
!=
this
->
insideFaces
.
end
();
++
it
)
for
(
std
::
vector
<
Face
>::
const_iterator
it
=
this
->
insideFaces
.
begin
();
it
!=
this
->
insideFaces
.
end
();
++
it
)
area
+=
Algo
::
Surface
::
Geometry
::
triangleArea
<
PFP
>
(
this
->
map
,
*
it
,
pos
);
return
area
;
...
...
@@ -286,7 +286,7 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor
.
zero
()
;
// collect edges inside the neighborhood
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
for
(
std
::
vector
<
Edge
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
[
*
it
]
*
(
1
/
e
.
norm
())
;
...
...
@@ -312,7 +312,7 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor
.
zero
()
;
// collect edges inside the neighborhood
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
for
(
std
::
vector
<
Edge
>::
const_iterator
it
=
this
->
insideEdges
.
begin
();
it
!=
this
->
insideEdges
.
end
();
++
it
)
{
const
VEC3
e
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
const
REAL
edgeangle
=
Algo
::
Surface
::
Geometry
::
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
...
...
include/Topology/generic/functor.h
View file @
f6a88c8a
...
...
@@ -46,6 +46,19 @@ public:
};
template
<
typename
MAP
>
class
FunctorMap
:
public
virtual
FunctorType
{
protected:
MAP
&
m_map
;
public:
FunctorMap
(
MAP
&
m
)
:
m_map
(
m
)
{}
};
// Selector functors : return true to select or false to not select a dart
/********************************************************/
...
...
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