Next set
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@908 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -165,7 +165,7 @@ MeshViewerWidgetT<M>::open_mesh(const char* _filename, IO::Options _opt)
|
||||
{
|
||||
typename Mesh::Point v(0,0,0);
|
||||
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 += OpenMesh::vector_cast<typename Mesh::Normal>(mesh_.point(*fv_it));
|
||||
v *= 1.0f/3.0f;
|
||||
mesh_.property( fp_normal_base_, f_it ) = v;
|
||||
}
|
||||
@@ -323,11 +323,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
||||
for (; fIt!=fEnd; ++fIt)
|
||||
{
|
||||
fvIt = mesh_.cfv_iter(*fIt);
|
||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||
glVertex3fv( &mesh_.point(*fvIt)[0] );
|
||||
++fvIt;
|
||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||
glVertex3fv( &mesh_.point(*fvIt)[0] );
|
||||
++fvIt;
|
||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||
glVertex3fv( &mesh_.point(*fvIt)[0] );
|
||||
}
|
||||
glEnd();
|
||||
}
|
||||
@@ -340,11 +340,11 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
||||
glNormal3fv( &mesh_.normal(fIt)[0] );
|
||||
|
||||
fvIt = mesh_.cfv_iter(*fIt);
|
||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||
glVertex3fv( &mesh_.point(*fvIt)[0] );
|
||||
++fvIt;
|
||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||
glVertex3fv( &mesh_.point(*fvIt)[0] );
|
||||
++fvIt;
|
||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||
glVertex3fv( &mesh_.point(*fvIt)[0] );
|
||||
}
|
||||
glEnd();
|
||||
|
||||
|
||||
@@ -358,10 +358,9 @@ int main(int argc, char **argv)
|
||||
face_quality = 0.0;
|
||||
valence = 0;
|
||||
|
||||
for (ff_it = mesh.ff_iter(*f_it); ff_it; ++ff_it) {
|
||||
for (ff_it = mesh.ff_iter(*f_it); ff_it.is_valid(); ++ff_it) {
|
||||
|
||||
temp_quality = OpenMesh::dot( mesh.normal(f_it),
|
||||
mesh.normal(ff_it) );
|
||||
temp_quality = OpenMesh::dot( mesh.normal(*f_it), mesh.normal(*ff_it) );
|
||||
|
||||
if (temp_quality >= 1.0)
|
||||
temp_quality = .99;
|
||||
|
||||
@@ -857,7 +857,7 @@ compute_screen_space_error(VHierarchyNodeHandle node_handle, VHierarchyNodeHandl
|
||||
residual = lp - mesh_.point(vh);
|
||||
min_distance = residual.length();
|
||||
|
||||
for (vf_it=mesh_.vf_iter(vh); vf_it; ++vf_it)
|
||||
for (vf_it=mesh_.vf_iter(vh); vf_it.is_valid(); ++vf_it)
|
||||
{
|
||||
heh = mesh_.halfedge_handle(*vf_it);
|
||||
tri[0] = mesh_.point(mesh_.to_vertex_handle(heh));
|
||||
|
||||
@@ -367,9 +367,9 @@ int main(int argc, char *argv[] )
|
||||
MyMesh::FaceIter it = mesh.faces_begin();
|
||||
for (; it != mesh.faces_end(); ++it)
|
||||
{
|
||||
mesh.set_color( it , 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( *it , MyMesh::Color( std::min((int)(r+0.5),255),
|
||||
std::min((int)(g+0.5),255),
|
||||
std::max((int)(b+0.5),0) ) );
|
||||
r += d2;
|
||||
// g += d2;
|
||||
b -= d;
|
||||
|
||||
Reference in New Issue
Block a user