Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hurstel
CGoGN
Commits
f6a88c8a
Commit
f6a88c8a
authored
May 21, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix collector
parent
413747e6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
13 deletions
+33
-13
apps_cmake.txt
apps_cmake.txt
+7
-0
include/Algo/Decimation/decimation.hpp
include/Algo/Decimation/decimation.hpp
+1
-1
include/Algo/Filtering/average.h
include/Algo/Filtering/average.h
+1
-1
include/Algo/Filtering/average_normals.h
include/Algo/Filtering/average_normals.h
+1
-1
include/Algo/Filtering/bilateral.h
include/Algo/Filtering/bilateral.h
+1
-1
include/Algo/Geometry/normal.h
include/Algo/Geometry/normal.h
+1
-1
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+8
-8
include/Topology/generic/functor.h
include/Topology/generic/functor.h
+13
-0
No files found.
apps_cmake.txt
View file @
f6a88c8a
...
@@ -113,6 +113,13 @@ IF(WIN32)
...
@@ -113,6 +113,13 @@ IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC -std=c++11")
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)
ENDIF(WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
...
...
include/Algo/Decimation/decimation.hpp
View file @
f6a88c8a
...
@@ -195,7 +195,7 @@ int decimate(
...
@@ -195,7 +195,7 @@ int decimate(
return
-
1
;
// init failed
return
-
1
;
// init failed
}
}
unsigned
int
nbVertices
=
map
.
template
getNbOrbits
<
VERTEX
>(
)
;
unsigned
int
nbVertices
=
Algo
::
Topo
::
getNbOrbits
<
VERTEX
>
(
map
)
;
bool
finished
=
false
;
bool
finished
=
false
;
while
(
!
finished
)
while
(
!
finished
)
...
...
include/Algo/Filtering/average.h
View file @
f6a88c8a
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
* *
* *
*******************************************************************************/
*******************************************************************************/
#include "Topology/generic/traversorCell.h"
#include "Topology/generic/traversor
/traversor
Cell.h"
#include "Algo/Filtering/functors.h"
#include "Algo/Filtering/functors.h"
#include "Algo/Selection/collector.h"
#include "Algo/Selection/collector.h"
...
...
include/Algo/Filtering/average_normals.h
View file @
f6a88c8a
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
* *
* *
*******************************************************************************/
*******************************************************************************/
#include "Topology/generic/traversorCell.h"
#include "Topology/generic/traversor
/traversor
Cell.h"
#include "Topology/generic/traversor2.h"
#include "Topology/generic/traversor2.h"
namespace
CGoGN
namespace
CGoGN
...
...
include/Algo/Filtering/bilateral.h
View file @
f6a88c8a
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
*******************************************************************************/
*******************************************************************************/
#include <math.h>
#include <math.h>
#include "Topology/generic/traversorCell.h"
#include "Topology/generic/traversor
/traversor
Cell.h"
namespace
CGoGN
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&
...
@@ -71,7 +71,7 @@ void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT&
template
<
typename
PFP
,
typename
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
>
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
)
;
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)
...
@@ -119,7 +119,7 @@ void Collector_OneRing<PFP>::collectAll(Dart d)
this->insideVertices.push_back(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->insideEdges.push_back(e);
this->insideFaces.push_back(e.dart);
this->insideFaces.push_back(e.dart);
...
@@ -133,7 +133,7 @@ void Collector_OneRing<PFP>::collectBorder(Dart d)
...
@@ -133,7 +133,7 @@ void Collector_OneRing<PFP>::collectBorder(Dart d)
this->init(d);
this->init(d);
this->border.reserve(12);
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));
this->border.push_back(this->map.phi1(f.dart));
});
});
...
@@ -146,7 +146,7 @@ typename PFP::REAL Collector_OneRing<PFP>::computeArea(const VertexAttribute<VEC
...
@@ -146,7 +146,7 @@ typename PFP::REAL Collector_OneRing<PFP>::computeArea(const VertexAttribute<VEC
REAL area = 0;
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);
area += Algo::Surface::Geometry::triangleArea<PFP>(this->map, *it, pos);
return area;
return area;
...
@@ -160,7 +160,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
...
@@ -160,7 +160,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor.zero() ;
tensor.zero() ;
// collect edges inside the neighborhood
// 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 VEC3 e = Algo::Surface::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
...
@@ -186,7 +186,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
...
@@ -186,7 +186,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor.zero() ;
tensor.zero() ;
// collect edges inside the neighborhood
// 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 VEC3 e = Algo::Surface::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
const REAL edgeangle = Algo::Surface::Geometry::computeAngleBetweenNormalsOnEdge<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
...
@@ -272,7 +272,7 @@ typename PFP::REAL Collector_OneRing_AroundEdge<PFP>::computeArea(const VertexAt
REAL area = 0;
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);
area += Algo::Surface::Geometry::triangleArea<PFP>(this->map, *it, pos);
return area;
return area;
...
@@ -286,7 +286,7 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
...
@@ -286,7 +286,7 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor.zero() ;
tensor.zero() ;
// collect edges inside the neighborhood
// 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 VEC3 e = Algo::Surface::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
...
@@ -312,7 +312,7 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
...
@@ -312,7 +312,7 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor.zero() ;
tensor.zero() ;
// collect edges inside the neighborhood
// 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 VEC3 e = Algo::Surface::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
const REAL edgeangle = Algo::Surface::Geometry::computeAngleBetweenNormalsOnEdge<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:
...
@@ -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
// Selector functors : return true to select or false to not select a dart
/********************************************************/
/********************************************************/
...
...
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