Commit 562b8f4d authored by Sylvain Thery's avatar Sylvain Thery

Merge branch 'master' into 'develop'

Master

See merge request !33
parents 9f2c7763 7576a3e9
...@@ -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
================ ================
......
...@@ -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,
......
...@@ -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;
......
...@@ -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;
......
...@@ -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()
{ {
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment