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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
773f4665
Commit
773f4665
authored
May 15, 2014
by
Kenneth Vanhoey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctifs passage au typage d'orbite
parent
8997f1b9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
38 deletions
+40
-38
include/Algo/Decimation/decimation.hpp
include/Algo/Decimation/decimation.hpp
+1
-1
include/Algo/Geometry/normal.h
include/Algo/Geometry/normal.h
+1
-1
include/Algo/ProgressiveMesh/pmesh.h
include/Algo/ProgressiveMesh/pmesh.h
+4
-4
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+12
-12
include/Algo/Render/GL2/colorPerFaceRender.h
include/Algo/Render/GL2/colorPerFaceRender.h
+2
-2
include/Algo/Render/GL2/colorPerFaceRender.hpp
include/Algo/Render/GL2/colorPerFaceRender.hpp
+3
-3
include/Algo/Render/GL2/dataPerFaceRender.h
include/Algo/Render/GL2/dataPerFaceRender.h
+1
-1
include/Algo/Render/GL2/dataPerFaceRender.hpp
include/Algo/Render/GL2/dataPerFaceRender.hpp
+1
-1
include/Algo/Selection/collector.h
include/Algo/Selection/collector.h
+2
-0
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+12
-12
include/Topology/generic/cells.h
include/Topology/generic/cells.h
+1
-1
No files found.
include/Algo/Decimation/decimation.hpp
View file @
773f4665
...
@@ -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/Geometry/normal.h
View file @
773f4665
...
@@ -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/ProgressiveMesh/pmesh.h
View file @
773f4665
...
@@ -60,7 +60,7 @@ private:
...
@@ -60,7 +60,7 @@ private:
MAP
&
m_map
;
MAP
&
m_map
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
position
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
position
;
DartMarker
<
MAP
>&
inactiveMarker
;
DartMarker
<
MAP
>&
inactiveMarker
;
Algo
::
Surface
::
Decimation
::
Selector
<
PFP
>*
m_selector
;
Algo
::
Surface
::
Decimation
::
Selector
<
PFP
>*
m_selector
;
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>
m_approximators
;
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>
m_approximators
;
...
@@ -82,15 +82,15 @@ private:
...
@@ -82,15 +82,15 @@ private:
public:
public:
ProgressiveMesh
(
ProgressiveMesh
(
MAP
&
map
,
MAP
&
map
,
DartMarker
<
MAP
>&
inactive
,
DartMarker
<
MAP
>&
inactive
,
Algo
::
Surface
::
Decimation
::
SelectorType
s
,
Algo
::
Surface
::
Decimation
::
SelectorType
s
,
Algo
::
Surface
::
Decimation
::
ApproximatorType
a
,
Algo
::
Surface
::
Decimation
::
ApproximatorType
a
,
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
position
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
position
)
;
)
;
ProgressiveMesh
(
ProgressiveMesh
(
MAP
&
map
,
DartMarker
&
inactive
,
MAP
&
map
,
DartMarker
<
MAP
>
&
inactive
,
Algo
::
Surface
::
Decimation
::
Selector
<
PFP
>*
selector
,
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>&
approximators
,
Algo
::
Surface
::
Decimation
::
Selector
<
PFP
>*
selector
,
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>&
approximators
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
;
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
position
)
;
~
ProgressiveMesh
()
;
~
ProgressiveMesh
()
;
bool
initOk
()
{
return
m_initOk
;
}
bool
initOk
()
{
return
m_initOk
;
}
...
...
include/Algo/ProgressiveMesh/pmesh.hpp
View file @
773f4665
...
@@ -39,7 +39,7 @@ namespace PMesh
...
@@ -39,7 +39,7 @@ namespace PMesh
template
<
typename
PFP
>
template
<
typename
PFP
>
ProgressiveMesh
<
PFP
>::
ProgressiveMesh
(
ProgressiveMesh
<
PFP
>::
ProgressiveMesh
(
MAP
&
map
,
MAP
&
map
,
DartMarker
<
MAP
>&
inactive
,
DartMarker
<
MAP
>&
inactive
,
Algo
::
Surface
::
Decimation
::
SelectorType
s
,
Algo
::
Surface
::
Decimation
::
SelectorType
s
,
Algo
::
Surface
::
Decimation
::
ApproximatorType
a
,
Algo
::
Surface
::
Decimation
::
ApproximatorType
a
,
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
pos
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
pos
...
@@ -87,22 +87,22 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -87,22 +87,22 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
switch
(
s
)
switch
(
s
)
{
{
case
Algo
::
Surface
::
Decimation
::
S_MapOrder
:
{
case
Algo
::
Surface
::
Decimation
::
S_MapOrder
:
{
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_MapOrder
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_MapOrder
<
PFP
>
(
m_map
,
position
,
m_approximators
)
;
break
;
}
break
;
}
case
Algo
::
Surface
::
Decimation
::
S_Random
:
{
case
Algo
::
Surface
::
Decimation
::
S_Random
:
{
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Random
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Random
<
PFP
>
(
m_map
,
position
,
m_approximators
)
;
break
;
}
break
;
}
case
Algo
::
Surface
::
Decimation
::
S_EdgeLength
:
{
case
Algo
::
Surface
::
Decimation
::
S_EdgeLength
:
{
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Length
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Length
<
PFP
>
(
m_map
,
position
,
m_approximators
)
;
break
;
}
break
;
}
case
Algo
::
Surface
::
Decimation
::
S_QEM
:
{
case
Algo
::
Surface
::
Decimation
::
S_QEM
:
{
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_QEM
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_QEM
<
PFP
>
(
m_map
,
position
,
m_approximators
)
;
break
;
}
break
;
}
case
Algo
::
Surface
::
Decimation
::
S_MinDetail
:
{
case
Algo
::
Surface
::
Decimation
::
S_MinDetail
:
{
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_MinDetail
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_MinDetail
<
PFP
>
(
m_map
,
position
,
m_approximators
)
;
break
;
}
break
;
}
case
Algo
::
Surface
::
Decimation
::
S_Curvature
:
{
case
Algo
::
Surface
::
Decimation
::
S_Curvature
:
{
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
position
,
m_approximators
)
;
break
;
}
break
;
}
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
@@ -137,11 +137,11 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -137,11 +137,11 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
template
<
typename
PFP
>
template
<
typename
PFP
>
ProgressiveMesh
<
PFP
>::
ProgressiveMesh
(
ProgressiveMesh
<
PFP
>::
ProgressiveMesh
(
MAP
&
map
,
DartMarker
&
inactive
,
MAP
&
map
,
DartMarker
<
MAP
>
&
inactive
,
Algo
::
Surface
::
Decimation
::
Selector
<
PFP
>*
selector
,
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>&
approximators
,
Algo
::
Surface
::
Decimation
::
Selector
<
PFP
>*
selector
,
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>&
approximators
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
VertexAttribute
<
VEC3
,
MAP_IMPL
>&
position
)
:
)
:
m_map
(
map
),
m_selector
(
selector
),
m_approximators
(
approximators
),
positionsTable
(
position
),
inactiveMarker
(
inactive
)
m_map
(
map
),
m_selector
(
selector
),
m_approximators
(
approximators
),
position
(
position
),
inactiveMarker
(
inactive
)
{
{
CGoGNout
<<
" initializing approximators.."
<<
CGoGNflush
;
CGoGNout
<<
" initializing approximators.."
<<
CGoGNflush
;
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
...
@@ -187,7 +187,7 @@ ProgressiveMesh<PFP>::~ProgressiveMesh()
...
@@ -187,7 +187,7 @@ ProgressiveMesh<PFP>::~ProgressiveMesh()
template
<
typename
PFP
>
template
<
typename
PFP
>
void
ProgressiveMesh
<
PFP
>::
createPM
(
unsigned
int
percentWantedVertices
)
void
ProgressiveMesh
<
PFP
>::
createPM
(
unsigned
int
percentWantedVertices
)
{
{
unsigned
int
nbVertices
=
m_map
.
template
getNbOrbits
<
VERTEX
>()
;
unsigned
int
nbVertices
=
Algo
::
Topo
::
getNbOrbits
<
VERTEX
>
(
m_map
)
;
unsigned
int
nbWantedVertices
=
nbVertices
*
percentWantedVertices
/
100
;
unsigned
int
nbWantedVertices
=
nbVertices
*
percentWantedVertices
/
100
;
CGoGNout
<<
" creating PM ("
<<
nbVertices
<<
" vertices).."
<<
/* flush */
CGoGNendl
;
CGoGNout
<<
" creating PM ("
<<
nbVertices
<<
" vertices).."
<<
/* flush */
CGoGNendl
;
...
@@ -543,7 +543,7 @@ float ProgressiveMesh<PFP>::computeDistance2()
...
@@ -543,7 +543,7 @@ float ProgressiveMesh<PFP>::computeDistance2()
float distance = 0; // sum of 2-distance between original vertices and new vertices
float distance = 0; // sum of 2-distance between original vertices and new vertices
gotoLevel(0) ; // mesh reconstruction from detail vectors
gotoLevel(0) ; // mesh reconstruction from detail vectors
DartMarker
mUpdate(m_map) ;
DartMarker<MAP>
mUpdate(m_map) ;
for(Dart d = m_map.begin(); d != m_map.end(); m_map.next(d)) // vertices loop
for(Dart d = m_map.begin(); d != m_map.end(); m_map.next(d)) // vertices loop
{
{
if(!mUpdate.isMarked(d))
if(!mUpdate.isMarked(d))
...
...
include/Algo/Render/GL2/colorPerFaceRender.h
View file @
773f4665
...
@@ -71,7 +71,7 @@ public:
...
@@ -71,7 +71,7 @@ public:
*/
*/
template
<
typename
PFP
,
unsigned
int
ORBIT
>
template
<
typename
PFP
,
unsigned
int
ORBIT
>
void
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
void
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
>&
colorPerXXX
)
;
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>&
colorPerXXX
)
;
/**
/**
* update drawing buffers
* update drawing buffers
...
@@ -85,7 +85,7 @@ public:
...
@@ -85,7 +85,7 @@ public:
*/
*/
template
<
typename
PFP
,
unsigned
int
ORBIT
>
template
<
typename
PFP
,
unsigned
int
ORBIT
>
void
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboNormal
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
void
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboNormal
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normals
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
>&
colorPerXXX
)
;
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
normals
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>&
colorPerXXX
)
;
/**
/**
...
...
include/Algo/Render/GL2/colorPerFaceRender.hpp
View file @
773f4665
...
@@ -51,7 +51,7 @@ m_nbTris(0)
...
@@ -51,7 +51,7 @@ m_nbTris(0)
template
<
typename
PFP
,
unsigned
int
ORBIT
>
template
<
typename
PFP
,
unsigned
int
ORBIT
>
void
ColorPerFaceRender
::
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
void
ColorPerFaceRender
::
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
>&
colorPerXXX
)
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>&
colorPerXXX
)
{
{
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
REAL
REAL
;
typedef
typename
PFP
::
REAL
REAL
;
...
@@ -101,8 +101,8 @@ void ColorPerFaceRender::updateVBO(Utils::VBO& vboPosition, Utils::VBO& vboColor
...
@@ -101,8 +101,8 @@ void ColorPerFaceRender::updateVBO(Utils::VBO& vboPosition, Utils::VBO& vboColor
template
<
typename
PFP
,
unsigned
int
ORBIT
>
template
<
typename
PFP
,
unsigned
int
ORBIT
>
void
ColorPerFaceRender
::
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboNormal
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
void
ColorPerFaceRender
::
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboNormal
,
Utils
::
VBO
&
vboColor
,
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normals
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
normals
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
>&
colorPerXXX
)
const
AttributeHandler
<
typename
PFP
::
VEC3
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>&
colorPerXXX
)
{
{
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
REAL
REAL
;
typedef
typename
PFP
::
REAL
REAL
;
...
...
include/Algo/Render/GL2/dataPerFaceRender.h
View file @
773f4665
...
@@ -70,7 +70,7 @@ public:
...
@@ -70,7 +70,7 @@ public:
*/
*/
template
<
typename
PFP
,
unsigned
int
ORBIT
,
typename
T
>
template
<
typename
PFP
,
unsigned
int
ORBIT
,
typename
T
>
void
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboData
,
typename
PFP
::
MAP
&
map
,
void
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboData
,
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
const
AttributeHandler
<
T
,
ORBIT
>&
dataPerXXX
)
;
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
const
AttributeHandler
<
T
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>&
dataPerXXX
)
;
/**
/**
* draw
* draw
...
...
include/Algo/Render/GL2/dataPerFaceRender.hpp
View file @
773f4665
...
@@ -50,7 +50,7 @@ m_nbTris(0)
...
@@ -50,7 +50,7 @@ m_nbTris(0)
template
<
typename
PFP
,
unsigned
int
ORBIT
,
typename
T
>
template
<
typename
PFP
,
unsigned
int
ORBIT
,
typename
T
>
void
void
DataPerFaceRender
::
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboData
,
typename
PFP
::
MAP
&
map
,
DataPerFaceRender
::
updateVBO
(
Utils
::
VBO
&
vboPosition
,
Utils
::
VBO
&
vboData
,
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
positions
,
const
AttributeHandler
<
T
,
ORBIT
>&
dataPerXXX
)
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
::
IMPL
>&
positions
,
const
AttributeHandler
<
T
,
ORBIT
,
typename
PFP
::
MAP
::
IMPL
>&
dataPerXXX
)
{
{
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
REAL
REAL
;
typedef
typename
PFP
::
REAL
REAL
;
...
...
include/Algo/Selection/collector.h
View file @
773f4665
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
#include "Container/fakeAttribute.h"
#include "Container/fakeAttribute.h"
#include "Geometry/basic.h"
#include "Geometry/basic.h"
#include "Topology/generic/traversor/traversor2.h"
/*****************************************
/*****************************************
* Class hierarchy :
* Class hierarchy :
* Collector (virtual)
* Collector (virtual)
...
...
include/Algo/Selection/collector.hpp
View file @
773f4665
...
@@ -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
())
;
...
@@ -169,7 +169,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
...
@@ -169,7 +169,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
// collect edges on the border
// collect edges on the border
// TODO : should be an option ?
// TODO : should be an option ?
// TODO : not boundary safe
// TODO : not boundary safe
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
end
();
++
it
)
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
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
)
;
...
@@ -196,7 +196,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
...
@@ -196,7 +196,7 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
// collect edges on the border
// collect edges on the border
// TODO : should be an option ?
// TODO : should be an option ?
// TODO : not boundary safe
// TODO : not boundary safe
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
end
();
++
it
)
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
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
)
;
...
@@ -518,12 +518,12 @@ void Collector_WithinSphere<PFP>::computeNormalCyclesTensor(const VertexAttribut
...
@@ -518,12 +518,12 @@ void Collector_WithinSphere<PFP>::computeNormalCyclesTensor(const VertexAttribut
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
;
}
}
// collect edges crossing the neighborhood's border
// collect edges crossing the neighborhood's border
for
(
std
::
vector
<
Dart
>::
const_
iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
end
();
++
it
)
for
(
std
::
vector
<
Dart
>::
iterator
it
=
this
->
border
.
begin
();
it
!=
this
->
border
.
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
)
;
REAL
alpha
;
REAL
alpha
;
Algo
::
Surface
::
Geometry
::
intersectionSphereEdge
<
PFP
>
(
this
->
map
,
centerPosition
,
radius
,
*
it
,
pos
,
alpha
)
;
Algo
::
Surface
::
Geometry
::
intersectionSphereEdge
<
PFP
>
(
this
->
map
,
centerPosition
,
radius
,
*
it
,
pos
,
alpha
)
;
const
REAL
edgeangle
=
Algo
::
Surface
::
Geometry
::
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
this
->
map
,
*
it
,
pos
)
;
const
REAL
edgeangle
=
Algo
::
Surface
::
Geometry
::
computeAngleBetweenNormalsOnEdge
<
PFP
>
(
this
->
map
,
Edge
(
*
it
)
,
pos
)
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
*
alpha
;
tensor
+=
Geom
::
transposed_vectors_mult
(
e
,
e
)
*
edgeangle
*
(
1
/
e
.
norm
())
*
alpha
;
}
}
...
...
include/Topology/generic/cells.h
View file @
773f4665
...
@@ -47,7 +47,7 @@ public:
...
@@ -47,7 +47,7 @@ public:
Cell
()
:
dart
()
{}
Cell
()
:
dart
()
{}
/// constructor from Dart
/// constructor from Dart
inline
Cell
(
Dart
d
)
:
dart
(
d
)
{}
inline
Cell
(
Dart
d
)
:
dart
(
d
)
{}
/// copy constructor
/// copy constructor
inline
Cell
(
const
Cell
<
ORBIT
>&
c
)
:
dart
(
c
.
dart
)
{}
inline
Cell
(
const
Cell
<
ORBIT
>&
c
)
:
dart
(
c
.
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