Commit 88e2f20c authored by Max Lyon's avatar Max Lyon

after updatedObject is emitted with UpdateType UPDATE_ALL or UPDATE_GEOMETRY...

after updatedObject is emitted with UpdateType UPDATE_ALL or UPDATE_GEOMETRY the property visualizer revisualizes all currently visualized properties.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16775 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 05ae8343
...@@ -213,7 +213,7 @@ bool OMPropertyModel<MeshT>::combinable(PropertyVisualizer* propertyVisualizer1, ...@@ -213,7 +213,7 @@ bool OMPropertyModel<MeshT>::combinable(PropertyVisualizer* propertyVisualizer1,
template<typename MeshT> template<typename MeshT>
void OMPropertyModel<MeshT>::saveProperty() void OMPropertyModel<MeshT>::saveProperty()
{ {
for (QModelIndexList::const_iterator it = currentIndices.begin(), it_end = currentIndices.end(); for (QModelIndexList::const_iterator it = currentlySelectedIndices.begin(), it_end = currentlySelectedIndices.end();
it != it_end; ++it) { it != it_end; ++it) {
PropertyModel::saveProperty(it->row()); PropertyModel::saveProperty(it->row());
} }
...@@ -390,7 +390,7 @@ void OMPropertyModel<MeshT>::mouseEvent(QMouseEvent* _event) ...@@ -390,7 +390,7 @@ void OMPropertyModel<MeshT>::mouseEvent(QMouseEvent* _event)
if (object->id() == objectID_) if (object->id() == objectID_)
{ {
OMPropertyVisualizer<MeshT>* viz = (OMPropertyVisualizer<MeshT>*) propertyVisualizers[currentIndices.first().row()]; OMPropertyVisualizer<MeshT>* viz = (OMPropertyVisualizer<MeshT>*) propertyVisualizers[currentlySelectedIndices.first().row()];
unsigned int primitiveId = viz->getClosestPrimitiveId(face_idx, hit_point); unsigned int primitiveId = viz->getClosestPrimitiveId(face_idx, hit_point);
mPickWidget.pickedHandle->setText(tr("%1").arg(primitiveId)); mPickWidget.pickedHandle->setText(tr("%1").arg(primitiveId));
mPickWidget.pickedValue->setText(viz->getPropertyText(primitiveId)); mPickWidget.pickedValue->setText(viz->getPropertyText(primitiveId));
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
/// Visualizes the property. /// Visualizes the property.
virtual void visualize(); virtual void visualize(bool _setDrawMode = true);
/** /**
* @brief Removes the property. * @brief Removes the property.
...@@ -91,10 +91,10 @@ public: ...@@ -91,10 +91,10 @@ public:
protected: protected:
MeshT* mesh; MeshT* mesh;
virtual void visualizeFaceProp(); virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(); virtual void visualizeEdgeProp(bool _setDrawMode = true);
virtual void visualizeHalfedgeProp(); virtual void visualizeHalfedgeProp(bool _setDrawMode = true);
virtual void visualizeVertexProp(); virtual void visualizeVertexProp(bool _setDrawMode = true);
template <typename PropType> template <typename PropType>
void removeProperty_stage1(); void removeProperty_stage1();
......
...@@ -58,10 +58,10 @@ public: ...@@ -58,10 +58,10 @@ public:
protected: protected:
virtual void visualizeFaceProp(); virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(); virtual void visualizeEdgeProp(bool _setDrawMode = true);
virtual void visualizeHalfedgeProp(); virtual void visualizeHalfedgeProp(bool _setDrawMode = true);
virtual void visualizeVertexProp(); virtual void visualizeVertexProp(bool _setDrawMode = true);
virtual void removeProperty(); virtual void removeProperty();
virtual void duplicateProperty(); virtual void duplicateProperty();
......
...@@ -61,7 +61,7 @@ QString OMPropertyVisualizerBoolean<MeshT>::getPropertyText(unsigned int index) ...@@ -61,7 +61,7 @@ QString OMPropertyVisualizerBoolean<MeshT>::getPropertyText(unsigned int index)
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerBoolean<MeshT>::visualizeFaceProp() void OMPropertyVisualizerBoolean<MeshT>::visualizeFaceProp(bool _setDrawMode)
{ {
BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget); BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget);
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
...@@ -84,12 +84,13 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeFaceProp() ...@@ -84,12 +84,13 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeFaceProp()
else else
mesh->set_color(f_it, colorFalse); mesh->set_color(f_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerBoolean<MeshT>::visualizeEdgeProp() void OMPropertyVisualizerBoolean<MeshT>::visualizeEdgeProp(bool _setDrawMode)
{ {
BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget); BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget);
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
...@@ -112,11 +113,12 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeEdgeProp() ...@@ -112,11 +113,12 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeEdgeProp()
else else
mesh->set_color(e_it, colorFalse); mesh->set_color(e_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerBoolean<MeshT>::visualizeHalfedgeProp() void OMPropertyVisualizerBoolean<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
{ {
BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget); BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget);
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
...@@ -139,12 +141,13 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeHalfedgeProp() ...@@ -139,12 +141,13 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeHalfedgeProp()
else else
mesh->set_color(he_it, colorFalse); mesh->set_color(he_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerBoolean<MeshT>::visualizeVertexProp() void OMPropertyVisualizerBoolean<MeshT>::visualizeVertexProp(bool _setDrawMode)
{ {
BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget); BooleanWidget* booleanWidget = static_cast<BooleanWidget*>(PropertyVisualizer::widget);
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
...@@ -167,6 +170,7 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeVertexProp() ...@@ -167,6 +170,7 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeVertexProp()
else else
mesh->set_color(v_it, colorFalse); mesh->set_color(v_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
} }
......
...@@ -64,10 +64,10 @@ public: ...@@ -64,10 +64,10 @@ public:
protected: protected:
virtual void visualizeFaceProp(); virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(); virtual void visualizeEdgeProp(bool _setDrawMode = true);
virtual void visualizeHalfedgeProp(); virtual void visualizeHalfedgeProp(bool _setDrawMode = true);
virtual void visualizeVertexProp(); virtual void visualizeVertexProp(bool _setDrawMode = true);
virtual void removeProperty(); virtual void removeProperty();
virtual void duplicateProperty(); virtual void duplicateProperty();
......
...@@ -55,7 +55,7 @@ OMPropertyVisualizerDouble<MeshT>::OMPropertyVisualizerDouble(MeshT* _mesh, Prop ...@@ -55,7 +55,7 @@ OMPropertyVisualizerDouble<MeshT>::OMPropertyVisualizerDouble(MeshT* _mesh, Prop
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp() void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp(bool _setDrawMode)
{ {
DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget); DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -138,11 +138,12 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp() ...@@ -138,11 +138,12 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp()
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp() void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp(bool _setDrawMode)
{ {
DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget); DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -229,12 +230,14 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp() ...@@ -229,12 +230,14 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp()
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp() void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
{ {
DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget); DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -319,11 +322,12 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp() ...@@ -319,11 +322,12 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp()
OMPropertyVisualizer<MeshT>::mesh->set_color(he_it, color); OMPropertyVisualizer<MeshT>::mesh->set_color(he_it, color);
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp() void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp(bool _setDrawMode)
{ {
DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget); DoubleWidget* doubleWidget = static_cast<DoubleWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -408,6 +412,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp() ...@@ -408,6 +412,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp()
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
} }
......
...@@ -60,10 +60,10 @@ public: ...@@ -60,10 +60,10 @@ public:
protected: protected:
virtual void visualizeFaceProp(); virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(); virtual void visualizeEdgeProp(bool _setDrawMode = true);
virtual void visualizeHalfedgeProp(); virtual void visualizeHalfedgeProp(bool _setDrawMode = true);
virtual void visualizeVertexProp(); virtual void visualizeVertexProp(bool _setDrawMode = true);
virtual void removeProperty(); virtual void removeProperty();
virtual void duplicateProperty(); virtual void duplicateProperty();
......
...@@ -67,7 +67,7 @@ QString OMPropertyVisualizerInteger<MeshT, T>::getPropertyText(unsigned int inde ...@@ -67,7 +67,7 @@ QString OMPropertyVisualizerInteger<MeshT, T>::getPropertyText(unsigned int inde
} }
template <typename MeshT, typename T> template <typename MeshT, typename T>
void OMPropertyVisualizerInteger<MeshT, T>::visualizeFaceProp() void OMPropertyVisualizerInteger<MeshT, T>::visualizeFaceProp(bool _setDrawMode)
{ {
IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget); IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -152,11 +152,12 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeFaceProp() ...@@ -152,11 +152,12 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeFaceProp()
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
} }
template <typename MeshT, typename T> template <typename MeshT, typename T>
void OMPropertyVisualizerInteger<MeshT, T>::visualizeEdgeProp() void OMPropertyVisualizerInteger<MeshT, T>::visualizeEdgeProp(bool _setDrawMode)
{ {
IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget); IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -241,12 +242,13 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeEdgeProp() ...@@ -241,12 +242,13 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeEdgeProp()
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
} }
template <typename MeshT, typename T> template <typename MeshT, typename T>
void OMPropertyVisualizerInteger<MeshT, T>::visualizeHalfedgeProp() void OMPropertyVisualizerInteger<MeshT, T>::visualizeHalfedgeProp(bool _setDrawMode)
{ {
IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget); IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -331,11 +333,12 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeHalfedgeProp() ...@@ -331,11 +333,12 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeHalfedgeProp()
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
} }
template <typename MeshT, typename T> template <typename MeshT, typename T>
void OMPropertyVisualizerInteger<MeshT, T>::visualizeVertexProp() void OMPropertyVisualizerInteger<MeshT, T>::visualizeVertexProp(bool _setDrawMode)
{ {
IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget); IntegerWidget* integerWidget = static_cast<IntegerWidget*>(PropertyVisualizer::widget);
typename MeshT::Color colorMin, colorMax; typename MeshT::Color colorMin, colorMax;
...@@ -422,6 +425,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeVertexProp() ...@@ -422,6 +425,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeVertexProp()
} }
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
} }
......
...@@ -62,10 +62,10 @@ public: ...@@ -62,10 +62,10 @@ public:
protected: protected:
virtual void visualizeFaceProp(); virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(); virtual void visualizeEdgeProp(bool _setDrawMode = true);
virtual void visualizeHalfedgeProp(); virtual void visualizeHalfedgeProp(bool _setDrawMode = true);
virtual void visualizeVertexProp(); virtual void visualizeVertexProp(bool _setDrawMode = true);
QString getPropertyText(unsigned int index); QString getPropertyText(unsigned int index);
......
...@@ -64,25 +64,25 @@ QString OMPropertyVisualizerSkinWeights<MeshT>::getPropertyText(unsigned int ind ...@@ -64,25 +64,25 @@ QString OMPropertyVisualizerSkinWeights<MeshT>::getPropertyText(unsigned int ind
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerSkinWeights<MeshT>::visualizeFaceProp() void OMPropertyVisualizerSkinWeights<MeshT>::visualizeFaceProp(bool /*_setDrawMode*/)
{ {
OMPropertyVisualizer<MeshT>::log("Visualizing SkinWeights for faces not supported."); OMPropertyVisualizer<MeshT>::log("Visualizing SkinWeights for faces not supported.");
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerSkinWeights<MeshT>::visualizeEdgeProp() void OMPropertyVisualizerSkinWeights<MeshT>::visualizeEdgeProp(bool /*_setDrawMode*/)
{ {
OMPropertyVisualizer<MeshT>::log("Visualizing SkinWeights for edges not supported."); OMPropertyVisualizer<MeshT>::log("Visualizing SkinWeights for edges not supported.");
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerSkinWeights<MeshT>::visualizeHalfedgeProp() void OMPropertyVisualizerSkinWeights<MeshT>::visualizeHalfedgeProp(bool /*_setDrawMode*/)
{ {
OMPropertyVisualizer<MeshT>::log("Visualizing SkinWeights for halfedges not supported."); OMPropertyVisualizer<MeshT>::log("Visualizing SkinWeights for halfedges not supported.");
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp() void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp(bool _setDrawMode)
{ {
SkinWeightsWidget* skinWeightsWidget = static_cast<SkinWeightsWidget*>(PropertyVisualizer::widget); SkinWeightsWidget* skinWeightsWidget = static_cast<SkinWeightsWidget*>(PropertyVisualizer::widget);
...@@ -111,6 +111,7 @@ void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp() ...@@ -111,6 +111,7 @@ void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp()
OMPropertyVisualizer<MeshT>::mesh->set_color(v_it, color); OMPropertyVisualizer<MeshT>::mesh->set_color(v_it, color);
} }
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
} }
......
...@@ -301,16 +301,16 @@ unsigned int OMPropertyVisualizer<MeshT>::getClosestVertexId(unsigned int _face, ...@@ -301,16 +301,16 @@ unsigned int OMPropertyVisualizer<MeshT>::getClosestVertexId(unsigned int _face,
* type of the property. * type of the property.
*/ */
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizer<MeshT>::visualize() void OMPropertyVisualizer<MeshT>::visualize(bool _setDrawMode)
{ {
if (propertyInfo.isFaceProp()) if (propertyInfo.isFaceProp())
visualizeFaceProp(); visualizeFaceProp(_setDrawMode);
else if (propertyInfo.isEdgeProp()) else if (propertyInfo.isEdgeProp())
visualizeEdgeProp(); visualizeEdgeProp(_setDrawMode);
else if (propertyInfo.isHalfedgeProp()) else if (propertyInfo.isHalfedgeProp())
visualizeHalfedgeProp(); visualizeHalfedgeProp(_setDrawMode);
else if (propertyInfo.isVertexProp()) else if (propertyInfo.isVertexProp())
visualizeVertexProp(); visualizeVertexProp(_setDrawMode);
} }
/** /**
...@@ -348,25 +348,25 @@ OpenMesh::Vec4f OMPropertyVisualizer<MeshT>::convertColor(const QColor _color){ ...@@ -348,25 +348,25 @@ OpenMesh::Vec4f OMPropertyVisualizer<MeshT>::convertColor(const QColor _color){
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizer<MeshT>::visualizeFaceProp() void OMPropertyVisualizer<MeshT>::visualizeFaceProp(bool /*_setDrawMode*/)
{ {
emit log(LOGERR, "Visualizing FaceProp not implemented"); emit log(LOGERR, "Visualizing FaceProp not implemented");
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizer<MeshT>::visualizeEdgeProp() void OMPropertyVisualizer<MeshT>::visualizeEdgeProp(bool /*_setDrawMode*/)
{ {
emit log(LOGERR, "Visualizing EdgeProp not implemented"); emit log(LOGERR, "Visualizing EdgeProp not implemented");
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizer<MeshT>::visualizeHalfedgeProp() void OMPropertyVisualizer<MeshT>::visualizeHalfedgeProp(bool /*_setDrawMode*/)
{ {
emit log(LOGERR, "Visualizing HalfedgeProp not implemented"); emit log(LOGERR, "Visualizing HalfedgeProp not implemented");
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizer<MeshT>::visualizeVertexProp() void OMPropertyVisualizer<MeshT>::visualizeVertexProp(bool /*_setDrawMode*/)
{ {
emit log(LOGERR, "Visualizing VertexProp not implemented"); emit log(LOGERR, "Visualizing VertexProp not implemented");
} }
......
...@@ -66,10 +66,10 @@ public: ...@@ -66,10 +66,10 @@ public:
protected: protected:
virtual void visualizeFaceProp(); virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(); virtual void visualizeEdgeProp(bool _setDrawMode = true);
virtual void visualizeHalfedgeProp(); virtual void visualizeHalfedgeProp(bool _setDrawMode = true);
virtual void visualizeVertexProp(); virtual void visualizeVertexProp(bool _setDrawMode = true);
virtual void visualizeFacePropOnEdges(); virtual void visualizeFacePropOnEdges();
......
...@@ -67,10 +67,10 @@ public: ...@@ -67,10 +67,10 @@ public:
protected: protected:
virtual void visualizeFaceProp(); virtual void visualizeFaceProp(bool _setDrawMode = true);
virtual void visualizeEdgeProp(); virtual void visualizeEdgeProp(bool _setDrawMode = true);
virtual void visualizeHalfedgeProp(); virtual void visualizeHalfedgeProp(bool _setDrawMode = true);
virtual void visualizeVertexProp(); virtual void visualizeVertexProp(bool _setDrawMode = true);
virtual void removeProperty(){} //no need to delete a property virtual void removeProperty(){} //no need to delete a property
virtual void duplciateProperty(){ emit OMPropertyVisualizer<MeshT>::log("combined properties cannot be duplicated");} virtual void duplciateProperty(){ emit OMPropertyVisualizer<MeshT>::log("combined properties cannot be duplicated");}
......
...@@ -158,7 +158,7 @@ void colorElements(MeshT *mesh, const PropertyInfo &p1, ...@@ -158,7 +158,7 @@ void colorElements(MeshT *mesh, const PropertyInfo &p1,
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeFaceProp() void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeFaceProp(bool _setDrawMode)
{ {
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
const PropertyInfo p1 = PropertyVisualizer::propertyInfo; const PropertyInfo p1 = PropertyVisualizer::propertyInfo;
...@@ -174,11 +174,12 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeFaceProp() ...@@ -174,11 +174,12 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeFaceProp()
if (w->vecFieldDiff_norm_diff_rb->isChecked()) if (w->vecFieldDiff_norm_diff_rb->isChecked())
OMPVVFD::colorElements<MeshT, typename MeshT::FaceIter, OpenMesh::FPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->faces_begin(), mesh->faces_end()); OMPVVFD::colorElements<MeshT, typename MeshT::FaceIter, OpenMesh::FPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->faces_begin(), mesh->faces_end());
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeEdgeProp() void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeEdgeProp(bool _setDrawMode)
{ {
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
const PropertyInfo p1 = PropertyVisualizer::propertyInfo; const PropertyInfo p1 = PropertyVisualizer::propertyInfo;
...@@ -194,11 +195,12 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeEdgeProp() ...@@ -194,11 +195,12 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeEdgeProp()
if (w->vecFieldDiff_norm_diff_rb->isChecked()) if (w->vecFieldDiff_norm_diff_rb->isChecked())
OMPVVFD::colorElements<MeshT, typename MeshT::EdgeIter, OpenMesh::EPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->edges_begin(), mesh->edges_end()); OMPVVFD::colorElements<MeshT, typename MeshT::EdgeIter, OpenMesh::EPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->edges_begin(), mesh->edges_end());
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeHalfedgeProp() void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
{ {
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
const PropertyInfo p1 = PropertyVisualizer::propertyInfo; const PropertyInfo p1 = PropertyVisualizer::propertyInfo;
...@@ -214,11 +216,12 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeHalfedgeProp() ...@@ -214,11 +216,12 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeHalfedgeProp()
if (w->vecFieldDiff_norm_diff_rb->isChecked()) if (w->vecFieldDiff_norm_diff_rb->isChecked())
OMPVVFD::colorElements<MeshT, typename MeshT::HalfedgeIter, OpenMesh::HPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->halfedges_begin(), mesh->halfedges_end()); OMPVVFD::colorElements<MeshT, typename MeshT::HalfedgeIter, OpenMesh::HPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->halfedges_begin(), mesh->halfedges_end());
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeVertexProp() void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeVertexProp(bool _setDrawMode)
{ {
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh; MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
const PropertyInfo p1 = PropertyVisualizer::propertyInfo; const PropertyInfo p1 = PropertyVisualizer::propertyInfo;
...@@ -234,5 +237,6 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeVertexProp() ...@@ -234,5 +237,6 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeVertexProp()
if (w->vecFieldDiff_norm_diff_rb->isChecked()) if (w->vecFieldDiff_norm_diff_rb->isChecked())
OMPVVFD::colorElements<MeshT, typename MeshT::VertexIter, OpenMesh::VPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->vertices_begin(), mesh->vertices_end()); OMPVVFD::colorElements<MeshT, typename MeshT::VertexIter, OpenMesh::VPropHandleT<typename MeshT::Point>, OMPVVFD::scalarFn_norm_of_diff<MeshT> >(mesh, p1, p2, mesh->vertices_begin(), mesh->vertices_end());
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED); PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
} }
...@@ -93,7 +93,7 @@ void visualizeVectorAsColorForEntity(MeshT *mesh, const ENTITY_IT e_begin, const ...@@ -93,7 +93,7 @@ void visualizeVectorAsColorForEntity(MeshT *mesh, const ENTITY_IT e_begin, const
} }
template <typename MeshT> template <typename MeshT>
void OMPropertyVisualizerVector<MeshT>::visualizeFaceProp() void OMPropertyVisualizerVector<MeshT>::visualizeFaceProp(bool _setDrawMode)