Inherited by MeshProcessingViewer, Viewer, Viewer, Viewer, Viewer, Viewer, Viewer, and Viewer.
|
| MeshViewer (const char *title, int width, int height, bool showgui=true) |
| constructor More...
|
|
| ~MeshViewer () override |
| destructor More...
|
|
virtual void | load_mesh (const char *filename) |
| load a mesh from file filename More...
|
|
void | load_matcap (const char *filename) |
| load a matcap texture from file filename More...
|
|
void | load_texture (const char *filename, GLint format=GL_RGB, GLint min_filter=GL_LINEAR_MIPMAP_LINEAR, GLint mag_filter=GL_LINEAR, GLint wrap=GL_CLAMP_TO_EDGE) |
| load a texture from file filename More...
|
|
virtual void | update_mesh () |
| update mesh normals and all buffers for OpenGL rendering. More...
|
|
void | draw (const std::string &draw_mode) override |
| draw the scene in different draw modes More...
|
|
void | process_imgui () override |
| handle ImGUI interface More...
|
|
void | keyboard (int key, int code, int action, int mod) override |
| this function handles keyboard events More...
|
|
Vertex | pick_vertex (int x, int y) |
| get vertex closest to 3D position Distributed under the mouse cursor More...
|
|
| TrackballViewer (const char *title, int width, int height, bool showgui=true) |
| constructor More...
|
|
| ~TrackballViewer () override |
| destructor More...
|
|
void | set_scene (const vec3 ¢er, float radius) |
| define the center and radius of the scene/ used for trackball rotation More...
|
|
void | view_all () |
| adjust camera such that the whole scene (defined by set_scene()) is visible More...
|
|
| Window (const char *title, int width, int height, bool showgui=true) |
| constructor More...
|
|
virtual | ~Window () |
| destructor More...
|
|
int | run () |
| main window loop More...
|
|
|
void | display () override |
| this function is called when the scene has to be rendered. More...
|
|
void | keyboard (int key, int code, int action, int mods) override |
| this function handles keyboard events More...
|
|
void | mouse (int button, int action, int mods) override |
| this function handles mouse button events More...
|
|
void | motion (double xpos, double ypos) override |
| this function handles mouse motion (passive/active position) More...
|
|
void | scroll (double xoffset, double yoffset) override |
| this function handles mouse scroll events More...
|
|
void | resize (int width, int height) override |
| this function is called if the window is resized More...
|
|
void | clear_draw_modes () |
| reset the list of draw modes More...
|
|
unsigned int | add_draw_mode (const std::string &drawMode) |
| add a draw mode More...
|
|
void | set_draw_mode (const std::string &drawMode) |
| activate a draw mode More...
|
|
virtual void | init () |
| initialize all OpenGL states More...
|
|
void | rotation (int x, int y) |
| turn a mouse event into a rotation around the scene center. calls rotate(). More...
|
|
void | translation (int x, int y) |
| turn a mouse event into a translation in the view plane. calls translate(). More...
|
|
void | zoom (int x, int y) |
| turn a mouse event into a zoom, i.e., translation in z-direction. calls translate(). More...
|
|
bool | pick (vec3 &result) |
| get 3D position under the mouse cursor More...
|
|
bool | pick (int x, int y, vec3 &result) |
| get 3D position of 2D position (x,y) More...
|
|
void | fly_to (int x, int y) |
| fly toward the position Distributed under the mouse cursor and set rotation center to it More...
|
|
void | translate (const vec3 &trans) |
| translate the scene and update modelview matrix More...
|
|
void | rotate (const vec3 &axis, float angle) |
| rotate the scene (around its center) and update modelview matrix More...
|
|
bool | map_to_sphere (const ivec2 &point, vec3 &result) |
| virtual trackball: map 2D screen point to unit sphere. used by rotate(). More...
|
|
virtual void | character (unsigned int) |
| this function handles unicode character events More...
|
|
virtual void | do_processing () |
| this function is called just before rendering More...
|
|
void | init_imgui () |
| setup ImGUI user interface More...
|
|
void | scale_imgui (float scale) |
| scale ImGUI elements and font More...
|
|
bool | show_imgui () const |
| is ImGUI visible or hidden? More...
|
|
void | show_imgui (bool b) |
| show or hide ImGUI More...
|
|
void | clear_help_items () |
| clear help items More...
|
|
void | add_help_item (std::string key, std::string description, int position=-1) |
| add key binding (or general action description) More...
|
|
void | show_help () |
| show ImGUI help dialog More...
|
|
void | screenshot () |
| take a screenshot, save it to title-n.png using the window title and an incremented number n . More...
|
|
int | width () const |
| width of window More...
|
|
int | height () const |
| height of window More...
|
|
float | high_dpi_scaling () const |
| highDPI scaling More...
|
|
float | imgui_scaling () const |
| imgui scaling More...
|
|
void | cursor_pos (double &x, double &y) const |
| get position of mouse cursor More...
|
|
bool | left_mouse_pressed () const |
| is left mouse button pressed down? More...
|
|
bool | right_mouse_pressed () const |
| is right mouse button pressed down? More...
|
|
bool | middle_mouse_pressed () const |
| is middle mouse button pressed down? More...
|
|
bool | ctrl_pressed () const |
| is CTRL modifier key pressed down? More...
|
|
bool | alt_pressed () const |
| is ALT modifier key pressed down? More...
|
|
bool | shift_pressed () const |
| is SHIFT modifier key pressed down? More...
|
|
Simple viewer for a SurfaceMesh.