Define a MeshHandle to simplify some template programming

This commit is contained in:
Max Lyon
2019-11-05 15:29:11 +01:00
parent 3d1ae7d787
commit ab353c8dd0
2 changed files with 10 additions and 1 deletions

View File

@@ -144,6 +144,15 @@ struct FaceHandle : public BaseHandle
}; };
/// Handle type for meshes to simplify some template programming
struct MeshHandle : public BaseHandle
{
explicit MeshHandle(int _idx=-1) : BaseHandle(_idx) {}
};
//============================================================================= //=============================================================================
} // namespace OpenMesh } // namespace OpenMesh
//============================================================================= //=============================================================================

View File

@@ -545,7 +545,7 @@ struct MPropHandleT : public BasePropHandleT<T>
{ {
typedef T Value; typedef T Value;
typedef T value_type; typedef T value_type;
typedef void Handle; typedef MeshHandle Handle;
explicit MPropHandleT(int _idx=-1) : BasePropHandleT<T>(_idx) {} explicit MPropHandleT(int _idx=-1) : BasePropHandleT<T>(_idx) {}
explicit MPropHandleT(const BasePropHandleT<T>& _b) : BasePropHandleT<T>(_b) {} explicit MPropHandleT(const BasePropHandleT<T>& _b) : BasePropHandleT<T>(_b) {}