[关闭]
@BravoWA 2015-09-12T12:15:49.000000Z 字数 275 阅读 1062

Unique 2D STL vector by row

C++


  1. template <typename t>
  2. std::vector<std::vector<t> > GetUniqueRows(std::vector<std::vector<t> > input)
  3. {
  4. std::sort(input.begin(), input.end());
  5. input.erase(std::unique(input.begin(), input.end()), input.end());
  6. return input;
  7. }

Works great for find unique edges, faces in a mesh.

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注