Developer Documentation
Loading...
Searching...
No Matches
MeshViewerWidgetT< M > Class Template Reference
Inheritance diagram for MeshViewerWidgetT< M >:
QGLViewerWidget DecimaterViewerWidget OpenMesh::VDPMSynthesizerViewerWidget

Public Types

typedef M Mesh
 
typedef OpenMesh::StripifierT< Mesh > MyStripifier
 
- Public Types inherited from QGLViewerWidget
typedef QGLWidget Super
 

Public Member Functions

 MeshViewerWidgetT (QWidget *_parent=0)
 default constructor
 
 ~MeshViewerWidgetT ()
 destructor
 
virtual bool open_mesh (const char *_filename, OpenMesh::IO::Options _opt)
 open mesh
 
virtual bool open_texture (const char *_filename)
 load texture
 
bool set_texture (QImage &_texsrc)
 
void enable_strips ()
 
void disable_strips ()
 
Mesh & mesh ()
 
const Mesh & mesh () const
 
- Public Member Functions inherited from QGLViewerWidget
 QGLViewerWidget (QWidget *_parent=0)
 
void set_scene_pos (const OpenMesh::Vec3f &_center, float _radius)
 
void view_all ()
 
QAction * add_draw_mode (const std::string &_s)
 add draw mode to popup menu, and return the QAction created
 
void del_draw_mode (const std::string &_s)
 delete draw mode from popup menu
 
const std::string & current_draw_mode () const
 
float radius () const
 
const OpenMesh::Vec3fcenter () const
 
const GLdouble * modelview_matrix () const
 
const GLdouble * projection_matrix () const
 
float fovy () const
 
QAction * findAction (const char *name)
 
void addAction (QAction *action, const char *name)
 
void removeAction (const char *name)
 
void removeAction (QAction *action)
 

Protected Member Functions

virtual void draw_scene (const std::string &_draw_mode) override
 inherited drawing method
 
virtual void draw_openmesh (const std::string &_drawmode)
 draw the mesh
 
void glVertex (const typename Mesh::VertexHandle _vh)
 
void glVertex (const typename Mesh::Point &_p)
 
void glNormal (const typename Mesh::VertexHandle _vh)
 
void glTexCoord (const typename Mesh::VertexHandle _vh)
 
void glColor (const typename Mesh::VertexHandle _vh)
 
void glNormal (const typename Mesh::FaceHandle _fh)
 
void glColor (const typename Mesh::FaceHandle _fh)
 
void glMaterial (const typename Mesh::FaceHandle _fh, int _f=GL_FRONT_AND_BACK, int _m=GL_DIFFUSE)
 
void compute_strips (void)
 
virtual void keyPressEvent (QKeyEvent *_event) override
 
- Protected Member Functions inherited from QGLViewerWidget
double performance (void)
 
void setDefaultMaterial (void)
 
void setDefaultLight (void)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseReleaseEvent (QMouseEvent *)
 
virtual void mouseMoveEvent (QMouseEvent *)
 
virtual void wheelEvent (QWheelEvent *)
 

Protected Attributes

bool f_strips_
 
GLuint tex_id_
 
GLint tex_mode_
 
OpenMesh::IO::Options opt_
 
Mesh mesh_
 
MyStripifier strips_
 
bool use_color_
 
bool show_vnormals_
 
bool show_fnormals_
 
float normal_scale_
 
OpenMesh::FPropHandleT< typename Mesh::Pointfp_normal_base_
 

Detailed Description

template<typename M>
class MeshViewerWidgetT< M >

Definition at line 73 of file MeshViewerWidgetT.hh.

Member Typedef Documentation

◆ Mesh

template<typename M >
typedef M MeshViewerWidgetT< M >::Mesh

Definition at line 78 of file MeshViewerWidgetT.hh.

◆ MyStripifier

template<typename M >
typedef OpenMesh::StripifierT<Mesh> MeshViewerWidgetT< M >::MyStripifier

Definition at line 79 of file MeshViewerWidgetT.hh.

Constructor & Destructor Documentation

◆ MeshViewerWidgetT()

template<typename M >
MeshViewerWidgetT< M >::MeshViewerWidgetT ( QWidget *  _parent = 0)
inlineexplicit

default constructor

Definition at line 83 of file MeshViewerWidgetT.hh.

◆ ~MeshViewerWidgetT()

template<typename M >
MeshViewerWidgetT< M >::~MeshViewerWidgetT ( )
inline

destructor

Definition at line 102 of file MeshViewerWidgetT.hh.

Member Function Documentation

◆ compute_strips()

template<typename M >
void MeshViewerWidgetT< M >::compute_strips ( void  )
inlineprotected

Definition at line 166 of file MeshViewerWidgetT.hh.

◆ disable_strips()

template<typename M >
void MeshViewerWidgetT< M >::disable_strips ( )

Definition at line 710 of file MeshViewerWidgetT_impl.hh.

◆ draw_openmesh()

template<typename M >
void MeshViewerWidgetT< M >::draw_openmesh ( const std::string &  _drawmode)
protectedvirtual

draw the mesh

Definition at line 284 of file MeshViewerWidgetT_impl.hh.

◆ draw_scene()

template<typename M >
void MeshViewerWidgetT< M >::draw_scene ( const std::string &  _draw_mode)
overrideprotectedvirtual

inherited drawing method

Reimplemented from QGLViewerWidget.

Reimplemented in OpenMesh::VDPMSynthesizerViewerWidget.

Definition at line 572 of file MeshViewerWidgetT_impl.hh.

◆ enable_strips()

template<typename M >
void MeshViewerWidgetT< M >::enable_strips ( )

Definition at line 696 of file MeshViewerWidgetT_impl.hh.

◆ glColor() [1/2]

template<typename M >
void MeshViewerWidgetT< M >::glColor ( const typename Mesh::FaceHandle  _fh)
inlineprotected

Definition at line 151 of file MeshViewerWidgetT.hh.

◆ glColor() [2/2]

template<typename M >
void MeshViewerWidgetT< M >::glColor ( const typename Mesh::VertexHandle  _vh)
inlineprotected

Definition at line 143 of file MeshViewerWidgetT.hh.

◆ glMaterial()

template<typename M >
void MeshViewerWidgetT< M >::glMaterial ( const typename Mesh::FaceHandle  _fh,
int  _f = GL_FRONT_AND_BACK,
int  _m = GL_DIFFUSE 
)
inlineprotected

Definition at line 154 of file MeshViewerWidgetT.hh.

◆ glNormal() [1/2]

template<typename M >
void MeshViewerWidgetT< M >::glNormal ( const typename Mesh::FaceHandle  _fh)
inlineprotected

Definition at line 148 of file MeshViewerWidgetT.hh.

◆ glNormal() [2/2]

template<typename M >
void MeshViewerWidgetT< M >::glNormal ( const typename Mesh::VertexHandle  _vh)
inlineprotected

Definition at line 137 of file MeshViewerWidgetT.hh.

◆ glTexCoord()

template<typename M >
void MeshViewerWidgetT< M >::glTexCoord ( const typename Mesh::VertexHandle  _vh)
inlineprotected

Definition at line 140 of file MeshViewerWidgetT.hh.

◆ glVertex() [1/2]

template<typename M >
void MeshViewerWidgetT< M >::glVertex ( const typename Mesh::Point _p)
inlineprotected

Definition at line 134 of file MeshViewerWidgetT.hh.

◆ glVertex() [2/2]

template<typename M >
void MeshViewerWidgetT< M >::glVertex ( const typename Mesh::VertexHandle  _vh)
inlineprotected

Definition at line 131 of file MeshViewerWidgetT.hh.

◆ keyPressEvent()

template<typename M >
void MeshViewerWidgetT< M >::keyPressEvent ( QKeyEvent *  _event)
overrideprotectedvirtual

Reimplemented from QGLViewerWidget.

Definition at line 728 of file MeshViewerWidgetT_impl.hh.

◆ mesh() [1/2]

template<typename M >
Mesh & MeshViewerWidgetT< M >::mesh ( )
inline

Definition at line 117 of file MeshViewerWidgetT.hh.

◆ mesh() [2/2]

template<typename M >
const Mesh & MeshViewerWidgetT< M >::mesh ( ) const
inline

Definition at line 118 of file MeshViewerWidgetT.hh.

◆ open_mesh()

template<typename M >
bool MeshViewerWidgetT< M >::open_mesh ( const char *  _filename,
OpenMesh::IO::Options  _opt 
)
virtual

open mesh

Reimplemented in DecimaterViewerWidget, and MeshViewerWidgetSubdivider.

Definition at line 75 of file MeshViewerWidgetT_impl.hh.

◆ open_texture()

template<typename M >
bool MeshViewerWidgetT< M >::open_texture ( const char *  _filename)
virtual

load texture

Definition at line 206 of file MeshViewerWidgetT_impl.hh.

◆ set_texture()

template<typename M >
bool MeshViewerWidgetT< M >::set_texture ( QImage &  _texsrc)

Definition at line 222 of file MeshViewerWidgetT_impl.hh.

Member Data Documentation

◆ f_strips_

template<typename M >
bool MeshViewerWidgetT< M >::f_strips_
protected

Definition at line 181 of file MeshViewerWidgetT.hh.

◆ fp_normal_base_

template<typename M >
OpenMesh::FPropHandleT< typename Mesh::Point > MeshViewerWidgetT< M >::fp_normal_base_
protected

Definition at line 192 of file MeshViewerWidgetT.hh.

◆ mesh_

template<typename M >
Mesh MeshViewerWidgetT< M >::mesh_
protected

Definition at line 186 of file MeshViewerWidgetT.hh.

◆ normal_scale_

template<typename M >
float MeshViewerWidgetT< M >::normal_scale_
protected

Definition at line 191 of file MeshViewerWidgetT.hh.

◆ opt_

template<typename M >
OpenMesh::IO::Options MeshViewerWidgetT< M >::opt_
protected

Definition at line 184 of file MeshViewerWidgetT.hh.

◆ show_fnormals_

template<typename M >
bool MeshViewerWidgetT< M >::show_fnormals_
protected

Definition at line 190 of file MeshViewerWidgetT.hh.

◆ show_vnormals_

template<typename M >
bool MeshViewerWidgetT< M >::show_vnormals_
protected

Definition at line 189 of file MeshViewerWidgetT.hh.

◆ strips_

template<typename M >
MyStripifier MeshViewerWidgetT< M >::strips_
protected

Definition at line 187 of file MeshViewerWidgetT.hh.

◆ tex_id_

template<typename M >
GLuint MeshViewerWidgetT< M >::tex_id_
protected

Definition at line 182 of file MeshViewerWidgetT.hh.

◆ tex_mode_

template<typename M >
GLint MeshViewerWidgetT< M >::tex_mode_
protected

Definition at line 183 of file MeshViewerWidgetT.hh.

◆ use_color_

template<typename M >
bool MeshViewerWidgetT< M >::use_color_
protected

Definition at line 188 of file MeshViewerWidgetT.hh.


The documentation for this class was generated from the following files: