Merge branch 'clone_named_properties' into 'master'

add method to explicitely clone named properties

See merge request OpenMesh/OpenMesh!249
This commit is contained in:
Jan Möbius
2020-02-06 07:40:03 +01:00

View File

@@ -253,6 +253,19 @@ class PropertyManager {
}
}
/**
* Create property manager referring to a copy of the current property.
* This can be used to explicitely create a copy of a named property. The cloned property
* will be unnamed.
*/
PropertyManager clone()
{
PropertyManager result(this->mesh());
Storage::copy(*this, result);
return result;
}
PropertyManager& operator=(const PropertyManager& rhs)
{
if (&mesh_ == &rhs.mesh_ && prop_ == rhs.prop_)