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:
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
{
|
||||
unsigned int count(0);
|
||||
_vhandles.clear();
|
||||
for (typename Mesh::CFVIter fv_it=mesh_.cfv_iter(_fh); fv_it; ++fv_it)
|
||||
for (typename Mesh::CFVIter fv_it=mesh_.cfv_iter(_fh); fv_it.is_valid(); ++fv_it)
|
||||
{
|
||||
_vhandles.push_back(fv_it.handle());
|
||||
++count;
|
||||
|
||||
@@ -401,8 +401,8 @@ bool PolyConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
|
||||
for (vv_it = vv_iter(v0); vv_it; ++vv_it)
|
||||
{
|
||||
if (status(vv_it).tagged() &&
|
||||
!(vv_it.handle() == v_01_n && v0v1_triangle) &&
|
||||
!(vv_it.handle() == v_10_n && v1v0_triangle)
|
||||
!(*vv_it == v_01_n && v0v1_triangle) &&
|
||||
!(*vv_it == v_10_n && v1v0_triangle)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -106,7 +106,7 @@ calc_face_normal(FaceHandle _fh) const
|
||||
|
||||
//calculate area-weighted average normal of polygon's ears
|
||||
Normal n(0,0,0);
|
||||
for(; fv_it; ++fv_it)
|
||||
for(; fv_it.is_valid(); ++fv_it)
|
||||
{
|
||||
p2 = this->point(fv_it);
|
||||
n += vector_cast<Normal>(calc_face_normal(p0, p1, p2));
|
||||
|
||||
@@ -160,7 +160,7 @@ bool TriConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
|
||||
status(vv_it).set_tagged(true);
|
||||
|
||||
for (vv_it = vv_iter(v0); vv_it; ++vv_it)
|
||||
if (status(vv_it).tagged() && vv_it.handle() != vl && vv_it.handle() != vr)
|
||||
if (status(vv_it).tagged() && *vv_it != vl && *vv_it != vr)
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
|
||||
|
||||
for (vv_it=mesh.vv_iter(v_it.handle()); vv_it; ++vv_it)
|
||||
{
|
||||
cog += mesh.point( vv_it.handle() );
|
||||
cog += mesh.point( *vv_it );
|
||||
++valence;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ fill_props( Mesh& _m, OpenMesh::VPropHandleT<float> _ph, bool _check=false)
|
||||
for(typename Mesh::VertexIter it=_m.vertices_begin();
|
||||
it != _m.vertices_end(); ++it)
|
||||
{
|
||||
v = a[it.handle().idx()%9];
|
||||
v = a[it->idx()%9];
|
||||
if ( _check && !(_m.property( _ph, it ) == v) )
|
||||
return false;
|
||||
else
|
||||
@@ -34,7 +34,7 @@ fill_props( Mesh& _m, OpenMesh::EPropHandleT<bool> _ph, bool _check=false )
|
||||
for( typename Mesh::EdgeIter it=_m.edges_begin();
|
||||
it != _m.edges_end(); ++it)
|
||||
{
|
||||
n = it.handle().idx();
|
||||
n = it->idx();
|
||||
v = ((n&(n-1))==0); // true for 0,1,2,4,8,..
|
||||
|
||||
if (_check && _m.property( _ph, it ) != v)
|
||||
@@ -62,7 +62,7 @@ fill_props(Mesh& _m, OpenMesh::FPropHandleT<std::string> _ph, bool _check=false)
|
||||
for( typename Mesh::FaceIter it=_m.faces_begin();
|
||||
it != _m.faces_end(); ++it)
|
||||
{
|
||||
n = it.handle().idx();
|
||||
n = it->idx();
|
||||
_m.property( _ph, it ) = int2roman(++n);
|
||||
}
|
||||
return true;
|
||||
@@ -85,9 +85,9 @@ fill_props( Mesh& _m, OpenMesh::HPropHandleT<T> _ph, bool _check=false)
|
||||
for( typename Mesh::HalfedgeIter it=_m.halfedges_begin();
|
||||
it != _m.halfedges_end(); ++it)
|
||||
{
|
||||
n = it.handle().idx();
|
||||
n = it->idx();
|
||||
|
||||
// v = it.handle().idx()+1; // ival
|
||||
// v = it->idx()+1; // ival
|
||||
// v = values[n%9]; // dval
|
||||
v = ((n&(n-1))==0); // bval
|
||||
v.vec4fval[0] = a[n%9];
|
||||
@@ -110,7 +110,7 @@ fill_props( Mesh& _m, OpenMesh::MPropHandleT<T> _ph, bool _check=false)
|
||||
size_t idx;
|
||||
for( typename Mesh::FaceIter it=_m.faces_begin(); it != _m.faces_end(); ++it)
|
||||
{
|
||||
idx = it.handle().idx();
|
||||
idx = it->idx();
|
||||
if ( _check && _m.property( _ph )[int2roman(idx+1)] != idx )
|
||||
return false;
|
||||
else
|
||||
|
||||
@@ -102,7 +102,7 @@ void DecimaterT<Mesh>::heap_vertex(VertexHandle _vh) {
|
||||
// find best target in one ring
|
||||
typename Mesh::VertexOHalfedgeIter voh_it(mesh_, _vh);
|
||||
for (; voh_it; ++voh_it) {
|
||||
heh = voh_it.handle();
|
||||
heh = *voh_it;
|
||||
CollapseInfo ci(mesh_, heh);
|
||||
|
||||
if (this->is_collapse_legal(ci)) {
|
||||
@@ -190,7 +190,7 @@ size_t DecimaterT<Mesh>::decimate(size_t _n_collapses) {
|
||||
vv_it = mesh_.vv_iter(ci.v0);
|
||||
support.clear();
|
||||
for (; vv_it; ++vv_it)
|
||||
support.push_back(vv_it.handle());
|
||||
support.push_back(*vv_it);
|
||||
|
||||
// perform collapse
|
||||
mesh_.collapse(v0v1);
|
||||
@@ -276,7 +276,7 @@ size_t DecimaterT<Mesh>::decimate_to_faces(size_t _nv, size_t _nf) {
|
||||
vv_it = mesh_.vv_iter(ci.v0);
|
||||
support.clear();
|
||||
for (; vv_it; ++vv_it)
|
||||
support.push_back(vv_it.handle());
|
||||
support.push_back(*vv_it);
|
||||
|
||||
// adjust complexity in advance (need boundary status)
|
||||
++n_collapses;
|
||||
|
||||
@@ -128,14 +128,14 @@ class ModRoundnessT : public ModBaseT<MeshT>
|
||||
if ( min_r_ < 0.0 ) // continues mode
|
||||
{
|
||||
C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(voh_it)));
|
||||
fhC = Base::mesh().face_handle( voh_it.handle() );
|
||||
fhC = Base::mesh().face_handle( *voh_it );
|
||||
|
||||
for (++voh_it; voh_it; ++voh_it)
|
||||
{
|
||||
B = C;
|
||||
fhB = fhC;
|
||||
C = vector_cast<Vec3f>(Base::mesh().point(Base::mesh().to_vertex_handle(voh_it)));
|
||||
fhC = Base::mesh().face_handle( voh_it.handle() );
|
||||
fhC = Base::mesh().face_handle( *voh_it );
|
||||
|
||||
if ( fhB == _ci.fl || fhB == _ci.fr )
|
||||
continue;
|
||||
@@ -151,14 +151,14 @@ class ModRoundnessT : public ModBaseT<MeshT>
|
||||
else // binary mode
|
||||
{
|
||||
C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(voh_it)));
|
||||
fhC = Base::mesh().face_handle( voh_it.handle() );
|
||||
fhC = Base::mesh().face_handle( *voh_it );
|
||||
|
||||
for (++voh_it; voh_it && (priority==Base::LEGAL_COLLAPSE); ++voh_it)
|
||||
{
|
||||
B = C;
|
||||
fhB = fhC;
|
||||
C = vector_cast<Vec3f>(Base::mesh().point(Base::mesh().to_vertex_handle(voh_it)));
|
||||
fhC = Base::mesh().face_handle( voh_it.handle() );
|
||||
fhC = Base::mesh().face_handle( *voh_it );
|
||||
|
||||
if ( fhB == _ci.fl || fhB == _ci.fr )
|
||||
continue;
|
||||
|
||||
@@ -175,11 +175,11 @@ set_active_vertices()
|
||||
for ( ; voh_it ; ++voh_it ) {
|
||||
|
||||
// If the edge is a feature edge, skip the current vertex while smoothing
|
||||
if ( mesh_.status(mesh_.edge_handle(voh_it.handle())).feature() )
|
||||
if ( mesh_.status(mesh_.edge_handle(*voh_it)).feature() )
|
||||
active = false;
|
||||
|
||||
typename Mesh::FaceHandle fh1 = mesh_.face_handle(voh_it.handle() );
|
||||
typename Mesh::FaceHandle fh2 = mesh_.face_handle(mesh_.opposite_halfedge_handle(voh_it.handle() ) );
|
||||
typename Mesh::FaceHandle fh1 = mesh_.face_handle(*voh_it );
|
||||
typename Mesh::FaceHandle fh2 = mesh_.face_handle(mesh_.opposite_halfedge_handle(*voh_it ) );
|
||||
|
||||
// If one of the faces is a feature, lock current vertex
|
||||
if ( fh1.is_valid() && mesh_.status( fh1 ).feature() )
|
||||
|
||||
@@ -64,7 +64,7 @@ void smooth_mesh_property(unsigned int _n_iters, _Mesh& _m, _PropertyHandle _pph
|
||||
{
|
||||
unsigned int valence = 0;
|
||||
|
||||
Value& temp_value = temp_values[cv_it.handle().idx()];
|
||||
Value& temp_value = temp_values[cv_it->idx()];
|
||||
|
||||
temp_value.vectorize(0);
|
||||
|
||||
@@ -87,7 +87,7 @@ void smooth_mesh_property(unsigned int _n_iters, _Mesh& _m, _PropertyHandle _pph
|
||||
for ( typename _Mesh::ConstVertexIter cv_it = _m.vertices_begin();
|
||||
cv_it != _m.vertices_end(); ++cv_it)
|
||||
{
|
||||
_m.property(_pph,cv_it) = temp_values[cv_it.handle().idx()];
|
||||
_m.property(_pph,cv_it) = temp_values[cv_it->idx()];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
prev_rule()->raise(eh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (fv_it = mesh_.fv_iter(_fh); fv_it; ++fv_it) {
|
||||
for (fv_it = mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) {
|
||||
|
||||
vh = fv_it.handle();
|
||||
prev_rule()->raise(vh, _target_state - 1);
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
{
|
||||
|
||||
for (voh_it = mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
halfedge_vector.push_back(voh_it.handle());
|
||||
halfedge_vector.push_back(*voh_it);
|
||||
}
|
||||
|
||||
while ( !halfedge_vector.empty() ) {
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
}
|
||||
|
||||
for (voh_it = mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
halfedge_vector.push_back(voh_it.handle());
|
||||
halfedge_vector.push_back(*voh_it);
|
||||
}
|
||||
|
||||
while ( !halfedge_vector.empty() ) {
|
||||
|
||||
@@ -110,7 +110,7 @@ Tvv3<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
int valence(0);
|
||||
|
||||
// raise all adjacent vertices to level x-1
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it; ++fv_it) {
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) {
|
||||
|
||||
vertex_vector.push_back(fv_it.handle());
|
||||
}
|
||||
@@ -140,7 +140,7 @@ Tvv3<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
// calculate display position for new vertex
|
||||
for (vv_it = Base::mesh_.vv_iter(vh); vv_it; ++vv_it)
|
||||
{
|
||||
position += Base::mesh_.point(vv_it.handle());
|
||||
position += Base::mesh_.point(*vv_it);
|
||||
++valence;
|
||||
}
|
||||
|
||||
@@ -156,24 +156,24 @@ Tvv3<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
// check for edge flipping
|
||||
for (voh_it = Base::mesh_.voh_iter(vh); voh_it; ++voh_it) {
|
||||
|
||||
if (Base::mesh_.FH(voh_it.handle()).is_valid()) {
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
MOBJ(Base::mesh_.FH(voh_it.handle())).set_state(_target_state);
|
||||
MOBJ(Base::mesh_.FH(voh_it.handle())).set_not_final();
|
||||
MOBJ(Base::mesh_.FH(voh_it.handle())).set_position(_target_state - 1, face_position);
|
||||
MOBJ(Base::mesh_.FH(*voh_it)).set_state(_target_state);
|
||||
MOBJ(Base::mesh_.FH(*voh_it)).set_not_final();
|
||||
MOBJ(Base::mesh_.FH(*voh_it)).set_position(_target_state - 1, face_position);
|
||||
|
||||
|
||||
for (state_t j = 0; j < _target_state; ++j) {
|
||||
MOBJ(Base::mesh_.FH(voh_it.handle())).set_position(j, MOBJ(_fh).position(j));
|
||||
MOBJ(Base::mesh_.FH(*voh_it)).set_position(j, MOBJ(_fh).position(j));
|
||||
}
|
||||
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))).is_valid()) {
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))).is_valid()) {
|
||||
|
||||
if (MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle())))).state() == _target_state) {
|
||||
if (MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it)))).state() == _target_state) {
|
||||
|
||||
if (Base::mesh_.is_flip_ok(Base::mesh_.EH(Base::mesh_.NHEH(voh_it.handle())))) {
|
||||
if (Base::mesh_.is_flip_ok(Base::mesh_.EH(Base::mesh_.NHEH(*voh_it)))) {
|
||||
|
||||
edge_vector.push_back(Base::mesh_.EH(Base::mesh_.NHEH(voh_it.handle())));
|
||||
edge_vector.push_back(Base::mesh_.EH(Base::mesh_.NHEH(*voh_it)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,7 +346,7 @@ Tvv4<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
std::vector<typename M::HalfedgeHandle> halfedge_vector;
|
||||
|
||||
// raise all adjacent vertices to level x-1
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it; ++fv_it) {
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) {
|
||||
|
||||
vertex_vector.push_back(fv_it.handle());
|
||||
}
|
||||
@@ -824,7 +824,7 @@ void VF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
|
||||
if (_target_state > 1) {
|
||||
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it; ++fv_it) {
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) {
|
||||
|
||||
vertex_vector.push_back(fv_it.handle());
|
||||
}
|
||||
@@ -842,7 +842,7 @@ void VF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
typename M::Point position(0.0, 0.0, 0.0);
|
||||
int valence(0);
|
||||
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it; ++fv_it) {
|
||||
for (fv_it = Base::mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) {
|
||||
|
||||
++valence;
|
||||
position += Base::mesh_.data(fv_it).position(_target_state - 1);
|
||||
@@ -1084,13 +1084,13 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
|
||||
if (Base::mesh_.FH(voh_it.handle()).is_valid()) {
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(voh_it.handle()));
|
||||
face_vector.push_back(Base::mesh_.FH(*voh_it));
|
||||
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))).is_valid()) {
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))).is_valid()) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))));
|
||||
face_vector.push_back(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1105,13 +1105,13 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
|
||||
if (Base::mesh_.FH(voh_it.handle()).is_valid()) {
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(voh_it.handle()));
|
||||
face_vector.push_back(Base::mesh_.FH(*voh_it));
|
||||
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))).is_valid()) {
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))).is_valid()) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))));
|
||||
face_vector.push_back(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1127,13 +1127,13 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
|
||||
if (Base::mesh_.FH(voh_it.handle()).is_valid()) {
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(voh_it.handle()));
|
||||
face_vector.push_back(Base::mesh_.FH(*voh_it));
|
||||
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))).is_valid()) {
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))).is_valid()) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))));
|
||||
face_vector.push_back(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1170,25 +1170,25 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
|
||||
fh = Base::mesh_.FH(voh_it.handle());
|
||||
fh = Base::mesh_.FH(*voh_it);
|
||||
if (fh.is_valid())
|
||||
Base::prev_rule()->raise(fh, _target_state - 1);
|
||||
|
||||
fh = Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle())));
|
||||
fh = Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it)));
|
||||
if (fh.is_valid())
|
||||
Base::prev_rule()->raise(fh, _target_state - 1);
|
||||
|
||||
if (Base::mesh_.FH(voh_it.handle()).is_valid()) {
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle()))).is_valid()) {
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it))).is_valid()) {
|
||||
|
||||
position += MOBJ(Base::mesh_.FH(voh_it.handle())).position(_target_state - 1) * c;
|
||||
position += MOBJ(Base::mesh_.FH(*voh_it)).position(_target_state - 1) * c;
|
||||
|
||||
position += MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(voh_it.handle())))).position(_target_state - 1) * (1.0 - c);
|
||||
position += MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it)))).position(_target_state - 1) * (1.0 - c);
|
||||
}
|
||||
else {
|
||||
|
||||
position += MOBJ(Base::mesh_.FH(voh_it.handle())).position(_target_state - 1);
|
||||
position += MOBJ(Base::mesh_.FH(*voh_it)).position(_target_state - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1256,7 +1256,7 @@ void VV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(vv_it.handle());
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
|
||||
while (!vertex_vector.empty()) {
|
||||
@@ -1269,7 +1269,7 @@ void VV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(vv_it.handle());
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
|
||||
while (!vertex_vector.empty()) {
|
||||
@@ -1326,7 +1326,7 @@ void VVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(vv_it.handle());
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
|
||||
while (!vertex_vector.empty()) {
|
||||
@@ -1339,7 +1339,7 @@ void VVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(vv_it.handle());
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
|
||||
while (!vertex_vector.empty()) {
|
||||
@@ -1673,7 +1673,7 @@ void EVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(voh_it.handle()));
|
||||
face_vector.push_back(Base::mesh_.FH(*voh_it));
|
||||
}
|
||||
|
||||
while (!face_vector.empty()) {
|
||||
@@ -1687,9 +1687,9 @@ void EVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
|
||||
edge_vector.push_back(Base::mesh_.EH(voh_it.handle()));
|
||||
edge_vector.push_back(Base::mesh_.EH(*voh_it));
|
||||
|
||||
edge_vector.push_back(Base::mesh_.EH(Base::mesh_.NHEH(voh_it.handle())));
|
||||
edge_vector.push_back(Base::mesh_.EH(Base::mesh_.NHEH(*voh_it)));
|
||||
}
|
||||
|
||||
while (!edge_vector.empty()) {
|
||||
@@ -1714,18 +1714,18 @@ void EVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it)
|
||||
{
|
||||
if (MOBJ(Base::mesh_.EH(voh_it.handle())).final())
|
||||
if (MOBJ(Base::mesh_.EH(*voh_it)).final())
|
||||
{
|
||||
position += MOBJ(Base::mesh_.EH(voh_it.handle())).position(_target_state-1)*c;
|
||||
position += MOBJ(Base::mesh_.EH(*voh_it)).position(_target_state-1)*c;
|
||||
|
||||
if ( Base::mesh_.FH(voh_it.handle()).is_valid() &&
|
||||
MOBJ(Base::mesh_.EH(Base::mesh_.NHEH(voh_it.handle()))).final() &&
|
||||
MOBJ(Base::mesh_.EH(Base::mesh_.NHEH(voh_it.handle()))).position(_target_state - 1) != zero_point)
|
||||
if ( Base::mesh_.FH(*voh_it).is_valid() &&
|
||||
MOBJ(Base::mesh_.EH(Base::mesh_.NHEH(*voh_it))).final() &&
|
||||
MOBJ(Base::mesh_.EH(Base::mesh_.NHEH(*voh_it))).position(_target_state - 1) != zero_point)
|
||||
{
|
||||
position += MOBJ(Base::mesh_.EH(Base::mesh_.NHEH(voh_it.handle()))).position(_target_state-1) * (1.0-c);
|
||||
position += MOBJ(Base::mesh_.EH(Base::mesh_.NHEH(*voh_it))).position(_target_state-1) * (1.0-c);
|
||||
}
|
||||
else {
|
||||
position += MOBJ(Base::mesh_.EH(voh_it.handle())).position(_target_state - 1) * (1.0 - c);
|
||||
position += MOBJ(Base::mesh_.EH(*voh_it)).position(_target_state - 1) * (1.0 - c);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -297,7 +297,7 @@ void CompositeT<MeshType,RealType>::VF()
|
||||
valence = 0;
|
||||
cog = zero_point;
|
||||
|
||||
for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it; ++fv_it) {
|
||||
for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it.is_valid(); ++fv_it) {
|
||||
cog += mesh_.data(fv_it).position();
|
||||
++valence;
|
||||
}
|
||||
@@ -352,7 +352,7 @@ void CompositeT<MeshType,RealType>::VFa(Coeff& _coeff)
|
||||
|
||||
cog = zero_point;
|
||||
|
||||
for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it; ++fv_it) {
|
||||
for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it.is_valid(); ++fv_it) {
|
||||
if (fv_it.handle() == vh[i]) {
|
||||
cog += fv_it->position() * alpha;
|
||||
} else {
|
||||
@@ -407,7 +407,7 @@ void CompositeT<MeshType,RealType>::VFa(scalar_t _alpha)
|
||||
|
||||
cog = zero_point;
|
||||
|
||||
for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it; ++fv_it) {
|
||||
for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it.is_valid(); ++fv_it) {
|
||||
if (fv_it.handle() == vh[i]) {
|
||||
cog += fv_it->position() * _alpha;
|
||||
} else {
|
||||
@@ -586,13 +586,13 @@ void CompositeT<MeshType,RealType>::FVc(Coeff& _coeff)
|
||||
|
||||
for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) {
|
||||
|
||||
if (mesh_.face_handle(voh_it.handle()).is_valid()) {
|
||||
if (mesh_.face_handle(*voh_it).is_valid()) {
|
||||
|
||||
if (mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(voh_it.handle()))).is_valid()) {
|
||||
cog += mesh_.data(mesh_.face_handle(voh_it.handle())).position() * c;
|
||||
cog += mesh_.data(mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(voh_it.handle())))).position() * (1.0 - c);
|
||||
if (mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(*voh_it))).is_valid()) {
|
||||
cog += mesh_.data(mesh_.face_handle(*voh_it)).position() * c;
|
||||
cog += mesh_.data(mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(*voh_it)))).position() * (1.0 - c);
|
||||
} else {
|
||||
cog += mesh_.data(mesh_.face_handle(voh_it.handle())).position();
|
||||
cog += mesh_.data(mesh_.face_handle(*voh_it)).position();
|
||||
}
|
||||
} else {
|
||||
--valence;
|
||||
@@ -629,13 +629,13 @@ void CompositeT<MeshType,RealType>::FVc(scalar_t _c)
|
||||
|
||||
for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) {
|
||||
|
||||
if (mesh_.face_handle(voh_it.handle()).is_valid()) {
|
||||
if (mesh_.face_handle(*voh_it).is_valid()) {
|
||||
|
||||
if (mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(voh_it.handle()))).is_valid()) {
|
||||
cog += mesh_.deref(mesh_.face_handle(voh_it.handle())).position() * _c;
|
||||
cog += mesh_.deref(mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(voh_it.handle())))).position() * (1.0 - _c);
|
||||
if (mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(*voh_it))).is_valid()) {
|
||||
cog += mesh_.deref(mesh_.face_handle(*voh_it)).position() * _c;
|
||||
cog += mesh_.deref(mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(*voh_it)))).position() * (1.0 - _c);
|
||||
} else {
|
||||
cog += mesh_.deref(mesh_.face_handle(voh_it.handle())).position();
|
||||
cog += mesh_.deref(mesh_.face_handle(*voh_it)).position();
|
||||
}
|
||||
} else {
|
||||
--valence;
|
||||
@@ -897,8 +897,8 @@ void CompositeT<MeshType,RealType>::EVc(Coeff& _coeff)
|
||||
c = _coeff(valence);
|
||||
|
||||
for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) {
|
||||
cog += mesh_.data(mesh_.edge_handle(voh_it.handle())).position() * c;
|
||||
cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(voh_it.handle()))).position() * (1.0 - c);
|
||||
cog += mesh_.data(mesh_.edge_handle(*voh_it)).position() * c;
|
||||
cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(*voh_it))).position() * (1.0 - c);
|
||||
}
|
||||
|
||||
cog /= valence;
|
||||
@@ -927,8 +927,8 @@ void CompositeT<MeshType,RealType>::EVc(scalar_t _c)
|
||||
}
|
||||
|
||||
for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) {
|
||||
cog += mesh_.data(mesh_.edge_handle(voh_it.handle())).position() * _c;
|
||||
cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(voh_it.handle()))).position() * (1.0 - _c);
|
||||
cog += mesh_.data(mesh_.edge_handle(*voh_it)).position() * _c;
|
||||
cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(*voh_it))).position() * (1.0 - _c);
|
||||
}
|
||||
|
||||
cog /= valence;
|
||||
|
||||
@@ -183,7 +183,7 @@ protected:
|
||||
_m.split(a.first,newVertex);
|
||||
|
||||
for ( typename MeshType::VertexOHalfedgeIter voh_it(_m,newVertex); voh_it; ++voh_it) {
|
||||
typename MeshType::EdgeHandle eh = _m.edge_handle(voh_it.handle());
|
||||
typename MeshType::EdgeHandle eh = _m.edge_handle(*voh_it);
|
||||
const typename MeshType::Point to = _m.point(_m.to_vertex_handle(voh_it));
|
||||
const typename MeshType::Point from = _m.point(_m.from_vertex_handle(voh_it));
|
||||
real_t length = (to - from).sqrnorm();
|
||||
|
||||
Reference in New Issue
Block a user