8#ifndef IGL_OPENGL_GLFW_VIEWER_H 
    9#define IGL_OPENGL_GLFW_VIEWER_H 
   15#include "../../igl_inline.h" 
   17#include "../ViewerCore.h" 
   18#include "../ViewerData.h" 
   22#include <Eigen/Geometry> 
   28#define IGL_MOD_SHIFT           0x0001 
   29#define IGL_MOD_CONTROL         0x0002 
   30#define IGL_MOD_ALT             0x0004 
   31#define IGL_MOD_SUPER           0x0008 
   48    IGL_INLINE int launch     (
bool fullscreen = 
false, 
const std::string &name = 
"libigl viewer", 
int width = 0, 
int height = 0);
 
   49    IGL_INLINE int launch_init(
bool fullscreen = 
false, 
const std::string &name = 
"libigl viewer", 
int width = 0, 
int height = 0);
 
   98      Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> & R,
 
   99      Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> & G,
 
  100      Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> & B,
 
  101      Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> & A,
 
  102      Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> & D);
 
  254    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 
 
  261#ifndef IGL_STATIC_LIBRARY 
  262#  include "Viewer.cpp" 
Basic class of the 3D mesh viewer.
Definition ViewerCore.h:27
 
Object being drawn (i.e., mesh and its accessories) by the ViewerCore.
Definition ViewerData.h:39
 
int launch(bool fullscreen=false, const std::string &name="libigl viewer", int width=0, int height=0)
 
size_t core_index(const int id) const
 
std::function< bool(Viewer &viewer)> callback_init
Definition Viewer.h:229
 
MouseMode
Definition Viewer.h:47
 
void * callback_mouse_scroll_data
Definition Viewer.h:248
 
bool mouse_move(int mouse_x, int mouse_y)
 
void post_resize(int w, int h)
 
int append_mesh(bool visible=true)
 
void snap_to_canonical_quaternion()
 
std::function< bool(Viewer &viewer, unsigned int key, int modifiers)> callback_key_pressed
Definition Viewer.h:236
 
std::function< bool(Viewer &viewer, int button, int modifier)> callback_mouse_up
Definition Viewer.h:233
 
size_t selected_core_index
Definition Viewer.h:209
 
bool save_scene(std::string fname)
 
void * callback_init_data
Definition Viewer.h:242
 
int next_data_id
Definition Viewer.h:204
 
bool load_mesh_from_file(const std::string &mesh_file_name)
 
std::function< bool(Viewer &viewer, int w, int h)> callback_post_resize
Definition Viewer.h:237
 
size_t selected_data_index
Definition Viewer.h:203
 
std::function< bool(Viewer &viewer, float delta_y)> callback_mouse_scroll
Definition Viewer.h:235
 
std::function< bool(Viewer &viewer)> callback_pre_draw
Definition Viewer.h:230
 
bool erase_mesh(const size_t index)
 
int current_mouse_x
Definition Viewer.h:216
 
void open_dialog_save_mesh()
 
void select_hovered_core()
 
bool down
Definition Viewer.h:222
 
bool hack_never_moved
Definition Viewer.h:223
 
std::function< bool(Viewer &viewer, unsigned int key, int modifiers)> callback_key_down
Definition Viewer.h:239
 
void resize(int w, int h)
 
void open_dialog_load_mesh()
 
ViewerCore & core(unsigned core_id=0)
 
Eigen::Vector3f down_translation
Definition Viewer.h:221
 
std::function< bool(Viewer &viewer, int mouse_x, int mouse_y)> callback_mouse_move
Definition Viewer.h:234
 
const ViewerData & data(int mesh_id=-1) const
 
int launch_init(bool fullscreen=false, const std::string &name="libigl viewer", int width=0, int height=0)
 
std::function< bool(Viewer &viewer)> callback_post_draw
Definition Viewer.h:231
 
std::vector< ViewerPlugin * > plugins
Definition Viewer.h:213
 
void * callback_pre_draw_data
Definition Viewer.h:243
 
void * callback_post_draw_data
Definition Viewer.h:244
 
bool mouse_scroll(float delta_y)
 
int append_core(Eigen::Vector4f viewport, bool append_empty=false)
 
bool launch_rendering(bool loop=true)
 
float down_mouse_z
Definition Viewer.h:220
 
GLFWwindow * window
Definition Viewer.h:205
 
std::function< bool(Viewer &viewer, unsigned int key, int modifiers)> callback_key_up
Definition Viewer.h:240
 
Eigen::Quaternionf down_rotation
Definition Viewer.h:215
 
MouseButton
Definition Viewer.h:46
 
std::vector< ViewerCore > core_list
Definition Viewer.h:208
 
void * callback_key_down_data
Definition Viewer.h:250
 
bool mouse_up(MouseButton button, int modifier)
 
bool key_up(int key, int modifier)
 
bool key_pressed(unsigned int unicode_key, int modifier)
 
void * callback_key_pressed_data
Definition Viewer.h:249
 
size_t mesh_index(const int id) const
 
void * callback_mouse_move_data
Definition Viewer.h:247
 
bool mouse_down(MouseButton button, int modifier)
 
bool erase_core(const size_t index)
 
bool save_mesh_to_file(const std::string &mesh_file_name)
 
int down_mouse_x
Definition Viewer.h:218
 
const ViewerCore & core(unsigned core_id=0) const
 
void draw_buffer(igl::opengl::ViewerCore &core, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &R, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &G, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &B, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &A, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &D)
 
enum igl::opengl::glfw::Viewer::MouseMode mouse_mode
 
void * callback_mouse_down_data
Definition Viewer.h:245
 
void * callback_mouse_up_data
Definition Viewer.h:246
 
int current_mouse_y
Definition Viewer.h:217
 
float scroll_position
Definition Viewer.h:225
 
bool load_scene(std::string fname)
 
bool key_down(int key, int modifier)
 
ViewerData & data(int mesh_id=-1)
 
std::function< bool(Viewer &viewer, int button, int modifier)> callback_mouse_down
Definition Viewer.h:232
 
int next_core_id
Definition Viewer.h:210
 
int down_mouse_y
Definition Viewer.h:219
 
void * callback_key_up_data
Definition Viewer.h:251
 
std::vector< ViewerData > data_list
Definition Viewer.h:201
 
#define IGL_INLINE
Definition igl_inline.h:15
 
void loop(const int n_verts, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< SType > &S, Eigen::PlainObjectBase< DerivedNF > &NF)
Given the triangle mesh [V, F], where n_verts = V.rows(), computes newV and a sparse matrix S s....