Finished except unittests
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@910 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -150,11 +150,11 @@ ProgViewerWidget::open_prog_mesh(const char* _filename)
|
||||
|
||||
MyMesh::Point bbMin, bbMax;
|
||||
|
||||
bbMin = bbMax = mesh_.point(vIt);
|
||||
bbMin = bbMax = mesh_.point(*vIt);
|
||||
for (; vIt!=vEnd; ++vIt)
|
||||
{
|
||||
bbMin.minimize(mesh_.point(vIt));
|
||||
bbMax.maximize(mesh_.point(vIt));
|
||||
bbMin.minimize(mesh_.point(*vIt));
|
||||
bbMax.maximize(mesh_.point(*vIt));
|
||||
}
|
||||
|
||||
// set center and radius
|
||||
|
||||
@@ -306,7 +306,7 @@ int main(int argc, char **argv)
|
||||
|
||||
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;
|
||||
fh = *f_it;
|
||||
timer2.start();
|
||||
@@ -317,7 +317,7 @@ int main(int argc, char **argv)
|
||||
|
||||
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;
|
||||
timer2.cont();
|
||||
subdivider.refine(vh);
|
||||
@@ -420,8 +420,8 @@ int main(int argc, char **argv)
|
||||
for (MyMesh::VertexIter v_it = mesh.vertices_begin();
|
||||
v_it != mesh.vertices_end(); ++v_it)
|
||||
{
|
||||
if (mesh.data(v_it).state() > max_level)
|
||||
max_level = mesh.data(v_it).state();
|
||||
if (mesh.data(*v_it).state() > max_level)
|
||||
max_level = mesh.data(*v_it).state();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -430,11 +430,11 @@ open_prog_mesh(const std::string& _filename)
|
||||
|
||||
Mesh::Point bbMin, bbMax;
|
||||
|
||||
bbMin = bbMax = mesh_.point(vIt);
|
||||
bbMin = bbMax = mesh_.point(*vIt);
|
||||
for (; vIt!=vEnd; ++vIt)
|
||||
{
|
||||
bbMin.minimize(mesh_.point(vIt));
|
||||
bbMax.maximize(mesh_.point(vIt));
|
||||
bbMin.minimize(mesh_.point(*vIt));
|
||||
bbMax.maximize(mesh_.point(*vIt));
|
||||
}
|
||||
|
||||
// info
|
||||
@@ -661,7 +661,7 @@ vdpm_analysis()
|
||||
for (h_it=mesh_.halfedges_begin(); h_it!=mesh_.halfedges_end(); ++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)
|
||||
|
||||
@@ -539,11 +539,11 @@ open_vd_prog_mesh(const char* _filename)
|
||||
|
||||
VDPMMesh::Point bbMin, bbMax;
|
||||
|
||||
bbMin = bbMax = mesh_.point(vIt);
|
||||
bbMin = bbMax = mesh_.point(*vIt);
|
||||
for (; vIt!=vEnd; ++vIt)
|
||||
{
|
||||
bbMin.minimize(mesh_.point(vIt));
|
||||
bbMax.maximize(mesh_.point(vIt));
|
||||
bbMin.minimize(mesh_.point(*vIt));
|
||||
bbMax.maximize(mesh_.point(*vIt));
|
||||
}
|
||||
|
||||
// set center and radius
|
||||
|
||||
@@ -321,14 +321,14 @@ int main(int argc, char **argv)
|
||||
Mesh::FaceIter f_it;
|
||||
|
||||
for (f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it)
|
||||
if ( !mesh.status(f_it).deleted() )
|
||||
mesh.update_normal(f_it);
|
||||
if ( !mesh.status(*f_it).deleted() )
|
||||
mesh.update_normal(*f_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.update_normal(v_it);
|
||||
mesh.status(*v_it).set_locked(false);
|
||||
mesh.update_normal(*v_it);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ int main(int argc, char *argv[] )
|
||||
timer.start();
|
||||
MyMesh::VertexIter vit = mesh.vertices_begin();
|
||||
for (; vit != mesh.vertices_end(); ++vit)
|
||||
cog += mesh.point( vit );
|
||||
cog += mesh.point( *vit );
|
||||
timer.stop();
|
||||
nv = mesh.n_vertices();
|
||||
cog *= 1.0f/mesh.n_vertices();
|
||||
@@ -303,7 +303,7 @@ int main(int argc, char *argv[] )
|
||||
vit = mesh.vertices_begin();
|
||||
timer.cont();
|
||||
for (; vit != mesh.vertices_end(); ++vit)
|
||||
mesh.set_point( vit , mesh.point( vit )-cog );
|
||||
mesh.set_point( *vit , mesh.point( *vit )-cog );
|
||||
timer.stop();
|
||||
nv += mesh.n_vertices();
|
||||
}
|
||||
@@ -323,7 +323,7 @@ int main(int argc, char *argv[] )
|
||||
timer.start();
|
||||
MyMesh::VertexIter vit = mesh.vertices_begin();
|
||||
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();
|
||||
std::cout << " moved " << mesh.n_vertices()
|
||||
<< " vertices in " << timer.as_string() << std::endl;
|
||||
@@ -342,9 +342,9 @@ int main(int argc, char *argv[] )
|
||||
MyMesh::VertexIter vit = mesh.vertices_begin();
|
||||
for (; vit != mesh.vertices_end(); ++vit)
|
||||
{
|
||||
mesh.set_color( vit , MyMesh::Color( std::min((int)(r+0.5),255),
|
||||
std::min((int)(g+0.5),255),
|
||||
std::max((int)(b+0.5),0) ) );
|
||||
mesh.set_color( *vit , MyMesh::Color( std::min((int)(r+0.5),255),
|
||||
std::min((int)(g+0.5),255),
|
||||
std::max((int)(b+0.5),0) ) );
|
||||
r += d;
|
||||
g += d2;
|
||||
b -= d;
|
||||
|
||||
Reference in New Issue
Block a user