Commit 3c6931ca authored by Max Lyon's avatar Max Lyon

Merge branch 'master' into TetrahedralMeshSupport

parents cb1a55c0 9a1e6a55
...@@ -168,6 +168,7 @@ public: ...@@ -168,6 +168,7 @@ public:
static const TypeInfoWrapper proptype_bool; static const TypeInfoWrapper proptype_bool;
static const TypeInfoWrapper proptype_int; static const TypeInfoWrapper proptype_int;
static const TypeInfoWrapper proptype_uint; static const TypeInfoWrapper proptype_uint;
static const TypeInfoWrapper proptype_uint8_t;
static const TypeInfoWrapper proptype_double; static const TypeInfoWrapper proptype_double;
static const TypeInfoWrapper proptype_Vec3d; static const TypeInfoWrapper proptype_Vec3d;
static const TypeInfoWrapper proptype_Vec3f; static const TypeInfoWrapper proptype_Vec3f;
...@@ -205,6 +206,8 @@ template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_int ...@@ -205,6 +206,8 @@ template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_int
= TypeInfoWrapper(typeid(OpenMesh::PropertyT<int>), "int"); = TypeInfoWrapper(typeid(OpenMesh::PropertyT<int>), "int");
template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_uint template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_uint
= TypeInfoWrapper(typeid(OpenMesh::PropertyT<unsigned int>), "unsigned int"); = TypeInfoWrapper(typeid(OpenMesh::PropertyT<unsigned int>), "unsigned int");
template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_uint8_t
= TypeInfoWrapper(typeid(OpenMesh::PropertyT<uint8_t>), "uint8_t");
template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_double template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_double
= TypeInfoWrapper(typeid(OpenMesh::PropertyT<double>), "double"); = TypeInfoWrapper(typeid(OpenMesh::PropertyT<double>), "double");
template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_Vec3d template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_Vec3d
......
...@@ -547,6 +547,8 @@ void OMPropertyModel<MeshT>::addPropertyVisualizer(OpenMesh::BaseProperty* const ...@@ -547,6 +547,8 @@ void OMPropertyModel<MeshT>::addPropertyVisualizer(OpenMesh::BaseProperty* const
propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, int>(mesh, propInfo, false)); propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, int>(mesh, propInfo, false));
else if (propInfo.typeinfo() == proptype_uint) else if (propInfo.typeinfo() == proptype_uint)
propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, unsigned int>(mesh, propInfo, true)); propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, unsigned int>(mesh, propInfo, true));
else if (propInfo.typeinfo() == proptype_uint8_t)
propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, uint8_t>(mesh, propInfo, true));
else if (propInfo.typeinfo() == proptype_double) else if (propInfo.typeinfo() == proptype_double)
propertyVisualizers.push_back(new OMPropertyVisualizerDouble<MeshT>(mesh, propInfo)); propertyVisualizers.push_back(new OMPropertyVisualizerDouble<MeshT>(mesh, propInfo));
else if ((propInfo.typeinfo() == proptype_Vec3d) || (propInfo.typeinfo() == proptype_Vec3f)) else if ((propInfo.typeinfo() == proptype_Vec3d) || (propInfo.typeinfo() == proptype_Vec3f))
...@@ -608,6 +610,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType ...@@ -608,6 +610,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh::VPropHandleT< unsigned int > prop; OpenMesh::VPropHandleT< unsigned int > prop;
mesh->add_property(prop, pname.toStdString()); mesh->add_property(prop, pname.toStdString());
} }
else if ( dtype == tr("uint8_t") )
{
OpenMesh::VPropHandleT< uint8_t > prop;
mesh->add_property(prop, pname.toStdString());
}
else if ( dtype == tr("int") ) else if ( dtype == tr("int") )
{ {
OpenMesh::VPropHandleT< int > prop; OpenMesh::VPropHandleT< int > prop;
...@@ -655,6 +662,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType ...@@ -655,6 +662,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh::EPropHandleT< unsigned int > prop; OpenMesh::EPropHandleT< unsigned int > prop;
mesh->add_property(prop, pname.toStdString()); mesh->add_property(prop, pname.toStdString());
} }
else if ( dtype == tr("uint8_t") )
{
OpenMesh::EPropHandleT< uint8_t > prop;
mesh->add_property(prop, pname.toStdString());
}
else if ( dtype == tr("int") ) else if ( dtype == tr("int") )
{ {
OpenMesh::EPropHandleT< int > prop; OpenMesh::EPropHandleT< int > prop;
...@@ -693,6 +705,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType ...@@ -693,6 +705,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh::FPropHandleT< unsigned int > prop; OpenMesh::FPropHandleT< unsigned int > prop;
mesh->add_property(prop, pname.toStdString()); mesh->add_property(prop, pname.toStdString());
} }
else if ( dtype == tr("uint8_t") )
{
OpenMesh::FPropHandleT< uint8_t > prop;
mesh->add_property(prop, pname.toStdString());
}
else if ( dtype == tr("int") ) else if ( dtype == tr("int") )
{ {
OpenMesh::FPropHandleT< int > prop; OpenMesh::FPropHandleT< int > prop;
...@@ -721,6 +738,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType ...@@ -721,6 +738,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh::HPropHandleT< unsigned int > prop; OpenMesh::HPropHandleT< unsigned int > prop;
mesh->add_property(prop, pname.toStdString()); mesh->add_property(prop, pname.toStdString());
} }
else if ( dtype == tr("uint8_t") )
{
OpenMesh::HPropHandleT< uint8_t > prop;
mesh->add_property(prop, pname.toStdString());
}
else if ( dtype == tr("int") ) else if ( dtype == tr("int") )
{ {
OpenMesh::HPropHandleT< int > prop; OpenMesh::HPropHandleT< int > prop;
...@@ -744,6 +766,7 @@ void OMPropertyModel<MeshT>::initializeSupportedPropertyTypes() ...@@ -744,6 +766,7 @@ void OMPropertyModel<MeshT>::initializeSupportedPropertyTypes()
supportedPropertyTypes.insert(proptype_bool); supportedPropertyTypes.insert(proptype_bool);
supportedPropertyTypes.insert(proptype_int); supportedPropertyTypes.insert(proptype_int);
supportedPropertyTypes.insert(proptype_uint); supportedPropertyTypes.insert(proptype_uint);
supportedPropertyTypes.insert(proptype_uint8_t);
supportedPropertyTypes.insert(proptype_double); supportedPropertyTypes.insert(proptype_double);
supportedPropertyTypes.insert(proptype_Vec3d); supportedPropertyTypes.insert(proptype_Vec3d);
supportedPropertyTypes.insert(proptype_Vec3f); supportedPropertyTypes.insert(proptype_Vec3f);
......
...@@ -70,7 +70,7 @@ OMPropertyVisualizerInteger<MeshT, T>::OMPropertyVisualizerInteger(MeshT* _mesh, ...@@ -70,7 +70,7 @@ OMPropertyVisualizerInteger<MeshT, T>::OMPropertyVisualizerInteger(MeshT* _mesh,
template <typename MeshT,typename T> template <typename MeshT,typename T>
QString OMPropertyVisualizerInteger<MeshT, T>::getPropertyText(unsigned int index) QString OMPropertyVisualizerInteger<MeshT, T>::getPropertyText(unsigned int index)
{ {
return OMPropertyVisualizer<MeshT>::template getPropertyText_<int>(index); return OMPropertyVisualizer<MeshT>::template getPropertyText_<T>(index);
} }
template <typename MeshT, typename T> template <typename MeshT, typename T>
......
...@@ -160,6 +160,7 @@ public: ...@@ -160,6 +160,7 @@ public:
static inline QString toStr(bool b) { return b ? QObject::tr("True") : QObject::tr("False"); } static inline QString toStr(bool b) { return b ? QObject::tr("True") : QObject::tr("False"); }
static inline QString toStr(double d) { return QObject::tr("%1").arg(d); } static inline QString toStr(double d) { return QObject::tr("%1").arg(d); }
static inline QString toStr(int i) { return QObject::tr("%1").arg(i); } static inline QString toStr(int i) { return QObject::tr("%1").arg(i); }
static inline QString toStr(uint8_t i) { return QObject::tr("%1").arg(i); }
static inline QString toStr(unsigned int i) { return QObject::tr("%1").arg(i); } static inline QString toStr(unsigned int i) { return QObject::tr("%1").arg(i); }
static QString toStr(OpenMesh::Vec3d v); static QString toStr(OpenMesh::Vec3d v);
static QString toStr(OpenMesh::Vec2d v); static QString toStr(OpenMesh::Vec2d v);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment