51 #include <OpenMesh/Core/IO/MeshIO.hh> 52 #include <OpenMesh/Core/IO/Options.hh> 53 #include <OpenMesh/Core/Utils/GenProg.hh> 54 #include <OpenMesh/Core/Utils/color_cast.hh> 56 #include <OpenMesh/Tools/Utils/StripifierT.hh> 58 #include <OpenMesh/Apps/QtViewer/QGLViewerWidget.hh> 84 tex_mode_(GL_MODULATE),
87 show_vnormals_(false),
88 show_fnormals_(false),
93 #if defined(OM_USE_OSG) && OM_USE_OSG 108 bool set_texture( QImage& _texsrc );
110 void enable_strips();
111 void disable_strips();
114 Mesh& mesh() {
return mesh_; }
115 const Mesh& mesh()
const {
return mesh_; }
120 virtual void draw_scene(
const std::string& _draw_mode)
override;
129 { glVertex3fv( &mesh_.point( _vh )[0] ); }
132 { glVertex3fv( &_p[0] ); }
135 { glNormal3fv( &mesh_.normal( _vh )[0] ); }
138 { glTexCoord2fv( &mesh_.texcoord(_vh)[0] ); }
141 { glColor3ubv( &mesh_.color(_vh)[0] ); }
145 void glNormal(
const typename Mesh::FaceHandle _fh )
146 { glNormal3fv( &mesh_.normal( _fh )[0] ); }
148 void glColor(
const typename Mesh::FaceHandle _fh )
149 { glColor3ubv( &mesh_.color(_fh)[0] ); }
151 void glMaterial(
const typename Mesh::FaceHandle _fh,
152 int _f=GL_FRONT_AND_BACK,
int _m=GL_DIFFUSE )
157 glMaterialfv(_f, _m, &m[0]);
163 void compute_strips(
void)
174 virtual void keyPressEvent( QKeyEvent* _event)
override;
184 MyStripifier strips_;
194 #if defined(OM_INCLUDE_TEMPLATES) 195 # define OPENMESH_MESHVIEWERWIDGET_TEMPLATES 196 # include "MeshViewerWidgetT_impl.hh"
Kernel::Point Point
Coordinate type.
void clear()
delete all strips
size_t stripify()
Compute triangle strips, returns number of strips.
Set options for reader/writer modules.
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.