Next changeset
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@907 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -349,8 +349,8 @@ public:
|
||||
// Mark edges of failed face as non-two-manifold
|
||||
if (mesh_.has_edge_status()) {
|
||||
typename Mesh::FaceEdgeIter fe_it = mesh_.fe_iter(fh);
|
||||
for(; fe_it; ++fe_it) {
|
||||
mesh_.status(fe_it).set_fixed_nonmanifold(true);
|
||||
for(; fe_it.is_valid(); ++fe_it) {
|
||||
mesh_.status(*fe_it).set_fixed_nonmanifold(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ PolyConnectivity::find_halfedge(VertexHandle _start_vh, VertexHandle _end_vh ) c
|
||||
{
|
||||
assert(_start_vh.is_valid() && _end_vh.is_valid());
|
||||
|
||||
for (ConstVertexVertexIter vvIt=cvv_iter(_start_vh); vvIt; ++vvIt)
|
||||
if (vvIt.handle() == _end_vh)
|
||||
for (ConstVertexVertexIter vvIt=cvv_iter(_start_vh); vvIt.is_valid(); ++vvIt)
|
||||
if (*vvIt == _end_vh)
|
||||
return vvIt.current_halfedge_handle();
|
||||
|
||||
return InvalidHalfedgeHandle;
|
||||
@@ -67,14 +67,14 @@ PolyConnectivity::find_halfedge(VertexHandle _start_vh, VertexHandle _end_vh ) c
|
||||
|
||||
bool PolyConnectivity::is_boundary(FaceHandle _fh, bool _check_vertex) const
|
||||
{
|
||||
for (ConstFaceEdgeIter cfeit = cfe_iter( _fh ); cfeit; ++cfeit)
|
||||
if (is_boundary( cfeit.handle() ) )
|
||||
for (ConstFaceEdgeIter cfeit = cfe_iter( _fh ); cfeit.is_valid(); ++cfeit)
|
||||
if (is_boundary( *cfeit ) )
|
||||
return true;
|
||||
|
||||
if (_check_vertex)
|
||||
{
|
||||
for (ConstFaceVertexIter cfvit = cfv_iter( _fh ); cfvit; ++cfvit)
|
||||
if (is_boundary( cfvit.handle() ) )
|
||||
for (ConstFaceVertexIter cfvit = cfv_iter( _fh ); cfvit.is_valid(); ++cfvit)
|
||||
if (is_boundary( *cfvit ) )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -89,9 +89,9 @@ bool PolyConnectivity::is_manifold(VertexHandle _vh) const
|
||||
boundary halfedge, the vertex is non-manifold. */
|
||||
|
||||
ConstVertexOHalfedgeIter vh_it(*this, _vh);
|
||||
if (vh_it)
|
||||
for (++vh_it; vh_it; ++vh_it)
|
||||
if (is_boundary(vh_it.handle()))
|
||||
if (vh_it.is_valid())
|
||||
for (++vh_it; vh_it.is_valid(); ++vh_it)
|
||||
if (is_boundary(*vh_it))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -99,11 +99,11 @@ bool PolyConnectivity::is_manifold(VertexHandle _vh) const
|
||||
//-----------------------------------------------------------------------------
|
||||
void PolyConnectivity::adjust_outgoing_halfedge(VertexHandle _vh)
|
||||
{
|
||||
for (ConstVertexOHalfedgeIter vh_it=cvoh_iter(_vh); vh_it; ++vh_it)
|
||||
for (ConstVertexOHalfedgeIter vh_it=cvoh_iter(_vh); vh_it.is_valid(); ++vh_it)
|
||||
{
|
||||
if (is_boundary(vh_it.handle()))
|
||||
if (is_boundary(*vh_it))
|
||||
{
|
||||
set_halfedge_handle(_vh, vh_it.handle());
|
||||
set_halfedge_handle(_vh, *vh_it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -388,19 +388,19 @@ bool PolyConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
|
||||
|
||||
VertexVertexIter vv_it;
|
||||
// test intersection of the one-rings of v0 and v1
|
||||
for (vv_it = vv_iter(v0); vv_it; ++vv_it)
|
||||
for (vv_it = vv_iter(v0); vv_it.is_valid(); ++vv_it)
|
||||
{
|
||||
status(vv_it).set_tagged(false);
|
||||
status(*vv_it).set_tagged(false);
|
||||
}
|
||||
|
||||
for (vv_it = vv_iter(v1); vv_it; ++vv_it)
|
||||
for (vv_it = vv_iter(v1); vv_it.is_valid(); ++vv_it)
|
||||
{
|
||||
status(vv_it).set_tagged(true);
|
||||
status(*vv_it).set_tagged(true);
|
||||
}
|
||||
|
||||
for (vv_it = vv_iter(v0); vv_it; ++vv_it)
|
||||
for (vv_it = vv_iter(v0); vv_it.is_valid(); ++vv_it)
|
||||
{
|
||||
if (status(vv_it).tagged() &&
|
||||
if (status(*vv_it).tagged() &&
|
||||
!(*vv_it == v_01_n && v0v1_triangle) &&
|
||||
!(*vv_it == v_10_n && v1v0_triangle)
|
||||
)
|
||||
@@ -440,7 +440,7 @@ bool PolyConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
|
||||
}
|
||||
}
|
||||
|
||||
if (status(vv_it).tagged() && v_01_n == v_10_n && v0v1_triangle && v1v0_triangle)
|
||||
if (status(*vv_it).tagged() && v_01_n == v_10_n && v0v1_triangle && v1v0_triangle)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -456,8 +456,8 @@ void PolyConnectivity::delete_vertex(VertexHandle _vh, bool _delete_isolated_ver
|
||||
// store incident faces
|
||||
std::vector<FaceHandle> face_handles;
|
||||
face_handles.reserve(8);
|
||||
for (VFIter vf_it(vf_iter(_vh)); vf_it; ++vf_it)
|
||||
face_handles.push_back(vf_it.handle());
|
||||
for (VFIter vf_it(vf_iter(_vh)); vf_it.is_valid(); ++vf_it)
|
||||
face_handles.push_back(*vf_it);
|
||||
|
||||
|
||||
// delete collected faces
|
||||
@@ -524,9 +524,9 @@ void PolyConnectivity::delete_face(FaceHandle _fh, bool _delete_isolated_vertice
|
||||
// 2) collect all boundary halfedges, set them deleted
|
||||
// 3) store vertex handles
|
||||
HalfedgeHandle hh;
|
||||
for (FaceHalfedgeIter fh_it(fh_iter(_fh)); fh_it; ++fh_it)
|
||||
for (FaceHalfedgeIter fh_it(fh_iter(_fh)); fh_it.is_valid(); ++fh_it)
|
||||
{
|
||||
hh = fh_it.handle();
|
||||
hh = *fh_it;
|
||||
|
||||
set_boundary(hh);//set_face_handle(hh, InvalidFaceHandle);
|
||||
|
||||
@@ -745,8 +745,8 @@ void PolyConnectivity::collapse_edge(HalfedgeHandle _hh)
|
||||
|
||||
|
||||
// halfedge -> vertex
|
||||
for (VertexIHalfedgeIter vih_it(vih_iter(vo)); vih_it; ++vih_it)
|
||||
set_vertex_handle(vih_it.handle(), vh);
|
||||
for (VertexIHalfedgeIter vih_it(vih_iter(vo)); vih_it.is_valid(); ++vih_it)
|
||||
set_vertex_handle(*vih_it, vh);
|
||||
|
||||
|
||||
// halfedge -> halfedge
|
||||
@@ -844,11 +844,11 @@ bool PolyConnectivity::is_simple_link(EdgeHandle _eh) const
|
||||
bool PolyConnectivity::is_simply_connected(FaceHandle _fh) const
|
||||
{
|
||||
std::set<FaceHandle> nb_fhs;
|
||||
for (ConstFaceFaceIter cff_it = cff_iter(_fh); cff_it; ++cff_it)
|
||||
for (ConstFaceFaceIter cff_it = cff_iter(_fh); cff_it.is_valid(); ++cff_it)
|
||||
{
|
||||
if (nb_fhs.find(cff_it) == nb_fhs.end())
|
||||
if (nb_fhs.find(*cff_it) == nb_fhs.end())
|
||||
{
|
||||
nb_fhs.insert(cff_it);
|
||||
nb_fhs.insert(*cff_it);
|
||||
}
|
||||
else
|
||||
{//there is more than one link
|
||||
@@ -910,9 +910,9 @@ PolyConnectivity::remove_edge(EdgeHandle _eh)
|
||||
{//rem_fh is the face at heh1
|
||||
set_halfedge_handle(rem_fh, prev_heh0);
|
||||
}
|
||||
for (FaceHalfedgeIter fh_it = fh_iter(rem_fh); fh_it; ++fh_it)
|
||||
for (FaceHalfedgeIter fh_it = fh_iter(rem_fh); fh_it.is_valid(); ++fh_it)
|
||||
{//set the face handle of the halfedges of del_fh to point to rem_fh
|
||||
set_face_handle(fh_it, rem_fh);
|
||||
set_face_handle(*fh_it, rem_fh);
|
||||
}
|
||||
|
||||
status(_eh).set_deleted(true);
|
||||
@@ -952,9 +952,9 @@ void PolyConnectivity::reinsert_edge(EdgeHandle _eh)
|
||||
set_next_halfedge_handle(prev_heh1, heh1);
|
||||
set_prev_halfedge_handle(next_heh1, heh1);
|
||||
|
||||
for (FaceHalfedgeIter fh_it = fh_iter(del_fh); fh_it; ++fh_it)
|
||||
for (FaceHalfedgeIter fh_it = fh_iter(del_fh); fh_it.is_valid(); ++fh_it)
|
||||
{//reassign halfedges to del_fh
|
||||
set_face_handle(fh_it, del_fh);
|
||||
set_face_handle(*fh_it, del_fh);
|
||||
}
|
||||
|
||||
if (face_handle(halfedge_handle(rem_fh)) == del_fh)
|
||||
@@ -992,9 +992,9 @@ PolyConnectivity::insert_edge(HalfedgeHandle _prev_heh, HalfedgeHandle _next_heh
|
||||
//now set the face handles - the new face is assigned to heh0
|
||||
FaceHandle new_fh = new_face();
|
||||
set_halfedge_handle(new_fh, heh0);
|
||||
for (FaceHalfedgeIter fh_it = fh_iter(new_fh); fh_it; ++fh_it)
|
||||
for (FaceHalfedgeIter fh_it = fh_iter(new_fh); fh_it.is_valid(); ++fh_it)
|
||||
{
|
||||
set_face_handle(fh_it, new_fh);
|
||||
set_face_handle(*fh_it, new_fh);
|
||||
}
|
||||
FaceHandle old_fh = face_handle(next_prev_heh);
|
||||
set_face_handle(heh1, old_fh);
|
||||
@@ -1061,7 +1061,7 @@ void PolyConnectivity::triangulate()
|
||||
*/
|
||||
FaceIter f_it(faces_begin()), f_end(faces_end());
|
||||
for (; f_it!=f_end; ++f_it)
|
||||
triangulate(f_it);
|
||||
triangulate(*f_it);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1114,15 +1114,15 @@ void PolyConnectivity::split_copy(FaceHandle fh, VertexHandle vh) {
|
||||
split(fh, vh);
|
||||
|
||||
// Copy the property of the original face to all new faces
|
||||
for(VertexFaceIter vf_it = vf_iter(vh); vf_it; ++vf_it)
|
||||
copy_all_properties(fh, vf_it);
|
||||
for(VertexFaceIter vf_it = vf_iter(vh); vf_it.is_valid(); ++vf_it)
|
||||
copy_all_properties(fh, *vf_it);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
uint PolyConnectivity::valence(VertexHandle _vh) const
|
||||
{
|
||||
uint count(0);
|
||||
for (ConstVertexVertexIter vv_it=cvv_iter(_vh); vv_it; ++vv_it)
|
||||
for (ConstVertexVertexIter vv_it=cvv_iter(_vh); vv_it.is_valid(); ++vv_it)
|
||||
++count;
|
||||
return count;
|
||||
}
|
||||
@@ -1131,7 +1131,7 @@ uint PolyConnectivity::valence(VertexHandle _vh) const
|
||||
uint PolyConnectivity::valence(FaceHandle _fh) const
|
||||
{
|
||||
uint count(0);
|
||||
for (ConstFaceVertexIter fv_it=cfv_iter(_fh); fv_it; ++fv_it)
|
||||
for (ConstFaceVertexIter fv_it=cfv_iter(_fh); fv_it.is_valid(); ++fv_it)
|
||||
++count;
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -96,10 +96,10 @@ calc_face_normal(FaceHandle _fh) const
|
||||
assert(this->halfedge_handle(_fh).is_valid());
|
||||
ConstFaceVertexIter fv_it(this->cfv_iter(_fh));
|
||||
|
||||
Point p0 = this->point(fv_it);
|
||||
Point p0 = this->point(*fv_it);
|
||||
Point p0i = p0; //save point of vertex 0
|
||||
++fv_it;
|
||||
Point p1 = this->point(fv_it);
|
||||
Point p1 = this->point(*fv_it);
|
||||
Point p1i = p1; //save point of vertex 1
|
||||
++fv_it;
|
||||
Point p2;
|
||||
@@ -108,7 +108,7 @@ calc_face_normal(FaceHandle _fh) const
|
||||
Normal n(0,0,0);
|
||||
for(; fv_it.is_valid(); ++fv_it)
|
||||
{
|
||||
p2 = this->point(fv_it);
|
||||
p2 = this->point(*fv_it);
|
||||
n += vector_cast<Normal>(calc_face_normal(p0, p1, p2));
|
||||
p0 = p1;
|
||||
p1 = p2;
|
||||
@@ -331,7 +331,7 @@ void PolyMeshT<Kernel>::
|
||||
calc_vertex_normal_fast(VertexHandle _vh, Normal& _n) const
|
||||
{
|
||||
_n.vectorize(0.0);
|
||||
for (ConstVertexFaceIter vf_it=this->cvf_iter(_vh); vf_it; ++vf_it)
|
||||
for (ConstVertexFaceIter vf_it=this->cvf_iter(_vh); vf_it.is_valid(); ++vf_it)
|
||||
_n += this->normal(*vf_it);
|
||||
}
|
||||
|
||||
|
||||
@@ -153,14 +153,14 @@ bool TriConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
|
||||
VertexVertexIter vv_it;
|
||||
|
||||
// test intersection of the one-rings of v0 and v1
|
||||
for (vv_it = vv_iter(v0); vv_it; ++vv_it)
|
||||
status(vv_it).set_tagged(false);
|
||||
for (vv_it = vv_iter(v0); vv_it.is_valid(); ++vv_it)
|
||||
status(*vv_it).set_tagged(false);
|
||||
|
||||
for (vv_it = vv_iter(v1); vv_it; ++vv_it)
|
||||
status(vv_it).set_tagged(true);
|
||||
for (vv_it = vv_iter(v1); vv_it.is_valid(); ++vv_it)
|
||||
status(*vv_it).set_tagged(true);
|
||||
|
||||
for (vv_it = vv_iter(v0); vv_it; ++vv_it)
|
||||
if (status(vv_it).tagged() && *vv_it != vl && *vv_it != vr)
|
||||
for (vv_it = vv_iter(v0); vv_it.is_valid(); ++vv_it)
|
||||
if (status(*vv_it).tagged() && *vv_it != vl && *vv_it != vr)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -279,8 +279,8 @@ TriConnectivity::insert_edge(VertexHandle _vh, HalfedgeHandle _h0, HalfedgeHandl
|
||||
|
||||
|
||||
// halfedge -> vertex
|
||||
for (VertexIHalfedgeIter vih_it(vih_iter(v0)); vih_it; ++vih_it)
|
||||
set_vertex_handle(vih_it.handle(), v0);
|
||||
for (VertexIHalfedgeIter vih_it(vih_iter(v0)); vih_it.is_valid(); ++vih_it)
|
||||
set_vertex_handle(*vih_it, v0);
|
||||
|
||||
|
||||
// halfedge -> face
|
||||
@@ -323,8 +323,8 @@ bool TriConnectivity::is_flip_ok(EdgeHandle _eh) const
|
||||
if (ah == bh) // this is generally a bad sign !!!
|
||||
return false;
|
||||
|
||||
for (ConstVertexVertexIter vvi(*this, ah); vvi; ++vvi)
|
||||
if (vvi.handle() == bh)
|
||||
for (ConstVertexVertexIter vvi(*this, ah); vvi.is_valid(); ++vvi)
|
||||
if (*vvi == bh)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -487,8 +487,8 @@ void TriConnectivity::split_copy(EdgeHandle _eh, VertexHandle _vh)
|
||||
|
||||
// Copy the properties of the original edge to all neighbor edges that
|
||||
// have been created
|
||||
for(VEIter ve_it = ve_iter(_vh); ve_it; ++ve_it)
|
||||
copy_all_properties(_eh, ve_it);
|
||||
for(VEIter ve_it = ve_iter(_vh); ve_it.is_valid(); ++ve_it)
|
||||
copy_all_properties(_eh, *ve_it);
|
||||
}
|
||||
|
||||
}// namespace OpenMesh
|
||||
|
||||
@@ -74,9 +74,9 @@ calc_face_normal(FaceHandle _fh) const
|
||||
assert(this->halfedge_handle(_fh).is_valid());
|
||||
ConstFaceVertexIter fv_it(this->cfv_iter(_fh));
|
||||
|
||||
const Point& p0(this->point(fv_it)); ++fv_it;
|
||||
const Point& p1(this->point(fv_it)); ++fv_it;
|
||||
const Point& p2(this->point(fv_it));
|
||||
const Point& p0(this->point(*fv_it)); ++fv_it;
|
||||
const Point& p1(this->point(*fv_it)); ++fv_it;
|
||||
const Point& p2(this->point(*fv_it));
|
||||
|
||||
return PolyMesh::calc_face_normal(p0, p1, p2);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,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) {
|
||||
for (; voh_it.is_valid(); ++voh_it) {
|
||||
heh = *voh_it;
|
||||
CollapseInfo ci(mesh_, heh);
|
||||
|
||||
@@ -168,8 +168,8 @@ size_t DecimaterT<Mesh>::decimate(size_t _n_collapses) {
|
||||
|
||||
for (v_it = mesh_.vertices_begin(); v_it != v_end; ++v_it) {
|
||||
heap_->reset_heap_position(v_it.handle());
|
||||
if (!mesh_.status(v_it).deleted())
|
||||
heap_vertex(v_it.handle());
|
||||
if (!mesh_.status(*v_it).deleted())
|
||||
heap_vertex(*v_it);
|
||||
}
|
||||
|
||||
// process heap
|
||||
@@ -189,7 +189,7 @@ size_t DecimaterT<Mesh>::decimate(size_t _n_collapses) {
|
||||
// store support (= one ring of *vp)
|
||||
vv_it = mesh_.vv_iter(ci.v0);
|
||||
support.clear();
|
||||
for (; vv_it; ++vv_it)
|
||||
for (; vv_it.is_valid(); ++vv_it)
|
||||
support.push_back(*vv_it);
|
||||
|
||||
// perform collapse
|
||||
@@ -198,9 +198,9 @@ size_t DecimaterT<Mesh>::decimate(size_t _n_collapses) {
|
||||
|
||||
// update triangle normals
|
||||
vf_it = mesh_.vf_iter(ci.v1);
|
||||
for (; vf_it; ++vf_it)
|
||||
if (!mesh_.status(vf_it).deleted())
|
||||
mesh_.set_normal(vf_it, mesh_.calc_face_normal(vf_it.handle()));
|
||||
for (; vf_it.is_valid(); ++vf_it)
|
||||
if (!mesh_.status(*vf_it).deleted())
|
||||
mesh_.set_normal(*vf_it, mesh_.calc_face_normal(*vf_it));
|
||||
|
||||
// post-process collapse
|
||||
this->postprocess_collapse(ci);
|
||||
|
||||
@@ -112,7 +112,7 @@ void ModAspectRatioT<MeshT>::preprocess_collapse(const CollapseInfo& _ci) {
|
||||
typename Mesh::FaceHandle fh;
|
||||
typename Mesh::FVIter fv_it;
|
||||
|
||||
for (typename Mesh::VFIter vf_it = mesh_.vf_iter(_ci.v0); vf_it; ++vf_it) {
|
||||
for (typename Mesh::VFIter vf_it = mesh_.vf_iter(_ci.v0); vf_it.is_valid(); ++vf_it) {
|
||||
fh = *vf_it;
|
||||
if (fh != _ci.fl && fh != _ci.fr) {
|
||||
typename Mesh::Point& p0 = mesh_.point(fv_it = mesh_.fv_iter(fh));
|
||||
@@ -137,7 +137,7 @@ float ModAspectRatioT<MeshT>::collapse_priority(const CollapseInfo& _ci) {
|
||||
v3 = *vv_it;
|
||||
p3 = &mesh_.point(v3);
|
||||
|
||||
while (vv_it) {
|
||||
while (vv_it.is_valid()) {
|
||||
v2 = v3;
|
||||
p2 = p3;
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ collapse_priority(const CollapseInfo& _ci)
|
||||
|
||||
// collect all points to be tested
|
||||
// collect all faces to be tested against
|
||||
for (vf_it=mesh_.vf_iter(_ci.v0); vf_it; ++vf_it) {
|
||||
for (vf_it=mesh_.vf_iter(_ci.v0); vf_it.is_valid(); ++vf_it) {
|
||||
fh = *vf_it;
|
||||
|
||||
if (fh != _ci.fl && fh != _ci.fr)
|
||||
@@ -289,7 +289,7 @@ postprocess_collapse(const CollapseInfo& _ci)
|
||||
faces.reserve(20);
|
||||
|
||||
// collect active faces and their points
|
||||
for (vf_it=mesh_.vf_iter(_ci.v1); vf_it; ++vf_it) {
|
||||
for (vf_it=mesh_.vf_iter(_ci.v1); vf_it.is_valid(); ++vf_it) {
|
||||
fh = *vf_it;
|
||||
faces.push_back(fh);
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ class ModIndependentSetsT: public ModBaseT<MeshT> {
|
||||
|
||||
Base::mesh().status(_ci.v1).set_locked(true);
|
||||
vv_it = Base::mesh().vv_iter(_ci.v1);
|
||||
for (; vv_it; ++vv_it)
|
||||
Base::mesh().status(vv_it).set_locked(true);
|
||||
for (; vv_it.is_valid(); ++vv_it)
|
||||
Base::mesh().status(*vv_it).set_locked(true);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
if (_ci.v0vl.is_valid()) fhl = mesh_.face_handle(_ci.v0vl);
|
||||
if (_ci.vrv0.is_valid()) fhr = mesh_.face_handle(_ci.vrv0);
|
||||
|
||||
for (; vf_it; ++vf_it) {
|
||||
for (; vf_it.is_valid(); ++vf_it) {
|
||||
fh = *vf_it;
|
||||
if (fh != _ci.fl && fh != _ci.fr) {
|
||||
NormalCone nc = mesh_.property(normal_cones_, fh);
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
void postprocess_collapse(const CollapseInfo& _ci) {
|
||||
// account for changed normals
|
||||
typename Mesh::VertexFaceIter vf_it(mesh_, _ci.v1);
|
||||
for (; vf_it; ++vf_it)
|
||||
for (; vf_it.is_valid(); ++vf_it)
|
||||
mesh_.property(normal_cones_, vf_it).
|
||||
merge(NormalCone(mesh_.normal(vf_it)));
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
typename Mesh::FaceHandle fh;
|
||||
typename Mesh::Scalar c(1.0);
|
||||
|
||||
for (; vf_it; ++vf_it)
|
||||
for (; vf_it.is_valid(); ++vf_it)
|
||||
{
|
||||
fh = *vf_it;
|
||||
if (fh != _ci.fl && fh != _ci.fr)
|
||||
|
||||
@@ -130,7 +130,7 @@ class ModRoundnessT : public ModBaseT<MeshT>
|
||||
C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(voh_it)));
|
||||
fhC = Base::mesh().face_handle( *voh_it );
|
||||
|
||||
for (++voh_it; voh_it; ++voh_it)
|
||||
for (++voh_it; voh_it.is_valid(); ++voh_it)
|
||||
{
|
||||
B = C;
|
||||
fhB = fhC;
|
||||
@@ -153,7 +153,7 @@ class ModRoundnessT : public ModBaseT<MeshT>
|
||||
C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(voh_it)));
|
||||
fhC = Base::mesh().face_handle( *voh_it );
|
||||
|
||||
for (++voh_it; voh_it && (priority==Base::LEGAL_COLLAPSE); ++voh_it)
|
||||
for (++voh_it; voh_it.is_valid() && (priority==Base::LEGAL_COLLAPSE); ++voh_it)
|
||||
{
|
||||
B = C;
|
||||
fhB = fhC;
|
||||
|
||||
@@ -100,11 +100,11 @@ PolyMesh_ArrayKernelT<MeshTraits>* MeshDual (PolyMesh_ArrayKernelT<MeshTraits> &
|
||||
{
|
||||
typename PolyMesh_ArrayKernelT<MeshTraits>::Point centerPoint(0,0,0);
|
||||
unsigned int degree= 0;
|
||||
for(typename PolyMesh_ArrayKernelT<MeshTraits>::ConstFaceVertexIter vit=primal.cfv_iter(fit); vit; ++vit, ++degree)
|
||||
for(typename PolyMesh_ArrayKernelT<MeshTraits>::ConstFaceVertexIter vit=primal.cfv_iter(fit); vit.is_valid(); ++vit, ++degree)
|
||||
centerPoint += primal.point(*vit);
|
||||
assert(degree!=0);
|
||||
centerPoint /= degree;
|
||||
primal.property(primalToDual, fit) = dual->add_vertex(centerPoint);
|
||||
primal.property(primalToDual, *fit) = dual->add_vertex(centerPoint);
|
||||
}
|
||||
|
||||
//for each vertex in the primal, add a face in the dual
|
||||
@@ -114,8 +114,8 @@ PolyMesh_ArrayKernelT<MeshTraits>* MeshDual (PolyMesh_ArrayKernelT<MeshTraits> &
|
||||
if(!primal.is_boundary(*vit))
|
||||
{
|
||||
face_vhandles.clear();
|
||||
for(typename PolyMesh_ArrayKernelT<MeshTraits>::ConstVertexFaceIter fit=primal.cvf_iter(vit); fit; ++fit)
|
||||
face_vhandles.push_back(primal.property(primalToDual, fit));
|
||||
for(typename PolyMesh_ArrayKernelT<MeshTraits>::ConstVertexFaceIter fit=primal.cvf_iter(vit); fit.is_valid(); ++fit)
|
||||
face_vhandles.push_back(primal.property(primalToDual, *fit));
|
||||
dual->add_face(face_vhandles);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,21 +108,21 @@ compute_new_positions_C0()
|
||||
{
|
||||
// compute umbrella
|
||||
u = zero;
|
||||
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it; ++vv_it)
|
||||
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it.is_valid(); ++vv_it)
|
||||
{
|
||||
w = this->weight(Base::mesh_.edge_handle(vv_it.current_halfedge_handle()));
|
||||
u += vector_cast<typename Mesh::Normal>(Base::mesh_.point(vv_it)) * w;
|
||||
u += vector_cast<typename Mesh::Normal>(Base::mesh_.point(*vv_it)) * w;
|
||||
}
|
||||
u *= this->weight(v_it);
|
||||
u -= vector_cast<typename Mesh::Normal>(Base::mesh_.point(v_it));
|
||||
u -= vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
|
||||
|
||||
// damping
|
||||
u *= 0.5;
|
||||
|
||||
// store new position
|
||||
p = vector_cast<typename Mesh::Normal>(Base::mesh_.point(v_it));
|
||||
p = vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
|
||||
p += u;
|
||||
this->set_new_position(v_it, p);
|
||||
this->set_new_position(*v_it, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,10 +146,10 @@ compute_new_positions_C1()
|
||||
for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
{
|
||||
u = zero;
|
||||
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it; ++vv_it)
|
||||
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it.is_valid(); ++vv_it)
|
||||
{
|
||||
w = this->weight(Base::mesh_.edge_handle(vv_it.current_halfedge_handle()));
|
||||
u -= vector_cast<typename Mesh::Normal>(Base::mesh_.point(vv_it))*w;
|
||||
u -= vector_cast<typename Mesh::Normal>(Base::mesh_.point(*vv_it))*w;
|
||||
}
|
||||
u *= this->weight(v_it);
|
||||
u += vector_cast<typename Mesh::Normal>(Base::mesh_.point(v_it));
|
||||
@@ -165,11 +165,11 @@ compute_new_positions_C1()
|
||||
{
|
||||
uu = zero;
|
||||
diag = 0.0;
|
||||
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it; ++vv_it)
|
||||
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it.is_valid(); ++vv_it)
|
||||
{
|
||||
w = this->weight(Base::mesh_.edge_handle(vv_it.current_halfedge_handle()));
|
||||
uu -= Base::mesh_.property(umbrellas_, vv_it);
|
||||
diag += (w * this->weight(vv_it) + 1.0) * w;
|
||||
uu -= Base::mesh_.property(umbrellas_, *vv_it);
|
||||
diag += (w * this->weight(*vv_it) + 1.0) * w;
|
||||
}
|
||||
uu *= this->weight(v_it);
|
||||
diag *= this->weight(v_it);
|
||||
|
||||
@@ -172,7 +172,7 @@ set_active_vertices()
|
||||
active = active && !mesh_.status(v_it).feature();
|
||||
|
||||
typename Mesh::VertexOHalfedgeIter voh_it(mesh_,v_it);
|
||||
for ( ; voh_it ; ++voh_it ) {
|
||||
for ( ; voh_it.is_valid() ; ++voh_it ) {
|
||||
|
||||
// If the edge is a feature edge, skip the current vertex while smoothing
|
||||
if ( mesh_.status(mesh_.edge_handle(*voh_it)).feature() )
|
||||
@@ -201,8 +201,8 @@ set_active_vertices()
|
||||
|
||||
for (v_it=mesh_.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
if (mesh_.is_boundary(v_it))
|
||||
for (vv_it=mesh_.vv_iter(v_it); vv_it; ++vv_it)
|
||||
mesh_.property(is_active_, vv_it) = false;
|
||||
for (vv_it=mesh_.vv_iter(*v_it); vv_it.is_valid(); ++vv_it)
|
||||
mesh_.property(is_active_, *vv_it) = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,26 +213,26 @@ set_active_vertices()
|
||||
|
||||
for (v_it=mesh_.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
{
|
||||
mesh_.status(v_it).set_tagged(false);
|
||||
mesh_.status(v_it).set_tagged2(false);
|
||||
mesh_.status(*v_it).set_tagged(false);
|
||||
mesh_.status(*v_it).set_tagged2(false);
|
||||
}
|
||||
|
||||
for (v_it=mesh_.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
if (mesh_.is_boundary(v_it))
|
||||
for (vv_it=mesh_.vv_iter(v_it); vv_it; ++vv_it)
|
||||
mesh_.status(v_it).set_tagged(true);
|
||||
if (mesh_.is_boundary(*v_it))
|
||||
for (vv_it=mesh_.vv_iter(*v_it); vv_it.is_valid(); ++vv_it)
|
||||
mesh_.status(*v_it).set_tagged(true);
|
||||
|
||||
for (v_it=mesh_.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
if (mesh_.status(v_it).tagged())
|
||||
for (vv_it=mesh_.vv_iter(v_it); vv_it; ++vv_it)
|
||||
mesh_.status(v_it).set_tagged2(true);
|
||||
if (mesh_.status(*v_it).tagged())
|
||||
for (vv_it=mesh_.vv_iter(*v_it); vv_it.is_valid(); ++vv_it)
|
||||
mesh_.status(*v_it).set_tagged2(true);
|
||||
|
||||
for (v_it=mesh_.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
{
|
||||
if (mesh_.status(v_it).tagged2())
|
||||
mesh_.property(is_active_, vv_it) = false;
|
||||
mesh_.status(v_it).set_tagged(false);
|
||||
mesh_.status(v_it).set_tagged2(false);
|
||||
if (mesh_.status(*v_it).tagged2())
|
||||
mesh_.property(is_active_, *vv_it) = false;
|
||||
mesh_.status(*v_it).set_tagged(false);
|
||||
mesh_.status(*v_it).set_tagged2(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ void
|
||||
Tvv4<M>::split_edge(typename M::HalfedgeHandle &_hh,
|
||||
typename M::VertexHandle &_vh,
|
||||
state_t _target_state)
|
||||
{
|
||||
{
|
||||
typename M::HalfedgeHandle temp_hh;
|
||||
|
||||
if (Base::mesh_.FH(Base::mesh_.OHEH(_hh)).is_valid())
|
||||
@@ -817,7 +817,7 @@ void VF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
|
||||
this->update(_fh, _target_state);
|
||||
|
||||
// raise all neighbour vertices to level x-1
|
||||
// raise all neighbor vertices to level x-1
|
||||
typename M::FaceVertexIter fv_it;
|
||||
typename M::VertexHandle vh;
|
||||
std::vector<typename M::VertexHandle> vertex_vector;
|
||||
@@ -874,7 +874,7 @@ void FF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state) {
|
||||
|
||||
this->update(_fh, _target_state);
|
||||
|
||||
// raise all neighbour faces to level x-1
|
||||
// raise all neighbor faces to level x-1
|
||||
typename M::FaceFaceIter ff_it;
|
||||
typename M::FaceHandle fh;
|
||||
std::vector<typename M::FaceHandle> face_vector;
|
||||
@@ -938,7 +938,7 @@ void FFc<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
|
||||
this->update(_fh, _target_state);
|
||||
|
||||
// raise all neighbour faces to level x-1
|
||||
// raise all neighbor faces to level x-1
|
||||
typename M::FaceFaceIter ff_it(Base::mesh_.ff_iter(_fh));
|
||||
typename M::FaceHandle fh;
|
||||
std::vector<typename M::FaceHandle> face_vector;
|
||||
@@ -955,7 +955,7 @@ void FFc<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
Base::prev_rule()->raise(fh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (ff_it = Base::mesh_.ff_iter(_fh); ff_it; ++ff_it)
|
||||
for (ff_it = Base::mesh_.ff_iter(_fh); ff_it.is_valid(); ++ff_it)
|
||||
face_vector.push_back(*ff_it);
|
||||
|
||||
while (!face_vector.empty()) {
|
||||
@@ -972,7 +972,7 @@ void FFc<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
|
||||
typename M::Point position(0.0, 0.0, 0.0);
|
||||
int valence(0);
|
||||
|
||||
for (ff_it = Base::mesh_.ff_iter(_fh); ff_it; ++ff_it)
|
||||
for (ff_it = Base::mesh_.ff_iter(_fh); ff_it.is_valid(); ++ff_it)
|
||||
{
|
||||
++valence;
|
||||
position += Base::mesh_.data(ff_it).position(_target_state - 1);
|
||||
@@ -1003,7 +1003,7 @@ void FV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
this->update(_vh, _target_state);
|
||||
|
||||
// raise all neighbour vertices to level x-1
|
||||
// raise all neighbor vertices to level x-1
|
||||
typename M::VertexFaceIter vf_it(Base::mesh_.vf_iter(_vh));
|
||||
typename M::FaceHandle fh;
|
||||
std::vector<typename M::FaceHandle> face_vector;
|
||||
@@ -1023,7 +1023,7 @@ void FV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
Base::prev_rule()->raise(fh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (vf_it = Base::mesh_.vf_iter(_vh); vf_it; ++vf_it) {
|
||||
for (vf_it = Base::mesh_.vf_iter(_vh); vf_it.is_valid(); ++vf_it) {
|
||||
|
||||
face_vector.push_back(*vf_it);
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ void FV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
typename M::Point position(0.0, 0.0, 0.0);
|
||||
int valence(0);
|
||||
|
||||
for (vf_it = Base::mesh_.vf_iter(_vh); vf_it; ++vf_it) {
|
||||
for (vf_it = Base::mesh_.vf_iter(_vh); vf_it.is_valid(); ++vf_it) {
|
||||
|
||||
++valence;
|
||||
position += Base::mesh_.data(vf_it).position(_target_state - 1);
|
||||
@@ -1082,7 +1082,7 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
// raise all neighbour faces to level x-1
|
||||
if (_target_state > 1) {
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it.is_valid(); ++voh_it) {
|
||||
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
@@ -1103,7 +1103,7 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
Base::prev_rule()->raise(fh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it.is_valid(); ++voh_it) {
|
||||
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
@@ -1125,7 +1125,7 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
Base::prev_rule()->raise(fh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it.is_valid(); ++voh_it) {
|
||||
|
||||
if (Base::mesh_.FH(*voh_it).is_valid()) {
|
||||
|
||||
@@ -1168,7 +1168,7 @@ void FVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
#endif
|
||||
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it.is_valid(); ++voh_it) {
|
||||
|
||||
fh = Base::mesh_.FH(*voh_it);
|
||||
if (fh.is_valid())
|
||||
@@ -1247,14 +1247,14 @@ void VV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
{
|
||||
this->update(_vh, _target_state);
|
||||
|
||||
// raise all neighbour vertices to level x-1
|
||||
// raise all neighbor vertices to level x-1
|
||||
typename M::VertexVertexIter vv_it(Base::mesh_.vv_iter(_vh));
|
||||
typename M::VertexHandle vh;
|
||||
std::vector<typename M::VertexHandle> vertex_vector;
|
||||
|
||||
if (_target_state > 1) {
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
for (; vv_it.is_valid(); ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
@@ -1267,7 +1267,7 @@ void VV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
Base::prev_rule()->raise(vh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
for (; vv_it.is_valid(); ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
@@ -1285,7 +1285,7 @@ void VV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
typename M::Point position(0.0, 0.0, 0.0);
|
||||
int valence(0);
|
||||
|
||||
for (vv_it = Base::mesh_.vv_iter(_vh); vv_it; ++vv_it) {
|
||||
for (vv_it = Base::mesh_.vv_iter(_vh); vv_it.is_valid(); ++vv_it) {
|
||||
|
||||
++valence;
|
||||
|
||||
@@ -1317,14 +1317,14 @@ void VVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
this->update(_vh, _target_state);
|
||||
|
||||
// raise all neighbour vertices to level x-1
|
||||
// raise all neighbor vertices to level x-1
|
||||
typename M::VertexVertexIter vv_it(Base::mesh_.vv_iter(_vh));
|
||||
typename M::VertexHandle vh;
|
||||
std::vector<typename M::VertexHandle> vertex_vector;
|
||||
|
||||
if (_target_state > 1) {
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
for (; vv_it.is_valid(); ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
@@ -1337,7 +1337,7 @@ void VVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
Base::prev_rule()->raise(vh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (; vv_it; ++vv_it) {
|
||||
for (; vv_it.is_valid(); ++vv_it) {
|
||||
|
||||
vertex_vector.push_back(*vv_it);
|
||||
}
|
||||
@@ -1356,7 +1356,7 @@ void VVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
int valence(0);
|
||||
typename M::Scalar c;
|
||||
|
||||
for (vv_it = Base::mesh_.vv_iter(_vh); vv_it; ++vv_it)
|
||||
for (vv_it = Base::mesh_.vv_iter(_vh); vv_it.is_valid(); ++vv_it)
|
||||
{
|
||||
++valence;
|
||||
position += Base::mesh_.data(vv_it).position(_target_state - 1);
|
||||
@@ -1364,7 +1364,7 @@ void VVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
position /= valence;
|
||||
|
||||
// choose coefficcient c
|
||||
// choose coefficient c
|
||||
c = Base::coeff();
|
||||
|
||||
position *= (1.0 - c);
|
||||
@@ -1434,7 +1434,7 @@ void VdE<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state)
|
||||
{
|
||||
this->update(_eh, _target_state);
|
||||
|
||||
// raise all neighbour vertices to level x-1
|
||||
// raise all neighbor vertices to level x-1
|
||||
typename M::VertexHandle vh;
|
||||
typename M::HalfedgeHandle hh1(Base::mesh_.HEH(_eh, 0)),
|
||||
hh2(Base::mesh_.HEH(_eh, 1));
|
||||
@@ -1510,7 +1510,7 @@ VdEc<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state)
|
||||
{
|
||||
this->update(_eh, _target_state);
|
||||
|
||||
// raise all neighbour vertices to level x-1
|
||||
// raise all neighbor vertices to level x-1
|
||||
typename M::VertexHandle vh;
|
||||
typename M::HalfedgeHandle hh1(Base::mesh_.HEH(_eh, 0)),
|
||||
hh2(Base::mesh_.HEH(_eh, 1));
|
||||
@@ -1586,14 +1586,14 @@ void EV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
this->update(_vh, _target_state);
|
||||
|
||||
// raise all neighbour vertices to level x-1
|
||||
// raise all neighbor vertices to level x-1
|
||||
typename M::VertexEdgeIter ve_it(Base::mesh_.ve_iter(_vh));
|
||||
typename M::EdgeHandle eh;
|
||||
std::vector<typename M::EdgeHandle> edge_vector;
|
||||
|
||||
if (_target_state > 1) {
|
||||
|
||||
for (; ve_it; ++ve_it) {
|
||||
for (; ve_it.is_valid(); ++ve_it) {
|
||||
|
||||
edge_vector.push_back(*ve_it);
|
||||
}
|
||||
@@ -1606,7 +1606,7 @@ void EV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
Base::prev_rule()->raise(eh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (ve_it = Base::mesh_.ve_iter(_vh); ve_it; ++ve_it) {
|
||||
for (ve_it = Base::mesh_.ve_iter(_vh); ve_it.is_valid(); ++ve_it) {
|
||||
|
||||
edge_vector.push_back(*ve_it);
|
||||
}
|
||||
@@ -1625,7 +1625,7 @@ void EV<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
typename M::Point position(0.0, 0.0, 0.0);
|
||||
int valence(0);
|
||||
|
||||
for (ve_it = Base::mesh_.ve_iter(_vh); ve_it; ++ve_it) {
|
||||
for (ve_it = Base::mesh_.ve_iter(_vh); ve_it.is_valid(); ++ve_it) {
|
||||
|
||||
if (Base::mesh_.data(ve_it).final()) {
|
||||
|
||||
@@ -1671,7 +1671,7 @@ void EVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
|
||||
if (_target_state > 1) {
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it.is_valid(); ++voh_it) {
|
||||
|
||||
face_vector.push_back(Base::mesh_.FH(*voh_it));
|
||||
}
|
||||
@@ -1685,7 +1685,7 @@ void EVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
Base::prev_rule()->raise(fh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it) {
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it.is_valid(); ++voh_it) {
|
||||
|
||||
edge_vector.push_back(Base::mesh_.EH(*voh_it));
|
||||
|
||||
@@ -1712,7 +1712,7 @@ void EVc<M>::raise(typename M::VertexHandle& _vh, state_t _target_state)
|
||||
valence = Base::mesh_.valence(_vh);
|
||||
c = coeff( valence );
|
||||
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it; ++voh_it)
|
||||
for (voh_it = Base::mesh_.voh_iter(_vh); voh_it.is_valid(); ++voh_it)
|
||||
{
|
||||
if (MOBJ(Base::mesh_.EH(*voh_it)).final())
|
||||
{
|
||||
@@ -1791,7 +1791,7 @@ EF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state) {
|
||||
|
||||
if (_target_state > 1) {
|
||||
|
||||
for (; fe_it; ++fe_it) {
|
||||
for (; fe_it.is_valid(); ++fe_it) {
|
||||
|
||||
edge_vector.push_back(*fe_it);
|
||||
}
|
||||
@@ -1804,7 +1804,7 @@ EF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state) {
|
||||
Base::prev_rule()->raise(eh, _target_state - 1);
|
||||
}
|
||||
|
||||
for (fe_it = Base::mesh_.fe_iter(_fh); fe_it; ++fe_it) {
|
||||
for (fe_it = Base::mesh_.fe_iter(_fh); fe_it.is_valid(); ++fe_it) {
|
||||
|
||||
edge_vector.push_back(*fe_it);
|
||||
}
|
||||
@@ -1823,7 +1823,7 @@ EF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state) {
|
||||
typename M::Point position(0.0, 0.0, 0.0);
|
||||
int valence(0);
|
||||
|
||||
for (fe_it = Base::mesh_.fe_iter(_fh); fe_it; ++fe_it) {
|
||||
for (fe_it = Base::mesh_.fe_iter(_fh); fe_it.is_valid(); ++fe_it) {
|
||||
|
||||
if (Base::mesh_.data(fe_it).final()) {
|
||||
|
||||
@@ -1854,7 +1854,7 @@ FE<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state) {
|
||||
|
||||
this->update(_eh, _target_state);
|
||||
|
||||
// raise all neighbour faces to level x-1
|
||||
// raise all neighbor faces to level x-1
|
||||
typename M::FaceHandle fh;
|
||||
|
||||
if (_target_state > 1) {
|
||||
@@ -1899,7 +1899,7 @@ EdE<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state) {
|
||||
|
||||
this->update(_eh, _target_state);
|
||||
|
||||
// raise all neighbour faces and edges to level x-1
|
||||
// raise all neighbor faces and edges to level x-1
|
||||
typename M::HalfedgeHandle hh1, hh2;
|
||||
typename M::FaceHandle fh;
|
||||
typename M::EdgeHandle eh;
|
||||
@@ -1956,7 +1956,7 @@ EdEc<M>::raise(typename M::EdgeHandle& _eh, state_t _target_state)
|
||||
|
||||
this->update(_eh, _target_state);
|
||||
|
||||
// raise all neighbour faces and edges to level x-1
|
||||
// raise all neighbor faces and edges to level x-1
|
||||
typename M::HalfedgeHandle hh1, hh2;
|
||||
typename M::FaceHandle fh;
|
||||
typename M::EdgeHandle eh;
|
||||
|
||||
@@ -215,7 +215,7 @@ protected:
|
||||
size_t valence=0;
|
||||
|
||||
pos = zero;
|
||||
for ( vvit = _m.vv_iter(vit); vvit; ++vvit)
|
||||
for ( vvit = _m.vv_iter(vit); vvit.is_valid(); ++vvit)
|
||||
{
|
||||
pos += _m.point( vvit );
|
||||
++valence;
|
||||
@@ -232,12 +232,12 @@ protected:
|
||||
{
|
||||
if ( (gen%2) && _m.is_boundary(fit))
|
||||
{
|
||||
boundary_split( _m, fit );
|
||||
boundary_split( _m, *fit );
|
||||
}
|
||||
else
|
||||
{
|
||||
fvit = _m.fv_iter( fit );
|
||||
pos = _m.point( fvit);
|
||||
fvit = _m.fv_iter( *fit );
|
||||
pos = _m.point( *fvit);
|
||||
pos += _m.point(++fvit);
|
||||
pos += _m.point(++fvit);
|
||||
pos *= _1over3;
|
||||
|
||||
Reference in New Issue
Block a user