Commit 959d80bb authored by Jan Möbius's avatar Jan Möbius
Browse files

Finished except unittests

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@910 fdac6126-5c0c-442c-9429-916003d36597
parent e30da7ea
...@@ -150,11 +150,11 @@ ProgViewerWidget::open_prog_mesh(const char* _filename) ...@@ -150,11 +150,11 @@ ProgViewerWidget::open_prog_mesh(const char* _filename)
MyMesh::Point bbMin, bbMax; MyMesh::Point bbMin, bbMax;
bbMin = bbMax = mesh_.point(vIt); bbMin = bbMax = mesh_.point(*vIt);
for (; vIt!=vEnd; ++vIt) for (; vIt!=vEnd; ++vIt)
{ {
bbMin.minimize(mesh_.point(vIt)); bbMin.minimize(mesh_.point(*vIt));
bbMax.maximize(mesh_.point(vIt)); bbMax.maximize(mesh_.point(*vIt));
} }
// set center and radius // set center and radius
......
...@@ -306,7 +306,7 @@ int main(int argc, char **argv) ...@@ -306,7 +306,7 @@ int main(int argc, char **argv)
for (f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it) { for (f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it) {
if (mesh.data(f_it).state() < target1) { if (mesh.data(*f_it).state() < target1) {
++i; ++i;
fh = *f_it; fh = *f_it;
timer2.start(); timer2.start();
...@@ -317,7 +317,7 @@ int main(int argc, char **argv) ...@@ -317,7 +317,7 @@ int main(int argc, char **argv)
for (v_it = mesh.vertices_begin(); v_it != mesh.vertices_end(); ++v_it) { for (v_it = mesh.vertices_begin(); v_it != mesh.vertices_end(); ++v_it) {
if (mesh.data(v_it).state() < target2) { if (mesh.data(*v_it).state() < target2) {
vh = *v_it; vh = *v_it;
timer2.cont(); timer2.cont();
subdivider.refine(vh); subdivider.refine(vh);
...@@ -420,8 +420,8 @@ int main(int argc, char **argv) ...@@ -420,8 +420,8 @@ int main(int argc, char **argv)
for (MyMesh::VertexIter v_it = mesh.vertices_begin(); for (MyMesh::VertexIter v_it = mesh.vertices_begin();
v_it != mesh.vertices_end(); ++v_it) v_it != mesh.vertices_end(); ++v_it)
{ {
if (mesh.data(v_it).state() > max_level) if (mesh.data(*v_it).state() > max_level)
max_level = mesh.data(v_it).state(); max_level = mesh.data(*v_it).state();
} }
......
...@@ -430,11 +430,11 @@ open_prog_mesh(const std::string& _filename) ...@@ -430,11 +430,11 @@ open_prog_mesh(const std::string& _filename)
Mesh::Point bbMin, bbMax; Mesh::Point bbMin, bbMax;
bbMin = bbMax = mesh_.point(vIt); bbMin = bbMax = mesh_.point(*vIt);
for (; vIt!=vEnd; ++vIt) for (; vIt!=vEnd; ++vIt)
{ {
bbMin.minimize(mesh_.point(vIt)); bbMin.minimize(mesh_.point(*vIt));
bbMax.maximize(mesh_.point(vIt)); bbMax.maximize(mesh_.point(*vIt));
} }
// info // info
...@@ -661,7 +661,7 @@ vdpm_analysis() ...@@ -661,7 +661,7 @@ vdpm_analysis()
for (h_it=mesh_.halfedges_begin(); h_it!=mesh_.halfedges_end(); ++h_it) for (h_it=mesh_.halfedges_begin(); h_it!=mesh_.halfedges_end(); ++h_it)
{ {
vh = mesh_.to_vertex_handle(*h_it); vh = mesh_.to_vertex_handle(*h_it);
mesh_.data(h_it).set_vhierarchy_leaf_node_handle(mesh_.data(vh).vhierarchy_node_handle()); mesh_.data(*h_it).set_vhierarchy_leaf_node_handle(mesh_.data(vh).vhierarchy_node_handle());
} }
for (v_it=mesh_.vertices_begin(); v_it!=mesh_.vertices_end(); ++v_it) for (v_it=mesh_.vertices_begin(); v_it!=mesh_.vertices_end(); ++v_it)
......
...@@ -539,11 +539,11 @@ open_vd_prog_mesh(const char* _filename) ...@@ -539,11 +539,11 @@ open_vd_prog_mesh(const char* _filename)
VDPMMesh::Point bbMin, bbMax; VDPMMesh::Point bbMin, bbMax;
bbMin = bbMax = mesh_.point(vIt); bbMin = bbMax = mesh_.point(*vIt);
for (; vIt!=vEnd; ++vIt) for (; vIt!=vEnd; ++vIt)
{ {
bbMin.minimize(mesh_.point(vIt)); bbMin.minimize(mesh_.point(*vIt));
bbMax.maximize(mesh_.point(vIt)); bbMax.maximize(mesh_.point(*vIt));
} }
// set center and radius // set center and radius
......
...@@ -321,14 +321,14 @@ int main(int argc, char **argv) ...@@ -321,14 +321,14 @@ int main(int argc, char **argv)
Mesh::FaceIter f_it; Mesh::FaceIter f_it;
for (f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it) for (f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it)
if ( !mesh.status(f_it).deleted() ) if ( !mesh.status(*f_it).deleted() )
mesh.update_normal(f_it); mesh.update_normal(*f_it);
for (v_it = mesh.vertices_begin(); v_it != mesh.vertices_end(); ++v_it) for (v_it = mesh.vertices_begin(); v_it != mesh.vertices_end(); ++v_it)
if ( !mesh.status(v_it).deleted() ) if ( !mesh.status(*v_it).deleted() )
{ {
mesh.status(v_it).set_locked(false); mesh.status(*v_it).set_locked(false);
mesh.update_normal(v_it); mesh.update_normal(*v_it);
} }
} }
......
...@@ -293,7 +293,7 @@ int main(int argc, char *argv[] ) ...@@ -293,7 +293,7 @@ int main(int argc, char *argv[] )
timer.start(); timer.start();
MyMesh::VertexIter vit = mesh.vertices_begin(); MyMesh::VertexIter vit = mesh.vertices_begin();
for (; vit != mesh.vertices_end(); ++vit) for (; vit != mesh.vertices_end(); ++vit)
cog += mesh.point( vit ); cog += mesh.point( *vit );
timer.stop(); timer.stop();
nv = mesh.n_vertices(); nv = mesh.n_vertices();
cog *= 1.0f/mesh.n_vertices(); cog *= 1.0f/mesh.n_vertices();
...@@ -303,7 +303,7 @@ int main(int argc, char *argv[] ) ...@@ -303,7 +303,7 @@ int main(int argc, char *argv[] )
vit = mesh.vertices_begin(); vit = mesh.vertices_begin();
timer.cont(); timer.cont();
for (; vit != mesh.vertices_end(); ++vit) for (; vit != mesh.vertices_end(); ++vit)
mesh.set_point( vit , mesh.point( vit )-cog ); mesh.set_point( *vit , mesh.point( *vit )-cog );
timer.stop(); timer.stop();
nv += mesh.n_vertices(); nv += mesh.n_vertices();
} }
...@@ -323,7 +323,7 @@ int main(int argc, char *argv[] ) ...@@ -323,7 +323,7 @@ int main(int argc, char *argv[] )
timer.start(); timer.start();
MyMesh::VertexIter vit = mesh.vertices_begin(); MyMesh::VertexIter vit = mesh.vertices_begin();
for (; vit != mesh.vertices_end(); ++vit) for (; vit != mesh.vertices_end(); ++vit)
mesh.set_point( vit , mesh.point( vit ) + tvec.first ); mesh.set_point( *vit , mesh.point( *vit ) + tvec.first );
timer.stop(); timer.stop();
std::cout << " moved " << mesh.n_vertices() std::cout << " moved " << mesh.n_vertices()
<< " vertices in " << timer.as_string() << std::endl; << " vertices in " << timer.as_string() << std::endl;
...@@ -342,9 +342,9 @@ int main(int argc, char *argv[] ) ...@@ -342,9 +342,9 @@ int main(int argc, char *argv[] )
MyMesh::VertexIter vit = mesh.vertices_begin(); MyMesh::VertexIter vit = mesh.vertices_begin();
for (; vit != mesh.vertices_end(); ++vit) for (; vit != mesh.vertices_end(); ++vit)
{ {
mesh.set_color( vit , MyMesh::Color( std::min((int)(r+0.5),255), mesh.set_color( *vit , MyMesh::Color( std::min((int)(r+0.5),255),
std::min((int)(g+0.5),255), std::min((int)(g+0.5),255),
std::max((int)(b+0.5),0) ) ); std::max((int)(b+0.5),0) ) );
r += d; r += d;
g += d2; g += d2;
b -= d; b -= d;
......
...@@ -97,11 +97,12 @@ void ModAspectRatioT<MeshT>::initialize() { ...@@ -97,11 +97,12 @@ void ModAspectRatioT<MeshT>::initialize() {
typename Mesh::FVIter fv_it; typename Mesh::FVIter fv_it;
for (f_it = mesh_.faces_begin(); f_it != f_end; ++f_it) { for (f_it = mesh_.faces_begin(); f_it != f_end; ++f_it) {
typename Mesh::Point& p0 = mesh_.point(fv_it = mesh_.fv_iter(f_it)); fv_it = mesh_.fv_iter(*f_it);
typename Mesh::Point& p1 = mesh_.point(++fv_it); typename Mesh::Point& p0 = mesh_.point(*fv_it);
typename Mesh::Point& p2 = mesh_.point(++fv_it); typename Mesh::Point& p1 = mesh_.point(*(++fv_it));
typename Mesh::Point& p2 = mesh_.point(*(++fv_it));
mesh_.property(aspect_, f_it) = 1.0 / aspectRatio(p0, p1, p2); mesh_.property(aspect_, *f_it) = 1.0 / aspectRatio(p0, p1, p2);
} }
} }
...@@ -115,9 +116,10 @@ void ModAspectRatioT<MeshT>::preprocess_collapse(const CollapseInfo& _ci) { ...@@ -115,9 +116,10 @@ void ModAspectRatioT<MeshT>::preprocess_collapse(const CollapseInfo& _ci) {
for (typename Mesh::VFIter vf_it = mesh_.vf_iter(_ci.v0); vf_it.is_valid(); ++vf_it) { for (typename Mesh::VFIter vf_it = mesh_.vf_iter(_ci.v0); vf_it.is_valid(); ++vf_it) {
fh = *vf_it; fh = *vf_it;
if (fh != _ci.fl && fh != _ci.fr) { if (fh != _ci.fl && fh != _ci.fr) {
typename Mesh::Point& p0 = mesh_.point(fv_it = mesh_.fv_iter(fh)); fv_it = mesh_.fv_iter(fh);
typename Mesh::Point& p1 = mesh_.point(++fv_it); typename Mesh::Point& p0 = mesh_.point(*fv_it);
typename Mesh::Point& p2 = mesh_.point(++fv_it); typename Mesh::Point& p1 = mesh_.point(*(++fv_it));
typename Mesh::Point& p2 = mesh_.point(*(++fv_it));
mesh_.property(aspect_, fh) = 1.0 / aspectRatio(p0, p1, p2); mesh_.property(aspect_, fh) = 1.0 / aspectRatio(p0, p1, p2);
} }
......
...@@ -191,7 +191,7 @@ initialize() ...@@ -191,7 +191,7 @@ initialize()
typename Mesh::FIter f_it(mesh_.faces_begin()), f_end(mesh_.faces_end()); typename Mesh::FIter f_it(mesh_.faces_begin()), f_end(mesh_.faces_end());
for (; f_it!=f_end; ++f_it) for (; f_it!=f_end; ++f_it)
mesh_.property(points_, f_it).clear(); mesh_.property(points_, *f_it).clear();
} }
...@@ -242,9 +242,10 @@ collapse_priority(const CollapseInfo& _ci) ...@@ -242,9 +242,10 @@ collapse_priority(const CollapseInfo& _ci)
ok = false; ok = false;
for (fh_it=faces.begin(); !ok && fh_it!=fh_end; ++fh_it) { for (fh_it=faces.begin(); !ok && fh_it!=fh_end; ++fh_it) {
const Point& p0 = mesh_.point(fv_it=mesh_.cfv_iter(*fh_it)); fv_it=mesh_.cfv_iter(*fh_it);
const Point& p1 = mesh_.point(++fv_it); const Point& p0 = mesh_.point(*fv_it);
const Point& p2 = mesh_.point(++fv_it); const Point& p1 = mesh_.point(*(++fv_it));
const Point& p2 = mesh_.point(*(++fv_it));
if ( distPointTriangleSquared(*p_it, p0, p1, p2) <= sqr_tolerace) if ( distPointTriangleSquared(*p_it, p0, p1, p2) <= sqr_tolerace)
ok = true; ok = true;
...@@ -328,9 +329,10 @@ postprocess_collapse(const CollapseInfo& _ci) ...@@ -328,9 +329,10 @@ postprocess_collapse(const CollapseInfo& _ci)
emin = FLT_MAX; emin = FLT_MAX;
for (fh_it=faces.begin(); fh_it!=fh_end; ++fh_it) { for (fh_it=faces.begin(); fh_it!=fh_end; ++fh_it) {
const Point& p0 = mesh_.point(fv_it=mesh_.cfv_iter(*fh_it)); fv_it=mesh_.cfv_iter(*fh_it);
const Point& p1 = mesh_.point(++fv_it); const Point& p0 = mesh_.point(*fv_it);
const Point& p2 = mesh_.point(++fv_it); const Point& p1 = mesh_.point(*(++fv_it));
const Point& p2 = mesh_.point(*(++fv_it));
e = distPointTriangleSquared(*p_it, p0, p1, p2); e = distPointTriangleSquared(*p_it, p0, p1, p2);
if (e < emin) { if (e < emin) {
......
...@@ -137,7 +137,7 @@ public: ...@@ -137,7 +137,7 @@ public:
f_end = mesh_.faces_end(); f_end = mesh_.faces_end();
for (; f_it != f_end; ++f_it) for (; f_it != f_end; ++f_it)
mesh_.property(normal_cones_, f_it) = NormalCone(mesh_.normal(f_it)); mesh_.property(normal_cones_, *f_it) = NormalCone(mesh_.normal(*f_it));
} }
/** \brief Control normals when Decimating /** \brief Control normals when Decimating
...@@ -208,8 +208,8 @@ public: ...@@ -208,8 +208,8 @@ public:
// account for changed normals // account for changed normals
typename Mesh::VertexFaceIter vf_it(mesh_, _ci.v1); typename Mesh::VertexFaceIter vf_it(mesh_, _ci.v1);
for (; vf_it.is_valid(); ++vf_it) for (; vf_it.is_valid(); ++vf_it)
mesh_.property(normal_cones_, vf_it). mesh_.property(normal_cones_, *vf_it).
merge(NormalCone(mesh_.normal(vf_it))); merge(NormalCone(mesh_.normal(*vf_it)));
// normal cones of deleted triangles // normal cones of deleted triangles
......
...@@ -90,10 +90,10 @@ write( const std::string& _ofname ) ...@@ -90,10 +90,10 @@ write( const std::string& _ofname )
v_end=Base::mesh().vertices_end(); v_end=Base::mesh().vertices_end();
for (; v_it != v_end; ++v_it) for (; v_it != v_end; ++v_it)
if (!Base::mesh().status(v_it).deleted()) if (!Base::mesh().status(*v_it).deleted())
{ {
vhandles[i] = *v_it; vhandles[i] = *v_it;
Base::mesh().property( idx_, v_it ) = i; Base::mesh().property( idx_, *v_it ) = i;
++i; ++i;
} }
n_base_vertices = i; n_base_vertices = i;
...@@ -115,7 +115,7 @@ write( const std::string& _ofname ) ...@@ -115,7 +115,7 @@ write( const std::string& _ofname )
typename Mesh::ConstFaceIter f_it = Base::mesh().faces_begin(), typename Mesh::ConstFaceIter f_it = Base::mesh().faces_begin(),
f_end = Base::mesh().faces_end(); f_end = Base::mesh().faces_end();
for (; f_it != f_end; ++f_it) for (; f_it != f_end; ++f_it)
if (!Base::mesh().status(f_it).deleted()) if (!Base::mesh().status(*f_it).deleted())
++n_base_faces; ++n_base_faces;
// ---------------------------------------- write progressive mesh // ---------------------------------------- write progressive mesh
...@@ -149,13 +149,13 @@ write( const std::string& _ofname ) ...@@ -149,13 +149,13 @@ write( const std::string& _ofname )
// write base faces // write base faces
for (f_it=Base::mesh().faces_begin(); f_it != f_end; ++f_it) for (f_it=Base::mesh().faces_begin(); f_it != f_end; ++f_it)
{ {
if (!Base::mesh().status(f_it).deleted()) if (!Base::mesh().status(*f_it).deleted())
{ {
typename Mesh::ConstFaceVertexIter fv_it(Base::mesh(), *f_it); typename Mesh::ConstFaceVertexIter fv_it(Base::mesh(), *f_it);
IO::store( out, Base::mesh().property( idx_, fv_it ) ); IO::store( out, Base::mesh().property( idx_, *fv_it ) );
IO::store( out, Base::mesh().property( idx_, ++fv_it ) ); IO::store( out, Base::mesh().property( idx_, *(++fv_it )) );
IO::store( out, Base::mesh().property( idx_, ++fv_it ) ); IO::store( out, Base::mesh().property( idx_, *(++fv_it )) );
} }
} }
......
...@@ -127,14 +127,14 @@ class ModRoundnessT : public ModBaseT<MeshT> ...@@ -127,14 +127,14 @@ class ModRoundnessT : public ModBaseT<MeshT>
if ( min_r_ < 0.0 ) // continues mode if ( min_r_ < 0.0 ) // continues mode
{ {
C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(voh_it))); C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(*voh_it)));
fhC = Base::mesh().face_handle( *voh_it ); fhC = Base::mesh().face_handle( *voh_it );
for (++voh_it; voh_it.is_valid(); ++voh_it) for (++voh_it; voh_it.is_valid(); ++voh_it)
{ {
B = C; B = C;
fhB = fhC; fhB = fhC;
C = vector_cast<Vec3f>(Base::mesh().point(Base::mesh().to_vertex_handle(voh_it))); C = vector_cast<Vec3f>(Base::mesh().point(Base::mesh().to_vertex_handle(*voh_it)));
fhC = Base::mesh().face_handle( *voh_it ); fhC = Base::mesh().face_handle( *voh_it );
if ( fhB == _ci.fl || fhB == _ci.fr ) if ( fhB == _ci.fl || fhB == _ci.fr )
...@@ -150,14 +150,14 @@ class ModRoundnessT : public ModBaseT<MeshT> ...@@ -150,14 +150,14 @@ class ModRoundnessT : public ModBaseT<MeshT>
} }
else // binary mode else // binary mode
{ {
C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(voh_it))); C = vector_cast<Vec3f>(Base::mesh().point( Base::mesh().to_vertex_handle(*voh_it)));
fhC = Base::mesh().face_handle( *voh_it ); fhC = Base::mesh().face_handle( *voh_it );
for (++voh_it; voh_it.is_valid() && (priority==Base::LEGAL_COLLAPSE); ++voh_it) for (++voh_it; voh_it.is_valid() && (priority==Base::LEGAL_COLLAPSE); ++voh_it)
{ {
B = C; B = C;
fhB = fhC; fhB = fhC;
C = vector_cast<Vec3f>(Base::mesh().point(Base::mesh().to_vertex_handle(voh_it))); C = vector_cast<Vec3f>(Base::mesh().point(Base::mesh().to_vertex_handle(*voh_it)));
fhC = Base::mesh().face_handle( *voh_it ); fhC = Base::mesh().face_handle( *voh_it );
if ( fhB == _ci.fl || fhB == _ci.fr ) if ( fhB == _ci.fl || fhB == _ci.fr )
......
...@@ -104,16 +104,16 @@ compute_new_positions_C0() ...@@ -104,16 +104,16 @@ compute_new_positions_C0()
for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it) for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
{ {
if (this->is_active(v_it)) if (this->is_active(*v_it))
{ {
// compute umbrella // compute umbrella
u = zero; u = zero;
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it.is_valid(); ++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())); 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 *= 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 // damping
...@@ -146,43 +146,43 @@ compute_new_positions_C1() ...@@ -146,43 +146,43 @@ compute_new_positions_C1()
for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it) for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
{ {
u = zero; u = zero;
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it.is_valid(); ++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())); 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 *= 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));
Base::mesh_.property(umbrellas_, v_it) = u; Base::mesh_.property(umbrellas_, *v_it) = u;
} }
// 2nd pass: compute updates // 2nd pass: compute updates
for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it) for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
{ {
if (this->is_active(v_it)) if (this->is_active(*v_it))
{ {
uu = zero; uu = zero;
diag = 0.0; diag = 0.0;
for (vv_it=Base::mesh_.cvv_iter(v_it); vv_it.is_valid(); ++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())); w = this->weight(Base::mesh_.edge_handle(vv_it.current_halfedge_handle()));
uu -= Base::mesh_.property(umbrellas_, *vv_it); uu -= Base::mesh_.property(umbrellas_, *vv_it);
diag += (w * this->weight(*vv_it) + 1.0) * w; diag += (w * this->weight(*vv_it) + 1.0) * w;
} }
uu *= this->weight(v_it); uu *= this->weight(*v_it);
diag *= this->weight(v_it); diag *= this->weight(*v_it);
uu += Base::mesh_.property(umbrellas_, v_it); uu += Base::mesh_.property(umbrellas_, *v_it);
if (diag) uu *= 1.0/diag; if (diag) uu *= 1.0/diag;
// damping // damping
uu *= 0.25; uu *= 0.25;
// store new position // 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 -= uu; p -= uu;
this->set_new_position(v_it, p); this->set_new_position(*v_it, p);
} }
} }
} }
......
...@@ -140,7 +140,7 @@ compute_weights(LaplaceWeighting _weighting) ...@@ -140,7 +140,7 @@ compute_weights(LaplaceWeighting _weighting)
// init vertex weights // init vertex weights
for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it) for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
Base::mesh_.property(vertex_weights_, v_it) = 0.0; Base::mesh_.property(vertex_weights_, *v_it) = 0.0;
...@@ -156,9 +156,9 @@ compute_weights(LaplaceWeighting _weighting) ...@@ -156,9 +156,9 @@ compute_weights(LaplaceWeighting _weighting)
v0 = Base::mesh_.to_vertex_handle(heh0); v0 = Base::mesh_.to_vertex_handle(heh0);
v1 = Base::mesh_.to_vertex_handle(heh1); v1 = Base::mesh_.to_vertex_handle(heh1);
Base::mesh_.property(edge_weights_, e_it) = 1.0;