Commit 91c92143 authored by Mike Kremer's avatar Mike Kremer

Added clone and swap functions for vertex data.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@208 66977474-1d4b-4f09-8fe9-267525286df2
parent 44f514b4
...@@ -161,6 +161,19 @@ public: ...@@ -161,6 +161,19 @@ public:
return p; return p;
} }
void cloneVertices(std::vector<VecT>& _copy) const {
_copy.reserve(vertices_.size());
std::copy(vertices_.begin(), vertices_.end(), std::back_inserter(_copy));
}
void swapVertices(std::vector<VecT>& _copy) {
if(_copy.size() != vertices_.size()) {
std::cerr << "Vertex vectors differ in size!" << std::endl;
return;
}
std::swap(vertices_, _copy);
}
private: private:
std::vector<VecT> vertices_; std::vector<VecT> vertices_;
......
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