OM3 compat
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1198 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -152,7 +152,7 @@ drawFaces(bool _send_normals, OpenMesh::GenProg::Bool2Type<true>)
|
|||||||
for (; f_it!=f_end; ++f_it)
|
for (; f_it!=f_end; ++f_it)
|
||||||
{
|
{
|
||||||
glNormal(mesh_->normal(f_it));
|
glNormal(mesh_->normal(f_it));
|
||||||
fv_it = mesh_->cfv_iter(f_it.handle());
|
fv_it = mesh_->cfv_iter(*f_it);
|
||||||
glVertex(mesh_->point(fv_it));
|
glVertex(mesh_->point(fv_it));
|
||||||
++fv_it;
|
++fv_it;
|
||||||
glVertex(mesh_->point(fv_it));
|
glVertex(mesh_->point(fv_it));
|
||||||
@@ -166,7 +166,7 @@ drawFaces(bool _send_normals, OpenMesh::GenProg::Bool2Type<true>)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; f_it!=f_end; ++f_it)
|
for (; f_it!=f_end; ++f_it)
|
||||||
{
|
{
|
||||||
fv_it = mesh_->cfv_iter(f_it.handle());
|
fv_it = mesh_->cfv_iter(*f_it);
|
||||||
glVertex(mesh_->point(fv_it));
|
glVertex(mesh_->point(fv_it));
|
||||||
++fv_it;
|
++fv_it;
|
||||||
glVertex(mesh_->point(fv_it));
|
glVertex(mesh_->point(fv_it));
|
||||||
@@ -198,7 +198,7 @@ drawFaces(bool _send_normals, OpenMesh::GenProg::Bool2Type<false>)
|
|||||||
{
|
{
|
||||||
glBegin(GL_POLYGON);
|
glBegin(GL_POLYGON);
|
||||||
glNormal(mesh_->normal(f_it));
|
glNormal(mesh_->normal(f_it));
|
||||||
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it.is_valid() ++fv_it)
|
for (fv_it=mesh_->cfv_iter(*f_it); fv_it.is_valid() ++fv_it)
|
||||||
glVertex(mesh_->point(fv_it));
|
glVertex(mesh_->point(fv_it));
|
||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ drawFaces(bool _send_normals, OpenMesh::GenProg::Bool2Type<false>)
|
|||||||
for (; f_it!=f_end; ++f_it)
|
for (; f_it!=f_end; ++f_it)
|
||||||
{
|
{
|
||||||
glBegin(GL_POLYGON);
|
glBegin(GL_POLYGON);
|
||||||
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it.is_valid() ++fv_it)
|
for (fv_it=mesh_->cfv_iter(*f_it); fv_it.is_valid() ++fv_it)
|
||||||
glVertex(mesh_->point(fv_it));
|
glVertex(mesh_->point(fv_it));
|
||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
@@ -250,7 +250,7 @@ genPrimitives(SoAction* _action, OpenMesh::GenProg::Bool2Type<true>)
|
|||||||
{
|
{
|
||||||
pv.setNormal(sbvec3f(mesh_->normal(f_it)));
|
pv.setNormal(sbvec3f(mesh_->normal(f_it)));
|
||||||
|
|
||||||
fv_it = mesh_->cfv_iter(f_it.handle());
|
fv_it = mesh_->cfv_iter(*f_it);
|
||||||
|
|
||||||
pv.setPoint(sbvec3f(mesh_->point(fv_it)));
|
pv.setPoint(sbvec3f(mesh_->point(fv_it)));
|
||||||
shapeVertex(&pv);
|
shapeVertex(&pv);
|
||||||
@@ -290,7 +290,7 @@ genPrimitives(SoAction* _action, OpenMesh::GenProg::Bool2Type<false>)
|
|||||||
|
|
||||||
pv.setNormal(sbvec3f(mesh_->normal(f_it)));
|
pv.setNormal(sbvec3f(mesh_->normal(f_it)));
|
||||||
|
|
||||||
for (fv_it=mesh_->cfv_iter(f_it.handle()); fv_it.is_valid() ++fv_it)
|
for (fv_it=mesh_->cfv_iter(*f_it); fv_it.is_valid() ++fv_it)
|
||||||
{
|
{
|
||||||
pv.setPoint(sbvec3f(mesh_->point(fv_it)));
|
pv.setPoint(sbvec3f(mesh_->point(fv_it)));
|
||||||
shapeVertex(&pv);
|
shapeVertex(&pv);
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
@@ -293,7 +293,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
{
|
{
|
||||||
glNormal3fv( &mesh_.normal(fIt)[0] );
|
glNormal3fv( &mesh_.normal(fIt)[0] );
|
||||||
|
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
@@ -326,7 +326,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
@@ -362,7 +362,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
@@ -388,9 +388,9 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
glColor( fIt.handle() );
|
glColor( *fIt );
|
||||||
|
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
|
|||||||
@@ -137,14 +137,14 @@ void VDPMClientViewerWidget::mesh_coloring()
|
|||||||
|
|
||||||
for (; vIt!=vEnd; ++vIt)
|
for (; vIt!=vEnd; ++vIt)
|
||||||
{
|
{
|
||||||
node_handle = mesh_.data(vIt.handle()).vhierarchy_node_handle();
|
node_handle = mesh_.data(*vIt).vhierarchy_node_handle();
|
||||||
ratio = vhierarchy_.node(node_handle).ratio();
|
ratio = vhierarchy_.node(node_handle).ratio();
|
||||||
|
|
||||||
r = (unsigned char) ((1.0f - ratio) * myYellow[0] + ratio * myBlue[0]);
|
r = (unsigned char) ((1.0f - ratio) * myYellow[0] + ratio * myBlue[0]);
|
||||||
g = (unsigned char) ((1.0f - ratio) * myYellow[1] + ratio * myBlue[1]);
|
g = (unsigned char) ((1.0f - ratio) * myYellow[1] + ratio * myBlue[1]);
|
||||||
b = (unsigned char) ((1.0f - ratio) * myYellow[2] + ratio * myBlue[2]);
|
b = (unsigned char) ((1.0f - ratio) * myYellow[2] + ratio * myBlue[2]);
|
||||||
|
|
||||||
mesh_.set_color(vIt.handle(), OpenMesh::Vec3uc(r,g,b));
|
mesh_.set_color(*vIt, OpenMesh::Vec3uc(r,g,b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
@@ -292,7 +292,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
{
|
{
|
||||||
glNormal3fv( &mesh_.normal(fIt)[0] );
|
glNormal3fv( &mesh_.normal(fIt)[0] );
|
||||||
|
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glVertex3fv( &mesh_.point(fvIt)[0] );
|
glVertex3fv( &mesh_.point(fvIt)[0] );
|
||||||
@@ -325,7 +325,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
@@ -361,7 +361,7 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
@@ -387,9 +387,9 @@ MeshViewerWidgetT<M>::draw_openmesh(const std::string& _draw_mode)
|
|||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
for (; fIt!=fEnd; ++fIt)
|
for (; fIt!=fEnd; ++fIt)
|
||||||
{
|
{
|
||||||
glColor( fIt.handle() );
|
glColor( *fIt );
|
||||||
|
|
||||||
fvIt = mesh_.cfv_iter(fIt.handle());
|
fvIt = mesh_.cfv_iter(*fIt);
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
++fvIt;
|
++fvIt;
|
||||||
glArrayElement(fvIt->idx());
|
glArrayElement(fvIt->idx());
|
||||||
|
|||||||
@@ -136,14 +136,14 @@ void VDPMClientViewerWidget::mesh_coloring()
|
|||||||
|
|
||||||
for (; vIt!=vEnd; ++vIt)
|
for (; vIt!=vEnd; ++vIt)
|
||||||
{
|
{
|
||||||
node_handle = mesh_.data(vIt.handle()).vhierarchy_node_handle();
|
node_handle = mesh_.data(*vIt).vhierarchy_node_handle();
|
||||||
ratio = vhierarchy_.node(node_handle).ratio();
|
ratio = vhierarchy_.node(node_handle).ratio();
|
||||||
|
|
||||||
r = (unsigned char) ((1.0f - ratio) * myYellow[0] + ratio * myBlue[0]);
|
r = (unsigned char) ((1.0f - ratio) * myYellow[0] + ratio * myBlue[0]);
|
||||||
g = (unsigned char) ((1.0f - ratio) * myYellow[1] + ratio * myBlue[1]);
|
g = (unsigned char) ((1.0f - ratio) * myYellow[1] + ratio * myBlue[1]);
|
||||||
b = (unsigned char) ((1.0f - ratio) * myYellow[2] + ratio * myBlue[2]);
|
b = (unsigned char) ((1.0f - ratio) * myYellow[2] + ratio * myBlue[2]);
|
||||||
|
|
||||||
mesh_.set_color(vIt.handle(), OpenMesh::Vec3uc(r,g,b));
|
mesh_.set_color(*vIt, OpenMesh::Vec3uc(r,g,b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user