HandleToPropHandle.hh 991 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef HANDLETOPROPHANDLE_HH_
#define HANDLETOPROPHANDLE_HH_

#include <OpenMesh/Core/Mesh/Handles.hh>
#include <OpenMesh/Core/Utils/Property.hh>

namespace OpenMesh {

    template<typename ElementT, typename T>
    struct HandleToPropHandle {
    };

    template<typename T>
    struct HandleToPropHandle<OpenMesh::VertexHandle, T> {
        using type = OpenMesh::VPropHandleT<T>;
    };

    template<typename T>
    struct HandleToPropHandle<OpenMesh::HalfedgeHandle, T> {
        using type = OpenMesh::HPropHandleT<T>;
    };

    template<typename T>
    struct HandleToPropHandle<OpenMesh::EdgeHandle, T> {
        using type = OpenMesh::EPropHandleT<T>;
    };

    template<typename T>
    struct HandleToPropHandle<OpenMesh::FaceHandle, T> {
        using type = OpenMesh::FPropHandleT<T>;
    };

    template<typename T>
    struct HandleToPropHandle<void, T> {
        using type = OpenMesh::MPropHandleT<T>;
    };

} // namespace OpenMesh

#endif // HANDLETOPROPHANDLE_HH_