First set of changes to the new circulators

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@898 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2013-08-07 09:40:10 +00:00
parent 1c8d4fb59b
commit afda61f067
23 changed files with 148 additions and 148 deletions

View File

@@ -164,7 +164,7 @@ MeshViewerWidgetT<M>::open_mesh(const char* _filename, IO::Options _opt)
for (;f_it != mesh_.faces_end(); ++f_it)
{
typename Mesh::Point v(0,0,0);
for( fv_it=mesh_.fv_iter(f_it); fv_it; ++fv_it)
for( fv_it=mesh_.fv_iter(f_it); fv_it.is_valid(); ++fv_it)
v += OpenMesh::vector_cast<typename Mesh::Normal>(mesh_.point(fv_it));
v *= 1.0f/3.0f;
mesh_.property( fp_normal_base_, f_it ) = v;
@@ -372,11 +372,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
for (; fIt!=fEnd; ++fIt)
{
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();
@@ -408,11 +408,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
for (; fIt!=fEnd; ++fIt)
{
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();
@@ -436,11 +436,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
glColor( fIt.handle() );
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();
@@ -463,11 +463,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
glMaterial( fIt.handle() );
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();

View File

@@ -198,7 +198,7 @@ drawFaces(bool _send_normals, OpenMesh::GenProg::Bool2Type<false>)
{
glBegin(GL_POLYGON);
glNormal(mesh_->normal(f_it));
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it; ++fv_it)
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it.is_valid() ++fv_it)
glVertex(mesh_->point(fv_it));
glEnd();
}
@@ -208,7 +208,7 @@ drawFaces(bool _send_normals, OpenMesh::GenProg::Bool2Type<false>)
for (; f_it!=f_end; ++f_it)
{
glBegin(GL_POLYGON);
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it; ++fv_it)
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it.is_valid() ++fv_it)
glVertex(mesh_->point(fv_it));
glEnd();
}
@@ -290,7 +290,7 @@ genPrimitives(SoAction* _action, OpenMesh::GenProg::Bool2Type<false>)
pv.setNormal(sbvec3f(mesh_->normal(f_it)));
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it; ++fv_it)
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it.is_valid() ++fv_it)
{
pv.setPoint(sbvec3f(mesh_->point(fv_it)));
shapeVertex(&pv);

View File

@@ -327,11 +327,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
for (; fIt!=fEnd; ++fIt)
{
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();
@@ -363,11 +363,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
for (; fIt!=fEnd; ++fIt)
{
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();
@@ -391,11 +391,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
glColor( fIt.handle() );
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();

View File

@@ -380,18 +380,18 @@ get_active_cuts(const VHierarchyNodeHandle _node_handle, MyMesh::VertexHandle &v
for (vv_it=mesh_.vv_iter(vhierarchy_.vertex_handle(_node_handle)); vv_it; ++vv_it)
{
nnode_handle = mesh_.data(vv_it.handle()).vhierarchy_node_handle();
nnode_handle = mesh_.data(*vv_it).vhierarchy_node_handle();
nnode_index = vhierarchy_.node_index(nnode_handle);
if (vl == MyMesh::InvalidVertexHandle && vhierarchy_.is_ancestor(nnode_index, fund_lcut_index) == true)
vl = vv_it.handle();
vl = *vv_it;
if (vr == MyMesh::InvalidVertexHandle && vhierarchy_.is_ancestor(nnode_index, fund_rcut_index) == true)
vr = vv_it.handle();
vr = *vv_it;
/*if (vl == MyMesh::InvalidVertexHandle && nnode_index.is_ancestor_index(fund_lcut_index) == true)
vl = vv_it.handle();
vl = *vv_it;
if (vr == MyMesh::InvalidVertexHandle && nnode_index.is_ancestor_index(fund_rcut_index) == true)
vr = vv_it.handle();*/
vr = *vv_it;*/
if (vl != MyMesh::InvalidVertexHandle && vr != MyMesh::InvalidVertexHandle)
break;

View File

@@ -326,11 +326,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
for (; fIt!=fEnd; ++fIt)
{
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();
@@ -362,11 +362,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
for (; fIt!=fEnd; ++fIt)
{
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();
@@ -390,11 +390,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
glColor( fIt.handle() );
fvIt = mesh_.cfv_iter(fIt.handle());
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
++fvIt;
glArrayElement(fvIt.handle().idx());
glArrayElement(fvIt->idx());
}
glEnd();

View File

@@ -379,18 +379,18 @@ get_active_cuts(const VHierarchyNodeHandle _node_handle, MyMesh::VertexHandle &v
for (vv_it=mesh_.vv_iter(vhierarchy_.vertex_handle(_node_handle)); vv_it; ++vv_it)
{
nnode_handle = mesh_.data(vv_it.handle()).vhierarchy_node_handle();
nnode_handle = mesh_.data(*vv_it).vhierarchy_node_handle();
nnode_index = vhierarchy_.node_index(nnode_handle);
if (vl == MyMesh::InvalidVertexHandle && vhierarchy_.is_ancestor(nnode_index, fund_lcut_index) == true)
vl = vv_it.handle();
vl = *vv_it;
if (vr == MyMesh::InvalidVertexHandle && vhierarchy_.is_ancestor(nnode_index, fund_rcut_index) == true)
vr = vv_it.handle();
vr = *vv_it;
/*if (vl == MyMesh::InvalidVertexHandle && nnode_index.is_ancestor_index(fund_lcut_index) == true)
vl = vv_it.handle();
vl = *vv_it;
if (vr == MyMesh::InvalidVertexHandle && nnode_index.is_ancestor_index(fund_rcut_index) == true)
vr = vv_it.handle();*/
vr = *vv_it;*/
if (vl != MyMesh::InvalidVertexHandle && vr != MyMesh::InvalidVertexHandle)
break;

View File

@@ -293,21 +293,21 @@ get_active_cuts(const VHierarchyNodeHandle _node_handle,
for (vv_it=mesh_.vv_iter(vhierarchy_.vertex_handle(_node_handle));
vv_it; ++vv_it)
{
nnode_handle = mesh_.data(vv_it.handle()).vhierarchy_node_handle();
nnode_handle = mesh_.data(*vv_it).vhierarchy_node_handle();
nnode_index = vhierarchy_.node_index(nnode_handle);
if (vl == VDPMMesh::InvalidVertexHandle &&
vhierarchy_.is_ancestor(nnode_index, fund_lcut_index) == true)
vl = vv_it.handle();
vl = *vv_it;
if (vr == VDPMMesh::InvalidVertexHandle &&
vhierarchy_.is_ancestor(nnode_index, fund_rcut_index) == true)
vr = vv_it.handle();
vr = *vv_it;
/*if (vl == VDPMMesh::InvalidVertexHandle && nnode_index.is_ancestor_index(fund_lcut_index) == true)
vl = vv_it.handle();
vl = *vv_it;
if (vr == VDPMMesh::InvalidVertexHandle && nnode_index.is_ancestor_index(fund_rcut_index) == true)
vr = vv_it.handle();*/
vr = *vv_it;*/
if (vl != VDPMMesh::InvalidVertexHandle &&
vr != VDPMMesh::InvalidVertexHandle)