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 ==========================================================
|
//== 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>
|
template <class Mesh>
|
||||||
unsigned int
|
unsigned int
|
||||||
StripifierT<Mesh>::
|
StripifierT<Mesh>::
|
||||||
stripify()
|
stripify()
|
||||||
{
|
{
|
||||||
// preprocess: add new properties
|
|
||||||
mesh_.add_property( processed_ );
|
|
||||||
mesh_.add_property( used_ );
|
|
||||||
mesh_.request_face_status();
|
|
||||||
|
|
||||||
|
|
||||||
// build strips
|
// build strips
|
||||||
clear();
|
clear();
|
||||||
build_strips();
|
build_strips();
|
||||||
|
|
||||||
|
|
||||||
// postprocess: remove properties
|
|
||||||
//mesh_.remove_property(processed_);
|
|
||||||
//mesh_.remove_property(used_);
|
|
||||||
//mesh_.release_face_status();
|
|
||||||
|
|
||||||
|
|
||||||
return n_strips();
|
return n_strips();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,11 +75,10 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
StripifierT(Mesh& _mesh) : mesh_(_mesh) {}
|
StripifierT(Mesh& _mesh);
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~StripifierT() {}
|
~StripifierT();
|
||||||
|
|
||||||
|
|
||||||
/// Compute triangle strips, returns number of strips
|
/// Compute triangle strips, returns number of strips
|
||||||
unsigned int stripify();
|
unsigned int stripify();
|
||||||
|
|||||||
Reference in New Issue
Block a user