add binary for handles and add string recognition support for meshhandle

This commit is contained in:
Alexandra Heuschling
2021-01-06 23:30:31 +01:00
parent 443fcd78a0
commit bdd10562d2
3 changed files with 13 additions and 6 deletions

View File

@@ -130,6 +130,13 @@ SIMPLE_BINARY(uint16_t);
SIMPLE_BINARY(uint32_t);
SIMPLE_BINARY(uint64_t);
//handles
SIMPLE_BINARY(OpenMesh::FaceHandle);
SIMPLE_BINARY(OpenMesh::EdgeHandle);
SIMPLE_BINARY(OpenMesh::HalfedgeHandle);
SIMPLE_BINARY(OpenMesh::VertexHandle);
SIMPLE_BINARY(OpenMesh::MeshHandle);
#undef SIMPLE_BINARY
// For unsigned long which is of size 64 bit on 64 bit
@@ -259,7 +266,6 @@ template <> struct binary< std::string > {
}
};
template <> struct binary<OpenMesh::Attributes::StatusInfo>
{
typedef OpenMesh::Attributes::StatusInfo value_type;

View File

@@ -62,10 +62,11 @@ bool PropertyCreator::can_you_create(const std::string& _type_name)
} /* namespace OpenMesh */
//OM_REGISTER_PROPERTY_TYPE(OpenMesh::FaceHandle)
//OM_REGISTER_PROPERTY_TYPE(OpenMesh::EdgeHandle)
//OM_REGISTER_PROPERTY_TYPE(OpenMesh::HalfedgeHandle)
//OM_REGISTER_PROPERTY_TYPE(OpenMesh::VertexHandle)
OM_REGISTER_PROPERTY_TYPE(OpenMesh::FaceHandle)
OM_REGISTER_PROPERTY_TYPE(OpenMesh::EdgeHandle)
OM_REGISTER_PROPERTY_TYPE(OpenMesh::HalfedgeHandle)
OM_REGISTER_PROPERTY_TYPE(OpenMesh::VertexHandle)
OM_REGISTER_PROPERTY_TYPE(OpenMesh::MeshHandle)
OM_REGISTER_PROPERTY_TYPE(bool)
OM_REGISTER_PROPERTY_TYPE(char)

View File

@@ -30,9 +30,9 @@ std::string get_type_name()
inline std::string get_string_for_type(OpenMesh::FaceHandle){ return "facehandle";}
inline std::string get_string_for_type(OpenMesh::EdgeHandle){ return "edgehandle";}
inline std::string get_string_for_type(OpenMesh::HalfedgeHandle){ return "halfedgehandle";}
inline std::string get_string_for_type(OpenMesh::VertexHandle){ return "vertexhandle";}
inline std::string get_string_for_type(OpenMesh::MeshHandle){ return "meshhandle";}
inline std::string get_string_for_type(bool){ return "bool";}
inline std::string get_string_for_type(char){ return "char";}