Commit 5d5d48e7 authored by Martin Heistermann's avatar Martin Heistermann

propvis: Store objectID in OM visualizers, analog to OVM visualizers (for future changes)

parent b85857e6
......@@ -183,7 +183,7 @@ void OMPropertyModel<MeshT>::combine()
{
beginResetModel();
if (isVectorType(mCombineProperty1->typeinfo()))
propertyVisualizers.push_back(new OMPropertyVisualizerVectorFieldDifference<MeshT>(mesh_, *mCombineProperty1, *mCombineProperty2));
propertyVisualizers.push_back(new OMPropertyVisualizerVectorFieldDifference<MeshT>(mesh_, objectID_, *mCombineProperty1, *mCombineProperty2));
endResetModel();
}
......@@ -542,24 +542,24 @@ void OMPropertyModel<MeshT>::addPropertyVisualizer(OpenMesh::BaseProperty* const
{
PropertyInfo propInfo = PropertyInfo(baseProp->name(), getSupportedTypeInfoWrapper(baseProp) , filter);
if (propInfo.typeinfo() == proptype_bool)
propertyVisualizers.push_back(new OMPropertyVisualizerBoolean<MeshT>(mesh, propInfo));
propertyVisualizers.push_back(new OMPropertyVisualizerBoolean<MeshT>(mesh, objectID_, propInfo));
else if (propInfo.typeinfo() == proptype_int)
propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, int>(mesh, propInfo, false));
propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, int>(mesh, objectID_, propInfo, false));
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, objectID_, propInfo, true));
else if (propInfo.typeinfo() == proptype_uint8_t)
propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, uint8_t>(mesh, propInfo, true));
propertyVisualizers.push_back(new OMPropertyVisualizerInteger<MeshT, uint8_t>(mesh, objectID_, propInfo, true));
else if (propInfo.typeinfo() == proptype_double)
propertyVisualizers.push_back(new OMPropertyVisualizerDouble<MeshT>(mesh, propInfo));
propertyVisualizers.push_back(new OMPropertyVisualizerDouble<MeshT>(mesh, objectID_, propInfo));
else if ((propInfo.typeinfo() == proptype_Vec3d) || (propInfo.typeinfo() == proptype_Vec3f))
propertyVisualizers.push_back(new OMPropertyVisualizerVector<MeshT>(mesh, propInfo));
propertyVisualizers.push_back(new OMPropertyVisualizerVector<MeshT>(mesh, objectID_, propInfo));
else if ((propInfo.typeinfo() == proptype_Vec2d))
propertyVisualizers.push_back(new OMPropertyVisualizerVector2<MeshT, ACG::Vec2d>(mesh, propInfo));
propertyVisualizers.push_back(new OMPropertyVisualizerVector2<MeshT, ACG::Vec2d>(mesh, objectID_, propInfo));
else if ((propInfo.typeinfo() == proptype_Vec2f))
propertyVisualizers.push_back(new OMPropertyVisualizerVector2<MeshT, ACG::Vec2f>(mesh, propInfo));
propertyVisualizers.push_back(new OMPropertyVisualizerVector2<MeshT, ACG::Vec2f>(mesh, objectID_, propInfo));
#ifdef ENABLE_SKELETON_SUPPORT
else if (propInfo.typeinfo() == proptype_SkinWeights)
propertyVisualizers.push_back(new OMPropertyVisualizerSkinWeights<MeshT>(mesh, propInfo));
propertyVisualizers.push_back(new OMPropertyVisualizerSkinWeights<MeshT>(mesh, objectID_, propInfo));
#endif
connectLogs(propertyVisualizers.back());
}
......
......@@ -61,9 +61,10 @@ template <typename MeshT>
class OMPropertyVisualizer: public PropertyVisualizer{
public:
OMPropertyVisualizer(MeshT* _mesh, PropertyInfo _propertyInfo)
OMPropertyVisualizer(MeshT* _mesh, int objectID, PropertyInfo _propertyInfo)
: PropertyVisualizer(_propertyInfo),
mesh(_mesh)
mesh(_mesh),
mObjectID(objectID)
{ }
virtual ~OMPropertyVisualizer(){clear();}
......@@ -97,6 +98,7 @@ public:
protected:
MeshT* mesh;
int mObjectID;
virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(bool _setDrawMode = true);
......
......@@ -60,7 +60,7 @@ template <typename MeshT>
class OMPropertyVisualizerBoolean: public OMPropertyVisualizer<MeshT>{
public:
OMPropertyVisualizerBoolean(MeshT* _mesh, PropertyInfo _propertyInfo);
OMPropertyVisualizerBoolean(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo);
virtual ~OMPropertyVisualizerBoolean(){}
protected:
......
......@@ -53,8 +53,8 @@
#include <ACG/Utils/ColorConversion.hh>
template <typename MeshT>
OMPropertyVisualizerBoolean<MeshT>::OMPropertyVisualizerBoolean(MeshT* _mesh, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _propertyInfo)
OMPropertyVisualizerBoolean<MeshT>::OMPropertyVisualizerBoolean(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _objectID, _propertyInfo)
{
if (PropertyVisualizer::widget) delete PropertyVisualizer::widget;
BooleanWidget* w = new BooleanWidget();
......
......@@ -65,7 +65,7 @@ template <typename MeshT>
class OMPropertyVisualizerDouble: public OMPropertyVisualizer<MeshT>{
public:
OMPropertyVisualizerDouble(MeshT* _mesh, PropertyInfo _propertyInfo);
OMPropertyVisualizerDouble(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo);
virtual ~OMPropertyVisualizerDouble(){}
protected:
......
......@@ -53,8 +53,8 @@
#include "OMPropertyVisualizerDouble.hh"
template <typename MeshT>
OMPropertyVisualizerDouble<MeshT>::OMPropertyVisualizerDouble(MeshT* _mesh, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _propertyInfo)
OMPropertyVisualizerDouble<MeshT>::OMPropertyVisualizerDouble(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _objectID, _propertyInfo)
{
if (PropertyVisualizer::widget) delete PropertyVisualizer::widget;
DoubleWidget* w = new DoubleWidget();
......
......@@ -62,7 +62,7 @@ template <typename MeshT, typename T>
class OMPropertyVisualizerInteger: public OMPropertyVisualizer<MeshT>{
public:
OMPropertyVisualizerInteger(MeshT* _mesh, PropertyInfo _propertyInfo, bool isUnsigned);
OMPropertyVisualizerInteger(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo, bool isUnsigned);
virtual ~OMPropertyVisualizerInteger(){}
protected:
......
......@@ -54,8 +54,8 @@
#include "OMPropertyVisualizerInteger.hh"
template <typename MeshT, typename T>
OMPropertyVisualizerInteger<MeshT, T>::OMPropertyVisualizerInteger(MeshT* _mesh, PropertyInfo _propertyInfo, bool isUnsigned)
: OMPropertyVisualizer<MeshT>(_mesh, _propertyInfo)
OMPropertyVisualizerInteger<MeshT, T>::OMPropertyVisualizerInteger(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo, bool isUnsigned)
: OMPropertyVisualizer<MeshT>(_mesh, _objectID, _propertyInfo)
{
if (PropertyVisualizer::widget) delete PropertyVisualizer::widget;
IntegerWidget* w = new IntegerWidget();
......
......@@ -64,7 +64,7 @@ template <typename MeshT>
class OMPropertyVisualizerSkinWeights: public OMPropertyVisualizer<MeshT>{
public:
OMPropertyVisualizerSkinWeights(MeshT* _mesh, PropertyInfo _propertyInfo);
OMPropertyVisualizerSkinWeights(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo);
virtual ~OMPropertyVisualizerSkinWeights(){}
protected:
......
......@@ -55,8 +55,8 @@
#include "OMPropertyVisualizerSkinWeights.hh"
template <typename MeshT>
OMPropertyVisualizerSkinWeights<MeshT>::OMPropertyVisualizerSkinWeights(MeshT* _mesh, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _propertyInfo)
OMPropertyVisualizerSkinWeights<MeshT>::OMPropertyVisualizerSkinWeights(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _objectID, _propertyInfo)
{
if (PropertyVisualizer::widget) delete PropertyVisualizer::widget;
SkinWeightsWidget* w = new SkinWeightsWidget();
......
......@@ -66,7 +66,7 @@ template <typename MeshT>
class OMPropertyVisualizerVector: public OMPropertyVisualizer<MeshT>{
public:
OMPropertyVisualizerVector(MeshT* _mesh, PropertyInfo _propertyInfo);
OMPropertyVisualizerVector(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo);
virtual ~OMPropertyVisualizerVector(){clear();}
virtual void clear();
......
......@@ -67,7 +67,7 @@ template <typename MeshT, typename VectorType>
class OMPropertyVisualizerVector2 : public OMPropertyVisualizer<MeshT>{
public:
OMPropertyVisualizerVector2(MeshT* _mesh, PropertyInfo _propertyInfo);
OMPropertyVisualizerVector2(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo);
virtual ~OMPropertyVisualizerVector2(){clear();}
virtual void clear();
......
......@@ -54,8 +54,8 @@
#include <ACG/Utils/ColorConversion.hh>
template <typename MeshT, typename VectorType>
OMPropertyVisualizerVector2<MeshT, VectorType>::OMPropertyVisualizerVector2(MeshT* _mesh, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _propertyInfo)
OMPropertyVisualizerVector2<MeshT, VectorType>::OMPropertyVisualizerVector2(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _objectID, _propertyInfo)
{
if (PropertyVisualizer::widget) delete PropertyVisualizer::widget;
VectorWidget* w = new VectorWidget();
......
......@@ -66,7 +66,7 @@ template <typename MeshT>
class OMPropertyVisualizerVectorFieldDifference: public OMPropertyVisualizer<MeshT>{
public:
OMPropertyVisualizerVectorFieldDifference(MeshT* _mesh, PropertyInfo _propertyInfo1, PropertyInfo _propertyInfo2);
OMPropertyVisualizerVectorFieldDifference(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo1, PropertyInfo _propertyInfo2);
virtual ~OMPropertyVisualizerVectorFieldDifference(){}
virtual QString getName() { return QObject::tr("Combination of %1 and %2").arg(PropertyVisualizer::propertyInfo.propName().c_str()).arg(propertyInfo2.propName().c_str()); }
......
......@@ -53,8 +53,8 @@
#include "OMPropertyVisualizerVectorFieldDifference.hh"
template <typename MeshT>
OMPropertyVisualizerVectorFieldDifference<MeshT>::OMPropertyVisualizerVectorFieldDifference(MeshT* _mesh, PropertyInfo _propertyInfo1, PropertyInfo _propertyInfo2)
: OMPropertyVisualizer<MeshT>(_mesh, _propertyInfo1),
OMPropertyVisualizerVectorFieldDifference<MeshT>::OMPropertyVisualizerVectorFieldDifference(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo1, PropertyInfo _propertyInfo2)
: OMPropertyVisualizer<MeshT>(_mesh, _objectID, _propertyInfo1),
propertyInfo2(_propertyInfo2)
{
if (PropertyVisualizer::widget) delete PropertyVisualizer::widget;
......
......@@ -53,8 +53,8 @@
#include <ACG/Utils/ColorConversion.hh>
template <typename MeshT>
OMPropertyVisualizerVector<MeshT>::OMPropertyVisualizerVector(MeshT* _mesh, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _propertyInfo)
OMPropertyVisualizerVector<MeshT>::OMPropertyVisualizerVector(MeshT* _mesh, int _objectID, PropertyInfo _propertyInfo)
: OMPropertyVisualizer<MeshT>(_mesh, _objectID, _propertyInfo)
{
if (PropertyVisualizer::widget) delete PropertyVisualizer::widget;
VectorWidget* w = new VectorWidget();
......
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