Commit 79111a5d authored by Max Lyon's avatar Max Lyon

only change draw mode of current mesh

parent ead5c31a
......@@ -90,6 +90,8 @@ public:
virtual QString getPropertyText(unsigned int index);
void setDrawMode(const ACG::SceneGraph::DrawModes::DrawMode& _mode);
protected:
MeshT* mesh;
int mObjectID;
......
......@@ -87,7 +87,7 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeFaceProp(bool _setDrawMode)
mesh->set_color(*f_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
}
......@@ -116,7 +116,7 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeEdgeProp(bool _setDrawMode)
mesh->set_color(*e_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
template <typename MeshT>
......@@ -144,7 +144,7 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeHalfedgeProp(bool _setDrawMode
mesh->set_color(*he_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
}
......@@ -173,7 +173,7 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeVertexProp(bool _setDrawMode)
mesh->set_color(*v_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
}
......
......@@ -132,7 +132,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp(bool _setDrawMode)
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
}
template <typename MeshT>
......@@ -211,7 +211,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp(bool _setDrawMode)
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
......@@ -288,7 +288,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
}
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
}
template <typename MeshT>
......@@ -365,7 +365,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp(bool _setDrawMode)
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
}
template <typename MeshT>
......
......@@ -142,7 +142,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeFaceProp(bool _setDrawMode)
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
}
template <typename MeshT, typename T>
......@@ -218,7 +218,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeEdgeProp(bool _setDrawMode)
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
......@@ -295,7 +295,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeHalfedgeProp(bool _setDrawM
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
}
template <typename MeshT, typename T>
......@@ -371,7 +371,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeVertexProp(bool _setDrawMod
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
}
......
......@@ -113,7 +113,7 @@ void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp(bool _setDrawMo
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
}
template<typename MeshT>
......
......@@ -145,6 +145,16 @@ QString OMPropertyVisualizer<MeshT>::getPropertyText(unsigned int index)
}
template <typename MeshT>
void OMPropertyVisualizer<MeshT>::setDrawMode(const ACG::SceneGraph::DrawModes::DrawMode& _mode)
{
BaseObjectData* object;
PluginFunctions::getObject(mObjectID, object);
object->setObjectDrawMode(_mode);
}
template <typename MeshT>
void OMPropertyVisualizer<MeshT>::setPropertyFromText(unsigned int index, QString text)
{
......
......@@ -158,7 +158,7 @@ void OMPropertyVisualizerVector2<MeshT, VectorType>::visualizeFaceProp(bool _set
PropertyVisualizer::propertyInfo);
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
}
else visualizeFacePropAsStrokes();
}
......@@ -190,7 +190,7 @@ void OMPropertyVisualizerVector2<MeshT, VectorType>::visualizeEdgeProp(bool _set
PropertyVisualizer::propertyInfo);
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
else visualizeEdgePropAsStrokes();
}
......@@ -224,7 +224,7 @@ void OMPropertyVisualizerVector2<MeshT, VectorType>::visualizeHalfedgeProp(bool
}
if (_setDrawMode)
PluginFunctions::setDrawMode(
this->setDrawMode(
ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
}
else visualizeHalfedgePropAsStrokes();
......@@ -255,7 +255,7 @@ void OMPropertyVisualizerVector2<MeshT, VectorType>::visualizeVertexProp(bool _s
PropertyVisualizer::propertyInfo);
}
if (_setDrawMode)
PluginFunctions::setDrawMode(
this->setDrawMode(
ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
}
else visualizeVertexPropAsStrokes();
......@@ -303,7 +303,7 @@ void OMPropertyVisualizerVector2<MeshT, VectorType>::visualizeFacePropOnEdges()
}
_mesh->set_color(*e_it, color);
}
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED | ACG::SceneGraph::DrawModes::EDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED | ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
template <typename MeshT, typename VectorType>
......
......@@ -140,7 +140,7 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeFaceProp(bool _s
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);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
}
template <typename MeshT>
......@@ -161,7 +161,7 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeEdgeProp(bool _s
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);
this->setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
template <typename MeshT>
......@@ -182,7 +182,7 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeHalfedgeProp(boo
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);
this->setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
}
template <typename MeshT>
......@@ -203,5 +203,5 @@ void OMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeVertexProp(bool
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);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
}
......@@ -154,7 +154,7 @@ void OMPropertyVisualizerVector<MeshT>::visualizeFaceProp(bool _setDrawMode)
PropertyVisualizer::propertyInfo);
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
}
else visualizeFacePropAsStrokes();
}
......@@ -187,7 +187,7 @@ void OMPropertyVisualizerVector<MeshT>::visualizeEdgeProp(bool _setDrawMode)
PropertyVisualizer::propertyInfo);
}
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
else visualizeEdgePropAsStrokes();
}
......@@ -222,7 +222,7 @@ void OMPropertyVisualizerVector<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
}
if (_setDrawMode)
PluginFunctions::setDrawMode(
this->setDrawMode(
ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
}
else visualizeHalfedgePropAsStrokes();
......@@ -254,7 +254,7 @@ void OMPropertyVisualizerVector<MeshT>::visualizeVertexProp(bool _setDrawMode)
PropertyVisualizer::propertyInfo);
}
if (_setDrawMode)
PluginFunctions::setDrawMode(
this->setDrawMode(
ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
}
else visualizeVertexPropAsStrokes();
......@@ -303,7 +303,7 @@ void OMPropertyVisualizerVector<MeshT>::visualizeFacePropOnEdges() {
}
_mesh->set_color(*e_it, color);
}
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED | ACG::SceneGraph::DrawModes::EDGES_COLORED);
this->setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED | ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
template <typename MeshT>
......
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