Commit 63f6a833 authored by Matthias Möller's avatar Matthias Möller

OM3 iterators

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17236 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3683da44
......@@ -79,10 +79,10 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeFaceProp(bool _setDrawMode)
OMPropertyVisualizer<MeshT>::mesh->request_face_colors();
for (typename MeshT::FaceIter f_it = mesh->faces_begin() ; f_it != mesh->faces_end() ; ++f_it)
if ( mesh->property(prop, f_it) )
mesh->set_color(f_it, colorTrue);
if ( mesh->property(prop, *f_it) )
mesh->set_color(*f_it, colorTrue);
else
mesh->set_color(f_it, colorFalse);
mesh->set_color(*f_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED);
......@@ -108,10 +108,10 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeEdgeProp(bool _setDrawMode)
mesh->request_edge_colors();
for (typename MeshT::EdgeIter e_it = mesh->edges_begin() ; e_it != mesh->edges_end() ; ++e_it)
if ( mesh->property(prop, e_it) )
mesh->set_color(e_it, colorTrue);
if ( mesh->property(prop, *e_it) )
mesh->set_color(*e_it, colorTrue);
else
mesh->set_color(e_it, colorFalse);
mesh->set_color(*e_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
......@@ -136,10 +136,10 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeHalfedgeProp(bool _setDrawMode
mesh->request_halfedge_colors();
for (typename MeshT::HalfedgeIter he_it = mesh->halfedges_begin() ; he_it != mesh->halfedges_end() ; ++he_it)
if ( mesh->property(prop, he_it) )
mesh->set_color(he_it, colorTrue);
if ( mesh->property(prop, *he_it) )
mesh->set_color(*he_it, colorTrue);
else
mesh->set_color(he_it, colorFalse);
mesh->set_color(*he_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::HALFEDGES_COLORED);
......@@ -165,10 +165,10 @@ void OMPropertyVisualizerBoolean<MeshT>::visualizeVertexProp(bool _setDrawMode)
mesh->request_vertex_colors();
for (typename MeshT::VertexIter v_it = mesh->vertices_begin() ; v_it != mesh->vertices_end() ; ++v_it)
if ( mesh->property(prop, v_it) )
mesh->set_color(v_it, colorTrue);
if ( mesh->property(prop, *v_it) )
mesh->set_color(*v_it, colorTrue);
else
mesh->set_color(v_it, colorFalse);
mesh->set_color(*v_it, colorFalse);
if (_setDrawMode)
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED);
......
......@@ -83,11 +83,11 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp(bool _setDrawMode)
for (typename MeshT::FaceIter f_it = OMPropertyVisualizer<MeshT>::mesh->faces_begin() ; f_it != OMPropertyVisualizer<MeshT>::mesh->faces_end() ; ++f_it){
if ( doubleWidget->doubleAbsolute->isChecked() ){
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, f_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, f_it)));
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *f_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *f_it)));
} else {
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, f_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, f_it));
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, *f_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, *f_it));
}
}
......@@ -111,10 +111,10 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp(bool _setDrawMode)
for (typename MeshT::FaceIter f_it = OMPropertyVisualizer<MeshT>::mesh->faces_begin() ; f_it != OMPropertyVisualizer<MeshT>::mesh->faces_end() ; ++f_it){
if (range == 0.0)
OMPropertyVisualizer<MeshT>::mesh->set_color(f_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*f_it, colorMin);
else
{
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, f_it);
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, *f_it);
// absolut value?
if ( doubleWidget->doubleAbsolute->isChecked())
......@@ -134,7 +134,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeFaceProp(bool _setDrawMode)
color = (colorMin)*(1.0-t) + (colorMax)*t;
// set color
OMPropertyVisualizer<MeshT>::mesh->set_color(f_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*f_it, color);
}
}
......@@ -174,11 +174,11 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp(bool _setDrawMode)
for (typename MeshT::EdgeIter e_it = OMPropertyVisualizer<MeshT>::mesh->edges_begin() ; e_it != OMPropertyVisualizer<MeshT>::mesh->edges_end() ; ++e_it){
if ( doubleWidget->doubleAbsolute->isChecked() ){
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, e_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, e_it)));
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *e_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *e_it)));
} else {
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, e_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, e_it));
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, *e_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, *e_it));
}
}
......@@ -203,10 +203,10 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp(bool _setDrawMode)
for (typename MeshT::EdgeIter e_it = OMPropertyVisualizer<MeshT>::mesh->edges_begin() ; e_it != OMPropertyVisualizer<MeshT>::mesh->edges_end() ; ++e_it){
if (range == 0.0)
OMPropertyVisualizer<MeshT>::mesh->set_color(e_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*e_it, colorMin);
else {
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, e_it);
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, *e_it);
// absolut value?
if ( doubleWidget->doubleAbsolute->isChecked())
......@@ -226,7 +226,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeEdgeProp(bool _setDrawMode)
color = (colorMin)*(1.0-t) + (colorMax)*t;
// set color
OMPropertyVisualizer<MeshT>::mesh->set_color(e_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*e_it, color);
}
}
......@@ -267,11 +267,11 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
for (typename MeshT::HalfedgeIter he_it = OMPropertyVisualizer<MeshT>::mesh->halfedges_begin() ; he_it != OMPropertyVisualizer<MeshT>::mesh->halfedges_end() ; ++he_it){
if ( doubleWidget->doubleAbsolute->isChecked() ){
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, he_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, he_it)));
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *he_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *he_it)));
} else {
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, he_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, he_it));
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, *he_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, *he_it));
}
}
......@@ -295,10 +295,10 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
for (typename MeshT::HalfedgeIter he_it = OMPropertyVisualizer<MeshT>::mesh->halfedges_begin() ; he_it != OMPropertyVisualizer<MeshT>::mesh->halfedges_end() ; ++he_it){
if (range == 0.0)
OMPropertyVisualizer<MeshT>::mesh->set_color(he_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*he_it, colorMin);
else {
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, he_it);
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, *he_it);
// absolut value?
if ( doubleWidget->doubleAbsolute->isChecked())
......@@ -319,7 +319,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeHalfedgeProp(bool _setDrawMode)
}
// set color
OMPropertyVisualizer<MeshT>::mesh->set_color(he_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*he_it, color);
}
}
if (_setDrawMode)
......@@ -356,11 +356,11 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp(bool _setDrawMode)
for (typename MeshT::VertexIter v_it = OMPropertyVisualizer<MeshT>::mesh->vertices_begin() ; v_it != OMPropertyVisualizer<MeshT>::mesh->vertices_end() ; ++v_it){
if ( doubleWidget->doubleAbsolute->isChecked() ){
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, v_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, v_it)));
min = std::min( min, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *v_it)));
max = std::max( max, fabs(OMPropertyVisualizer<MeshT>::mesh->property(prop, *v_it)));
} else {
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, v_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, v_it));
min = std::min( min, OMPropertyVisualizer<MeshT>::mesh->property(prop, *v_it));
max = std::max( max, OMPropertyVisualizer<MeshT>::mesh->property(prop, *v_it));
}
}
......@@ -384,10 +384,10 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp(bool _setDrawMode)
for (typename MeshT::VertexIter v_it = OMPropertyVisualizer<MeshT>::mesh->vertices_begin() ; v_it != OMPropertyVisualizer<MeshT>::mesh->vertices_end() ; ++v_it){
if (range == 0.0)
OMPropertyVisualizer<MeshT>::mesh->set_color(v_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*v_it, colorMin);
else {
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, v_it);
double v = OMPropertyVisualizer<MeshT>::mesh->property(prop, *v_it);
// absolut value?
if ( doubleWidget->doubleAbsolute->isChecked())
......@@ -408,7 +408,7 @@ void OMPropertyVisualizerDouble<MeshT>::visualizeVertexProp(bool _setDrawMode)
}
// set color
OMPropertyVisualizer<MeshT>::mesh->set_color(v_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*v_it, color);
}
}
......
......@@ -68,10 +68,10 @@ protected:
virtual void removeProperty();
virtual void duplicateProperty();
virtual T getValue(OpenMesh::FPropHandleT< T > prop, typename MeshT::FaceIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, iter) ; }
virtual T getValue(OpenMesh::EPropHandleT< T > prop, typename MeshT::EdgeIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, iter) ; }
virtual T getValue(OpenMesh::HPropHandleT< T > prop, typename MeshT::HalfedgeIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, iter) ; }
virtual T getValue(OpenMesh::VPropHandleT< T > prop, typename MeshT::VertexIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, iter) ; }
virtual T getValue(OpenMesh::FPropHandleT< T > prop, typename MeshT::FaceIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, *iter) ; }
virtual T getValue(OpenMesh::EPropHandleT< T > prop, typename MeshT::EdgeIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, *iter) ; }
virtual T getValue(OpenMesh::HPropHandleT< T > prop, typename MeshT::HalfedgeIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, *iter) ; }
virtual T getValue(OpenMesh::VPropHandleT< T > prop, typename MeshT::VertexIter iter) { return OMPropertyVisualizer<MeshT>::mesh->property(prop, *iter) ; }
virtual QString getPropertyText(unsigned int index);
......
......@@ -117,7 +117,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeFaceProp(bool _setDrawMode)
for (typename MeshT::FaceIter f_it = OMPropertyVisualizer<MeshT>::mesh->faces_begin() ; f_it != OMPropertyVisualizer<MeshT>::mesh->faces_end() ; ++f_it){
if (range == 0)
OMPropertyVisualizer<MeshT>::mesh->set_color(f_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*f_it, colorMin);
else {
double pos = (getValue(prop, f_it) - min) / (double) range;
......@@ -148,7 +148,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeFaceProp(bool _setDrawMode)
color = randomColor[ getValue(prop, f_it) ];
}
OMPropertyVisualizer<MeshT>::mesh->set_color(f_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*f_it, color);
}
}
......@@ -207,7 +207,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeEdgeProp(bool _setDrawMode)
for (typename MeshT::EdgeIter e_it = OMPropertyVisualizer<MeshT>::mesh->edges_begin() ; e_it != OMPropertyVisualizer<MeshT>::mesh->edges_end() ; ++e_it){
if (range == 0)
OMPropertyVisualizer<MeshT>::mesh->set_color(e_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*e_it, colorMin);
else {
double pos = (getValue(prop, e_it) - min) / (double) range;
......@@ -238,7 +238,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeEdgeProp(bool _setDrawMode)
color = randomColor[ getValue(prop, e_it) ];
}
OMPropertyVisualizer<MeshT>::mesh->set_color(e_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*e_it, color);
}
}
......@@ -298,7 +298,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeHalfedgeProp(bool _setDrawM
for (typename MeshT::HalfedgeIter he_it = OMPropertyVisualizer<MeshT>::mesh->halfedges_begin() ; he_it != OMPropertyVisualizer<MeshT>::mesh->halfedges_end() ; ++he_it){
if (range == 0)
OMPropertyVisualizer<MeshT>::mesh->set_color(he_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*he_it, colorMin);
else {
double pos = (getValue(prop, he_it) - min) / (double) range;
......@@ -329,7 +329,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeHalfedgeProp(bool _setDrawM
color = randomColor[ getValue(prop, he_it) ];
}
OMPropertyVisualizer<MeshT>::mesh->set_color(he_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*he_it, color);
}
}
......@@ -388,7 +388,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeVertexProp(bool _setDrawMod
for (typename MeshT::VertexIter v_it = OMPropertyVisualizer<MeshT>::mesh->vertices_begin() ; v_it != OMPropertyVisualizer<MeshT>::mesh->vertices_end() ; ++v_it){
if (range == 0)
OMPropertyVisualizer<MeshT>::mesh->set_color(v_it, colorMin);
OMPropertyVisualizer<MeshT>::mesh->set_color(*v_it, colorMin);
else {
double pos = (getValue(prop, v_it) - min) / (double) range;
......@@ -421,7 +421,7 @@ void OMPropertyVisualizerInteger<MeshT, T>::visualizeVertexProp(bool _setDrawMod
color = randomColor[ getValue(prop, v_it) ];
}
OMPropertyVisualizer<MeshT>::mesh->set_color(v_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*v_it, color);
}
}
......
......@@ -97,7 +97,7 @@ void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp(bool _setDrawMo
for (typename MeshT::VertexIter v_it = OMPropertyVisualizer<MeshT>::mesh->vertices_begin() ; v_it != OMPropertyVisualizer<MeshT>::mesh->vertices_end() ; ++v_it){
BaseSkin::SkinWeights weight = OMPropertyVisualizer<MeshT>::mesh->property(prop, v_it);
BaseSkin::SkinWeights weight = OMPropertyVisualizer<MeshT>::mesh->property(prop, *v_it);
double value = 0.0;
if ( weight.find( skinWeightsWidget->boneId->value() ) != weight.end() ) {
......@@ -108,7 +108,7 @@ void OMPropertyVisualizerSkinWeights<MeshT>::visualizeVertexProp(bool _setDrawMo
typename MeshT::Color color(value,1.0-value,0.0,1.0);
// set color
OMPropertyVisualizer<MeshT>::mesh->set_color(v_it, color);
OMPropertyVisualizer<MeshT>::mesh->set_color(*v_it, color);
}
if (_setDrawMode)
......
......@@ -239,10 +239,10 @@ unsigned int OMPropertyVisualizer<MeshT>::getClosestHalfedgeId(unsigned int _fac
ACG::Vec3d vTemp = ACG::Vec3d(0.0, 0.0, 0.0);
typename MeshT::Point p;
for (fh_it = mesh->fh_iter(mesh->face_handle(_face)); fh_it; ++fh_it){
for (fh_it = mesh->fh_iter(mesh->face_handle(_face)); fh_it.is_valid(); ++fh_it){
typename MeshT::HalfedgeHandle heh;
heh = fh_it.handle();
heh = *fh_it;
typename MeshT::VertexHandle v1;
v1 = mesh->to_vertex_handle(heh);
......@@ -257,7 +257,7 @@ unsigned int OMPropertyVisualizer<MeshT>::getClosestHalfedgeId(unsigned int _fac
if (temp_dist < dist) {
dist = temp_dist;
closest_h_idx = fh_it.handle().idx();
closest_h_idx = fh_it->idx();
}
}
......@@ -276,9 +276,9 @@ unsigned int OMPropertyVisualizer<MeshT>::getClosestVertexId(unsigned int _face,
ACG::Vec3d vTemp = ACG::Vec3d(0.0, 0.0, 0.0);
typename MeshT::Point p;
for (fv_it = mesh->fv_iter(mesh->face_handle(_face)); fv_it; ++fv_it){
for (fv_it = mesh->fv_iter(mesh->face_handle(_face)); fv_it.is_valid(); ++fv_it){
p = mesh->point( fv_it.handle() );
p = mesh->point( *fv_it );
// Find closest vertex to selection
vTemp = ACG::Vec3d(p[0], p[1], p[2]);
......@@ -286,7 +286,7 @@ unsigned int OMPropertyVisualizer<MeshT>::getClosestVertexId(unsigned int _face,
if (temp_dist < dist) {
dist = temp_dist;
closest_v_idx = fv_it.handle().idx();
closest_v_idx = fv_it->idx();
}
}
......
......@@ -85,7 +85,7 @@ void visualizeVectorAsColorForEntity(MeshT *mesh, const ENTITY_IT e_begin, const
if (!mesh->get_property_handle(prop, propinfo.propName()))
throw VizException("Getting PropHandle from mesh for selected property failed.");
for (ENTITY_IT e_it = e_begin; e_it != e_end; ++e_it) {
typename MeshT::Point v = mesh->property(prop, e_it).normalized() * .5 + typename MeshT::Point(.5, .5, .5);
typename MeshT::Point v = mesh->property(prop, *e_it).normalized() * .5 + typename MeshT::Point(.5, .5, .5);
mesh->set_color(*e_it, typename MeshT::Color(v[0], v[1], v[2], 1.0));
}
}
......@@ -209,7 +209,7 @@ void OMPropertyVisualizerVector<MeshT>::visualizeFacePropOnEdges() {
} else {
color = degen;
}
_mesh->set_color(e_it, color);
_mesh->set_color(*e_it, color);
}
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED | ACG::SceneGraph::DrawModes::EDGES_COLORED);
}
......@@ -233,14 +233,14 @@ template <typename MeshT>
typename MeshT::Point center(0.0, 0.0, 0.0);
int vCount = 0;
for (typename MeshT::FaceVertexIter fv_it(*(OMPropertyVisualizer<MeshT>::mesh),f_it); fv_it; ++fv_it){
for (typename MeshT::FaceVertexIter fv_it(*(OMPropertyVisualizer<MeshT>::mesh),*f_it); fv_it.is_valid(); ++fv_it){
vCount++;
center += OMPropertyVisualizer<MeshT>::mesh->point(fv_it.handle());
center += OMPropertyVisualizer<MeshT>::mesh->point(*fv_it);
}
center /= vCount;
typename MeshT::Point v = (OMPropertyVisualizer<MeshT>::mesh->property(prop, f_it));
typename MeshT::Point v = (OMPropertyVisualizer<MeshT>::mesh->property(prop, *f_it));
if (vectorWidget->normalize->isChecked() && v.sqrnorm() > 1e-12)
v.normalize();
......@@ -270,13 +270,13 @@ void OMPropertyVisualizerVector<MeshT>::visualizeEdgePropAsStrokes()
for (typename MeshT::EdgeIter e_it = OMPropertyVisualizer<MeshT>::mesh->edges_begin() ; e_it != OMPropertyVisualizer<MeshT>::mesh->edges_end() ; ++e_it){
typename MeshT::HalfedgeHandle hh = OMPropertyVisualizer<MeshT>::mesh->halfedge_handle( e_it, 0 );
typename MeshT::HalfedgeHandle hh = OMPropertyVisualizer<MeshT>::mesh->halfedge_handle( *e_it, 0 );
typename MeshT::VertexHandle vh0 = OMPropertyVisualizer<MeshT>::mesh->from_vertex_handle( hh );
typename MeshT::VertexHandle vh1 = OMPropertyVisualizer<MeshT>::mesh->to_vertex_handle( hh );
typename MeshT::Point v1 = OMPropertyVisualizer<MeshT>::mesh->point(vh0) + 0.5 * (OMPropertyVisualizer<MeshT>::mesh->point(vh1) - OMPropertyVisualizer<MeshT>::mesh->point(vh0));
typename MeshT::Point v = OMPropertyVisualizer<MeshT>::mesh->property(prop, e_it);
typename MeshT::Point v = OMPropertyVisualizer<MeshT>::mesh->property(prop, *e_it);
if (vectorWidget->normalize->isChecked() && v.sqrnorm() > 1e-12)
v.normalize();
......@@ -310,7 +310,7 @@ void OMPropertyVisualizerVector<MeshT>::visualizeHalfedgePropAsStrokes()
typename MeshT::VertexHandle vh1 = OMPropertyVisualizer<MeshT>::mesh->to_vertex_handle( *he_it );
typename MeshT::Point v1 = OMPropertyVisualizer<MeshT>::mesh->point(vh0) + 0.5 * (OMPropertyVisualizer<MeshT>::mesh->point(vh1) - OMPropertyVisualizer<MeshT>::mesh->point(vh0));
typename MeshT::Point v = OMPropertyVisualizer<MeshT>::mesh->property(prop, he_it);
typename MeshT::Point v = OMPropertyVisualizer<MeshT>::mesh->property(prop, *he_it);
if (vectorWidget->normalize->isChecked() && v.sqrnorm() > 1e-12)
v.normalize();
......@@ -340,8 +340,8 @@ void OMPropertyVisualizerVector<MeshT>::visualizeVertexPropAsStrokes()
for (typename MeshT::VertexIter v_it = OMPropertyVisualizer<MeshT>::mesh->vertices_begin() ; v_it != OMPropertyVisualizer<MeshT>::mesh->vertices_end() ; ++v_it){
typename MeshT::Point v1 = OMPropertyVisualizer<MeshT>::mesh->point( v_it );
typename MeshT::Point v = OMPropertyVisualizer<MeshT>::mesh->property(prop, v_it);
typename MeshT::Point v1 = OMPropertyVisualizer<MeshT>::mesh->point( *v_it );
typename MeshT::Point v = OMPropertyVisualizer<MeshT>::mesh->property(prop, *v_it);
if (vectorWidget->normalize->isChecked() && v.sqrnorm() > 1e-12)
v.normalize();
......
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