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
David Cazier
CGoGN
Commits
562b8f4d
Commit
562b8f4d
authored
Jan 26, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'develop'
Master See merge request !33
parents
9f2c7763
7576a3e9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
19 deletions
+16
-19
README.md
README.md
+2
-2
include/Algo/Geometry/distances.h
include/Algo/Geometry/distances.h
+3
-3
include/Algo/Geometry/distances.hpp
include/Algo/Geometry/distances.hpp
+3
-3
include/Algo/Geometry/voronoiDiagrams.hpp
include/Algo/Geometry/voronoiDiagrams.hpp
+3
-3
include/Algo/Selection/collector.h
include/Algo/Selection/collector.h
+1
-1
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+4
-7
No files found.
README.md
View file @
562b8f4d
...
...
@@ -3,7 +3,7 @@ English version bellow
Dpendences Linux
=================
installer les paquets suivants:
cmake cmake-curses-gui cmake-qt-gui libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev libgsl0-dev libsuitesparse-dev
cmake cmake-curses-gui cmake-qt-gui libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev libgsl0-dev libsuitesparse-dev
libqglviewer-dev
Pour compiler CGoGN
...
...
@@ -84,7 +84,7 @@ ENGLISH VERSION
Linux dependencies
==================
install the following packages:
cmake cmake-curses-gui cmake-qt-gui libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev libgsl0-dev libsuitesparse-dev
cmake cmake-curses-gui cmake-qt-gui libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev libgsl0-dev libsuitesparse-dev
libqglviewer-dev
To compile CGoGN
================
...
...
include/Algo/Geometry/distances.h
View file @
562b8f4d
...
...
@@ -43,7 +43,7 @@ namespace Geometry
* @return the squared distance to the plane
*/
template
<
typename
PFP
>
typename
PFP
::
REAL
squaredDistancePoint2FacePlane
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
VEC3
&
P
)
;
typename
PFP
::
REAL
squaredDistancePoint2FacePlane
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
typename
PFP
::
VEC3
&
P
)
;
/**
* compute squared distance from point to face (assuming face is convex)
...
...
@@ -55,7 +55,7 @@ typename PFP::REAL squaredDistancePoint2FacePlane(typename PFP::MAP& map, Face f
* @return the squared distance
*/
template
<
typename
PFP
>
typename
PFP
::
REAL
squaredDistancePoint2Face
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
VEC3
&
P
)
;
typename
PFP
::
REAL
squaredDistancePoint2Face
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
typename
PFP
::
VEC3
&
P
)
;
/**
* compute squared distance from point to an edge
...
...
@@ -66,7 +66,7 @@ typename PFP::REAL squaredDistancePoint2Face(typename PFP::MAP& map, Face f, con
* @return the squared distance
*/
template
<
typename
PFP
>
typename
PFP
::
REAL
squaredDistancePoint2Edge
(
typename
PFP
::
MAP
&
map
,
Edge
e
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
VEC3
&
P
)
;
typename
PFP
::
REAL
squaredDistancePoint2Edge
(
typename
PFP
::
MAP
&
map
,
Edge
e
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
typename
PFP
::
VEC3
&
P
)
;
//template <typename PFP>
//void computeDistance(typename PFP::MAP& map1, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position1, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& distance1,
...
...
include/Algo/Geometry/distances.hpp
View file @
562b8f4d
...
...
@@ -34,7 +34,7 @@ namespace Geometry
{
template
<
typename
PFP
>
typename
PFP
::
REAL
squaredDistancePoint2FacePlane
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
VEC3
&
P
)
typename
PFP
::
REAL
squaredDistancePoint2FacePlane
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
typename
PFP
::
VEC3
&
P
)
{
Vertex
v
(
f
.
dart
);
const
typename
PFP
::
VEC3
&
A
=
position
[
v
];
...
...
@@ -47,7 +47,7 @@ typename PFP::REAL squaredDistancePoint2FacePlane(typename PFP::MAP& map, Face f
}
template
<
typename
PFP
>
typename
PFP
::
REAL
squaredDistancePoint2Face
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
VEC3
&
P
)
typename
PFP
::
REAL
squaredDistancePoint2Face
(
typename
PFP
::
MAP
&
map
,
Face
f
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
typename
PFP
::
VEC3
&
P
)
{
typedef
typename
PFP
::
REAL
REAL
;
...
...
@@ -72,7 +72,7 @@ typename PFP::REAL squaredDistancePoint2Face(typename PFP::MAP& map, Face f, con
}
template
<
typename
PFP
>
typename
PFP
::
REAL
squaredDistancePoint2Edge
(
typename
PFP
::
MAP
&
map
,
Edge
e
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
VEC3
&
P
)
typename
PFP
::
REAL
squaredDistancePoint2Edge
(
typename
PFP
::
MAP
&
map
,
Edge
e
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
typename
PFP
::
VEC3
&
P
)
{
const
typename
PFP
::
VEC3
&
A
=
position
[
e
.
dart
];
typename
PFP
::
VEC3
AB
=
position
[
map
.
phi1
(
e
.
dart
)]
-
A
;
...
...
include/Algo/Geometry/voronoiDiagrams.hpp
View file @
562b8f4d
...
...
@@ -21,7 +21,7 @@ VoronoiDiagram<PFP>::VoronoiDiagram (MAP& m, const EdgeAttribute<REAL, MAP>& p,
regions
(
r
),
vmReached
(
m
)
{
vertexInfo
=
map
.
template
addAttribute
<
VertexInfo
,
VERTEX
>(
"vertexInfo"
);
vertexInfo
=
map
.
template
addAttribute
<
VertexInfo
,
VERTEX
,
typename
PFP
::
MAP
>(
"vertexInfo"
);
}
template
<
typename
PFP
>
...
...
@@ -442,7 +442,7 @@ void CentroidalVoronoiDiagram<PFP>::cumulateEnergyAndGradientFromSeed(unsigned i
// compute the gradient
// TODO : check if the computation of grad and proj is still valid for other edgeCost than geodesic distances
VEC3
grad
(
0.0
);
const
VertexAttribute
<
VEC3
,
MAP
>&
pos
=
this
->
map
.
template
getAttribute
<
VEC3
,
VERTEX
>(
"position"
);
const
VertexAttribute
<
VEC3
,
MAP
>&
pos
=
this
->
map
.
template
getAttribute
<
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>(
"position"
);
for
(
unsigned
int
j
=
0
;
j
<
v
.
size
();
++
j
)
{
...
...
@@ -460,7 +460,7 @@ Dart CentroidalVoronoiDiagram<PFP>::selectBestNeighborFromSeed(unsigned int numS
{
Dart
e
=
this
->
seeds
[
numSeed
];
Dart
newSeed
=
e
;
const
VertexAttribute
<
VEC3
,
MAP
>&
pos
=
this
->
map
.
template
getAttribute
<
VEC3
,
VERTEX
>(
"position"
);
const
VertexAttribute
<
VEC3
,
MAP
>&
pos
=
this
->
map
.
template
getAttribute
<
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>(
"position"
);
// TODO : check if the computation of grad and proj is still valid for other edgeCost than geodesic distances
float
maxProj
=
0.0
;
...
...
include/Algo/Selection/collector.h
View file @
562b8f4d
...
...
@@ -492,7 +492,7 @@ public:
edge_cost
(
c
),
maxDist
(
d
)
{
vertexInfo
=
m
.
template
addAttribute
<
VertexInfo
,
VERTEX
>(
"vertexInfo"
);
vertexInfo
=
m
.
template
addAttribute
<
VertexInfo
,
VERTEX
,
typename
PFP
::
MAP
>(
"vertexInfo"
);
}
~
Collector_Dijkstra_Vertices
()
{
...
...
include/Algo/Selection/collector.hpp
View file @
562b8f4d
...
...
@@ -938,10 +938,9 @@ void Collector_Triangles<PFP>::collectAll(Dart d)
}
}
}
CellMarkerStore
<
MAP
,
VERTEX
>
vm
(
this
->
map
);
// mark inside-vertices and border-vertices
CellMarkerStore
<
MAP
,
EDGE
>
em
(
this
->
map
);
// mark inside-edges and border-edges
std
::
vector
<
Dart
>::
iterator
f_it
;
std
::
vector
<
Face
>::
iterator
f_it
;
for
(
f_it
=
this
->
insideFaces
.
begin
();
f_it
!=
this
->
insideFaces
.
end
();
f_it
++
)
{
// collect insideVertices, insideEdges, and border
Traversor2FE
<
MAP
>
te
(
this
->
map
,
*
f_it
)
;
...
...
@@ -1006,9 +1005,8 @@ void Collector_Triangles<PFP>::collectBorder(Dart d)
}
}
}
CellMarkerStore
<
MAP
,
EDGE
>
em
(
this
->
map
);
// mark inside-edges and border-edges
std
::
vector
<
Dart
>::
iterator
f_it
;
std
::
vector
<
Face
>::
iterator
f_it
;
for
(
f_it
=
this
->
insideFaces
.
begin
();
f_it
!=
this
->
insideFaces
.
end
();
f_it
++
)
{
// collect border (edges)
Traversor2FE
<
MAP
>
te
(
this
->
map
,
*
f_it
)
;
...
...
@@ -1085,7 +1083,7 @@ void Collector_Dijkstra_Vertices<PFP>::collectAll(Dart dinit)
CellMarkerStore
<
MAP
,
EDGE
>
em
(
this
->
map
);
CellMarkerStore
<
MAP
,
FACE
>
fm
(
this
->
map
);
for
(
std
::
vector
<
Dart
>::
iterator
e_it
=
this
->
insideVertices
.
begin
();
e_it
!=
this
->
insideVertices
.
end
()
;
e_it
++
)
for
(
std
::
vector
<
Vertex
>::
iterator
e_it
=
this
->
insideVertices
.
begin
();
e_it
!=
this
->
insideVertices
.
end
()
;
e_it
++
)
{
// collect insideEdges
Traversor2VE
<
MAP
>
te
(
this
->
map
,
*
e_it
);
...
...
@@ -1165,9 +1163,8 @@ void Collector_Dijkstra_Vertices<PFP>::collectBorder(Dart dinit)
vmReached
.
unmark
(
front
.
begin
()
->
second
);
front
.
erase
(
front
.
begin
());
}
CellMarkerStore
<
MAP
,
FACE
>
fm
(
this
->
map
);
for
(
std
::
vector
<
Dart
>::
iterator
e_it
=
this
->
insideVertices
.
begin
();
e_it
!=
this
->
insideVertices
.
end
()
;
e_it
++
)
for
(
std
::
vector
<
Vertex
>::
iterator
e_it
=
this
->
insideVertices
.
begin
();
e_it
!=
this
->
insideVertices
.
end
()
;
e_it
++
)
{
// collect border
Traversor2VF
<
MAP
>
tf
(
this
->
map
,
*
e_it
);
...
...
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