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
Thomas Pitiot
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
...
@@ -3,7 +3,7 @@ English version bellow
Dpendences Linux
Dpendences Linux
=================
=================
installer les paquets suivants:
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
Pour compiler CGoGN
...
@@ -84,7 +84,7 @@ ENGLISH VERSION
...
@@ -84,7 +84,7 @@ ENGLISH VERSION
Linux dependencies
Linux dependencies
==================
==================
install the following packages:
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
To compile CGoGN
================
================
...
...
include/Algo/Geometry/distances.h
View file @
562b8f4d
...
@@ -43,7 +43,7 @@ namespace Geometry
...
@@ -43,7 +43,7 @@ namespace Geometry
* @return the squared distance to the plane
* @return the squared distance to the plane
*/
*/
template
<
typename
PFP
>
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)
* 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
...
@@ -55,7 +55,7 @@ typename PFP::REAL squaredDistancePoint2FacePlane(typename PFP::MAP& map, Face f
* @return the squared distance
* @return the squared distance
*/
*/
template
<
typename
PFP
>
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
* compute squared distance from point to an edge
...
@@ -66,7 +66,7 @@ typename PFP::REAL squaredDistancePoint2Face(typename PFP::MAP& map, Face f, con
...
@@ -66,7 +66,7 @@ typename PFP::REAL squaredDistancePoint2Face(typename PFP::MAP& map, Face f, con
* @return the squared distance
* @return the squared distance
*/
*/
template
<
typename
PFP
>
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>
//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,
//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
...
@@ -34,7 +34,7 @@ namespace Geometry
{
{
template
<
typename
PFP
>
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
);
Vertex
v
(
f
.
dart
);
const
typename
PFP
::
VEC3
&
A
=
position
[
v
];
const
typename
PFP
::
VEC3
&
A
=
position
[
v
];
...
@@ -47,7 +47,7 @@ typename PFP::REAL squaredDistancePoint2FacePlane(typename PFP::MAP& map, Face f
...
@@ -47,7 +47,7 @@ typename PFP::REAL squaredDistancePoint2FacePlane(typename PFP::MAP& map, Face f
}
}
template
<
typename
PFP
>
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
;
typedef
typename
PFP
::
REAL
REAL
;
...
@@ -72,7 +72,7 @@ typename PFP::REAL squaredDistancePoint2Face(typename PFP::MAP& map, Face f, con
...
@@ -72,7 +72,7 @@ typename PFP::REAL squaredDistancePoint2Face(typename PFP::MAP& map, Face f, con
}
}
template
<
typename
PFP
>
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
];
const
typename
PFP
::
VEC3
&
A
=
position
[
e
.
dart
];
typename
PFP
::
VEC3
AB
=
position
[
map
.
phi1
(
e
.
dart
)]
-
A
;
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,
...
@@ -21,7 +21,7 @@ VoronoiDiagram<PFP>::VoronoiDiagram (MAP& m, const EdgeAttribute<REAL, MAP>& p,
regions
(
r
),
regions
(
r
),
vmReached
(
m
)
vmReached
(
m
)
{
{
vertexInfo
=
map
.
template
addAttribute
<
VertexInfo
,
VERTEX
>(
"vertexInfo"
);
vertexInfo
=
map
.
template
addAttribute
<
VertexInfo
,
VERTEX
,
typename
PFP
::
MAP
>(
"vertexInfo"
);
}
}
template
<
typename
PFP
>
template
<
typename
PFP
>
...
@@ -442,7 +442,7 @@ void CentroidalVoronoiDiagram<PFP>::cumulateEnergyAndGradientFromSeed(unsigned i
...
@@ -442,7 +442,7 @@ void CentroidalVoronoiDiagram<PFP>::cumulateEnergyAndGradientFromSeed(unsigned i
// compute the gradient
// compute the gradient
// TODO : check if the computation of grad and proj is still valid for other edgeCost than geodesic distances
// TODO : check if the computation of grad and proj is still valid for other edgeCost than geodesic distances
VEC3
grad
(
0.0
);
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
)
for
(
unsigned
int
j
=
0
;
j
<
v
.
size
();
++
j
)
{
{
...
@@ -460,7 +460,7 @@ Dart CentroidalVoronoiDiagram<PFP>::selectBestNeighborFromSeed(unsigned int numS
...
@@ -460,7 +460,7 @@ Dart CentroidalVoronoiDiagram<PFP>::selectBestNeighborFromSeed(unsigned int numS
{
{
Dart
e
=
this
->
seeds
[
numSeed
];
Dart
e
=
this
->
seeds
[
numSeed
];
Dart
newSeed
=
e
;
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
// TODO : check if the computation of grad and proj is still valid for other edgeCost than geodesic distances
float
maxProj
=
0.0
;
float
maxProj
=
0.0
;
...
...
include/Algo/Selection/collector.h
View file @
562b8f4d
...
@@ -492,7 +492,7 @@ public:
...
@@ -492,7 +492,7 @@ public:
edge_cost
(
c
),
edge_cost
(
c
),
maxDist
(
d
)
maxDist
(
d
)
{
{
vertexInfo
=
m
.
template
addAttribute
<
VertexInfo
,
VERTEX
>(
"vertexInfo"
);
vertexInfo
=
m
.
template
addAttribute
<
VertexInfo
,
VERTEX
,
typename
PFP
::
MAP
>(
"vertexInfo"
);
}
}
~
Collector_Dijkstra_Vertices
()
~
Collector_Dijkstra_Vertices
()
{
{
...
...
include/Algo/Selection/collector.hpp
View file @
562b8f4d
...
@@ -938,10 +938,9 @@ void Collector_Triangles<PFP>::collectAll(Dart d)
...
@@ -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
,
VERTEX
>
vm
(
this
->
map
);
// mark inside-vertices and border-vertices
CellMarkerStore
<
MAP
,
EDGE
>
em
(
this
->
map
);
// mark inside-edges and border-edges
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
++
)
for
(
f_it
=
this
->
insideFaces
.
begin
();
f_it
!=
this
->
insideFaces
.
end
();
f_it
++
)
{
// collect insideVertices, insideEdges, and border
{
// collect insideVertices, insideEdges, and border
Traversor2FE
<
MAP
>
te
(
this
->
map
,
*
f_it
)
;
Traversor2FE
<
MAP
>
te
(
this
->
map
,
*
f_it
)
;
...
@@ -1006,9 +1005,8 @@ void Collector_Triangles<PFP>::collectBorder(Dart d)
...
@@ -1006,9 +1005,8 @@ void Collector_Triangles<PFP>::collectBorder(Dart d)
}
}
}
}
}
}
CellMarkerStore
<
MAP
,
EDGE
>
em
(
this
->
map
);
// mark inside-edges and border-edges
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
++
)
for
(
f_it
=
this
->
insideFaces
.
begin
();
f_it
!=
this
->
insideFaces
.
end
();
f_it
++
)
{
// collect border (edges)
{
// collect border (edges)
Traversor2FE
<
MAP
>
te
(
this
->
map
,
*
f_it
)
;
Traversor2FE
<
MAP
>
te
(
this
->
map
,
*
f_it
)
;
...
@@ -1085,7 +1083,7 @@ void Collector_Dijkstra_Vertices<PFP>::collectAll(Dart dinit)
...
@@ -1085,7 +1083,7 @@ void Collector_Dijkstra_Vertices<PFP>::collectAll(Dart dinit)
CellMarkerStore
<
MAP
,
EDGE
>
em
(
this
->
map
);
CellMarkerStore
<
MAP
,
EDGE
>
em
(
this
->
map
);
CellMarkerStore
<
MAP
,
FACE
>
fm
(
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
// collect insideEdges
Traversor2VE
<
MAP
>
te
(
this
->
map
,
*
e_it
);
Traversor2VE
<
MAP
>
te
(
this
->
map
,
*
e_it
);
...
@@ -1165,9 +1163,8 @@ void Collector_Dijkstra_Vertices<PFP>::collectBorder(Dart dinit)
...
@@ -1165,9 +1163,8 @@ void Collector_Dijkstra_Vertices<PFP>::collectBorder(Dart dinit)
vmReached
.
unmark
(
front
.
begin
()
->
second
);
vmReached
.
unmark
(
front
.
begin
()
->
second
);
front
.
erase
(
front
.
begin
());
front
.
erase
(
front
.
begin
());
}
}
CellMarkerStore
<
MAP
,
FACE
>
fm
(
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 border
// collect border
Traversor2VF
<
MAP
>
tf
(
this
->
map
,
*
e_it
);
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