Skip to content

Commit

Permalink
mesh: stricter th for degenerate faces
Browse files Browse the repository at this point in the history
(cherry picked from commit c63bec05918915135df424109994b7872a221610)
  • Loading branch information
cdcseacave committed Oct 11, 2024
1 parent 5a2c24d commit 6a4517b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/Common/FastDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class delegate<R(A...)>
{
using functor_type = typename ::std::decay<T>::type;

if ((sizeof(functor_type) > store_size_) || !store_.unique())
if ((sizeof(functor_type) > store_size_) || store_.use_count() != 1)
{
store_.reset(operator new(sizeof(functor_type)), functor_deleter<functor_type>);
store_size_ = sizeof(functor_type);
Expand Down
4 changes: 2 additions & 2 deletions libs/MVS/Mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ class MVS_API Mesh
void Decimate(VertexIdxArr& verticesRemove);
void CloseHole(VertexIdxArr& vertsLoop);
void CloseHoleQuality(VertexIdxArr& vertsLoop);
FIndex RemoveDegenerateFaces(Type thArea=1e-5f);
FIndex RemoveDegenerateFaces(unsigned maxIterations, Type thArea=1e-5f);
FIndex RemoveDegenerateFaces(Type thArea=1e-10f);
FIndex RemoveDegenerateFaces(unsigned maxIterations, Type thArea=1e-10f);
void RemoveFacesOutside(const OBB3f&);
void RemoveFaces(FaceIdxArr& facesRemove, bool bUpdateLists=false);
void RemoveVertices(VertexIdxArr& vertexRemove, bool bUpdateLists=false);
Expand Down

0 comments on commit 6a4517b

Please sign in to comment.