Fixed bad property handling in OpenMesh Stripifier doing create and delete of properties in generator function not in constructor/destructor.
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@102 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -49,29 +49,35 @@ namespace OpenMesh {
|
||||
|
||||
//== IMPLEMENTATION ==========================================================
|
||||
|
||||
template <class Mesh>
|
||||
StripifierT<Mesh>::
|
||||
StripifierT(Mesh& _mesh) :
|
||||
mesh_(_mesh)
|
||||
{
|
||||
// preprocess: add new properties
|
||||
mesh_.add_property( processed_ );
|
||||
mesh_.add_property( used_ );
|
||||
mesh_.request_face_status();
|
||||
}
|
||||
|
||||
template <class Mesh>
|
||||
StripifierT<Mesh>::
|
||||
~StripifierT() {
|
||||
// postprocess: remove properties
|
||||
mesh_.remove_property(processed_);
|
||||
mesh_.remove_property(used_);
|
||||
mesh_.release_face_status();
|
||||
}
|
||||
|
||||
template <class Mesh>
|
||||
unsigned int
|
||||
StripifierT<Mesh>::
|
||||
stripify()
|
||||
{
|
||||
// preprocess: add new properties
|
||||
mesh_.add_property( processed_ );
|
||||
mesh_.add_property( used_ );
|
||||
mesh_.request_face_status();
|
||||
|
||||
|
||||
// build strips
|
||||
clear();
|
||||
build_strips();
|
||||
|
||||
|
||||
// postprocess: remove properties
|
||||
//mesh_.remove_property(processed_);
|
||||
//mesh_.remove_property(used_);
|
||||
//mesh_.release_face_status();
|
||||
|
||||
|
||||
return n_strips();
|
||||
}
|
||||
|
||||
|
||||
@@ -75,11 +75,10 @@ public:
|
||||
|
||||
|
||||
/// Default constructor
|
||||
StripifierT(Mesh& _mesh) : mesh_(_mesh) {}
|
||||
StripifierT(Mesh& _mesh);
|
||||
|
||||
/// Destructor
|
||||
~StripifierT() {}
|
||||
|
||||
~StripifierT();
|
||||
|
||||
/// Compute triangle strips, returns number of strips
|
||||
unsigned int stripify();
|
||||
|
||||
Reference in New Issue
Block a user