Commit 88d5cd96 authored by untereiner's avatar untereiner

Merge cgogn:~thery/CGoGN

parents e375dc60 1783bdbe
...@@ -369,7 +369,13 @@ public: ...@@ -369,7 +369,13 @@ public:
*/ */
bool createGroupMatVBO_PTN( Utils::VBO* positionVBO, Utils::VBO* texcoordVBO, Utils::VBO* normalVBO); bool createGroupMatVBO_PTN( Utils::VBO* positionVBO, Utils::VBO* texcoordVBO, Utils::VBO* normalVBO);
/**
* @brief add a dart by each face of group in a vector
* @param groupId the group to add
* @param dartFaces the vector in which we want to add
* @return the number of faces added.
*/
unsigned int storeFacesOfGroup(unsigned int groupId, std::vector<Dart>& dartFaces);
}; };
......
...@@ -1395,6 +1395,22 @@ bool OBJModel<PFP>::import( const std::string& filename, std::vector<std::string ...@@ -1395,6 +1395,22 @@ bool OBJModel<PFP>::import( const std::string& filename, std::vector<std::string
} }
template <typename PFP>
unsigned int OBJModel<PFP>::storeFacesOfGroup(unsigned int groupId, std::vector<Dart>& dartFaces)
{
unsigned int nb=dartFaces.size();
TraversorF<typename PFP::MAP> traf(m_map);
for (Dart d=traf.begin(); d!= traf.end(); d = traf.next())
{
if (m_groups[d] == groupId)
{
dartFaces.push_back(d);
}
}
return dartFaces.size()-nb;
}
} }
......
...@@ -41,7 +41,7 @@ namespace ClosedMap ...@@ -41,7 +41,7 @@ namespace ClosedMap
// Traverse the edges incident to a given vertex // Traverse the edges incident to a given vertex
template <typename MAP> template <typename MAP>
class Traversor2VE: public Traversor<MAP> class Traversor2VE: public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
// Traverse the faces incident to a given vertex // Traverse the faces incident to a given vertex
template <typename MAP> template <typename MAP>
class Traversor2VF : public Traversor<MAP> class Traversor2VF : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
// Traverse the vertices adjacent to a given vertex through sharing a common edge // Traverse the vertices adjacent to a given vertex through sharing a common edge
template <typename MAP> template <typename MAP>
class Traversor2VVaE : public Traversor<MAP> class Traversor2VVaE : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -92,7 +92,7 @@ public: ...@@ -92,7 +92,7 @@ public:
// Traverse the vertices adjacent to a given vertex through sharing a common face // Traverse the vertices adjacent to a given vertex through sharing a common face
template <typename MAP> template <typename MAP>
class Traversor2VVaF : public Traversor<MAP> class Traversor2VVaF : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -115,7 +115,7 @@ public: ...@@ -115,7 +115,7 @@ public:
// Traverse the vertices incident to a given edge // Traverse the vertices incident to a given edge
template <typename MAP> template <typename MAP>
class Traversor2EV : public Traversor<MAP> class Traversor2EV : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -132,7 +132,7 @@ public: ...@@ -132,7 +132,7 @@ public:
// Traverse the faces incident to a given edge // Traverse the faces incident to a given edge
template <typename MAP> template <typename MAP>
class Traversor2EF : public Traversor<MAP> class Traversor2EF : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -149,7 +149,7 @@ public: ...@@ -149,7 +149,7 @@ public:
// Traverse the edges adjacent to a given edge through sharing a common vertex // Traverse the edges adjacent to a given edge through sharing a common vertex
template <typename MAP> template <typename MAP>
class Traversor2EEaV : public Traversor<MAP> class Traversor2EEaV : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -168,7 +168,7 @@ public: ...@@ -168,7 +168,7 @@ public:
// Traverse the edges adjacent to a given edge through sharing a common face // Traverse the edges adjacent to a given edge through sharing a common face
template <typename MAP> template <typename MAP>
class Traversor2EEaF : public Traversor<MAP> class Traversor2EEaF : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -191,7 +191,7 @@ public: ...@@ -191,7 +191,7 @@ public:
// Traverse the vertices incident to a given face // Traverse the vertices incident to a given face
template <typename MAP> template <typename MAP>
class Traversor2FV : public Traversor<MAP> class Traversor2FV : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -217,7 +217,7 @@ public: ...@@ -217,7 +217,7 @@ public:
// Traverse the faces adjacent to a given face through sharing a common vertex // Traverse the faces adjacent to a given face through sharing a common vertex
template <typename MAP> template <typename MAP>
class Traversor2FFaV : public Traversor<MAP> class Traversor2FFaV : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
...@@ -236,7 +236,7 @@ public: ...@@ -236,7 +236,7 @@ public:
// Traverse the faces adjacent to a given face through sharing a common edge // Traverse the faces adjacent to a given face through sharing a common edge
template <typename MAP> template <typename MAP>
class Traversor2FFaE : public Traversor<MAP> class Traversor2FFaE : public Traversor
{ {
private: private:
MAP& m ; MAP& m ;
......
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