libigl v2.5.0
Loading...
Searching...
No Matches
igl::opengl::glfw::imgui::SelectionWidget Class Reference

Widget for selecting a region of the screen. More...

#include <SelectionWidget.h>

Inheritance diagram for igl::opengl::glfw::imgui::SelectionWidget:
igl::opengl::glfw::imgui::ImGuiWidget

Public Types

enum  Mode {
  OFF = 0 , RECTANGULAR_MARQUEE = 1 , ELLIPTICAL_MARQUEE = 2 , POLYGONAL_LASSO = 3 ,
  LASSO = 4 , NUM_MODES = 5
}
 Selection modes. More...
 

Public Member Functions

virtual void init (Viewer *_viewer, ImGuiPlugin *_plugin) override
 
virtual void draw () override
 
virtual bool mouse_down (int button, int modifier) override
 
virtual bool mouse_up (int button, int modifier) override
 
virtual bool mouse_move (int mouse_x, int mouse_y) override
 
virtual bool key_pressed (unsigned int key, int modifiers) override
 
void clear ()
 
- Public Member Functions inherited from igl::opengl::glfw::imgui::ImGuiWidget
 ImGuiWidget ()
 
virtual ~ImGuiWidget ()
 
virtual void shutdown ()
 
virtual bool key_down (int, int)
 
virtual bool key_up (int, int)
 

Static Public Member Functions

static void circle (const Eigen::Matrix< float, 2, 2 > &M, std::vector< Eigen::RowVector2f > &L)
 
static void rect (const Eigen::Matrix< float, 2, 2 > &M, std::vector< Eigen::RowVector2f > &L)
 
static Eigen::RowVector2f xy (const Viewer *v)
 

Public Attributes

std::string MARQUEE_KEY = "Mm"
 Hot key to start marquee.
 
std::string LASSO_KEY = "l"
 Hot key to start lasso.
 
std::string OFF_KEY = "Vv"
 Hot key to stop selection.
 
enum igl::opengl::glfw::imgui::SelectionWidget::Mode mode = RECTANGULAR_MARQUEE
 
bool is_down = false
 
bool has_moved_since_down = false
 
bool is_drawing = false
 
Eigen::Matrix< float, 2, 2 > M = Eigen::Matrix<float,2,2>::Zero()
 
std::vector< Eigen::RowVector2f > L
 
std::function< void(void)> callback
 
std::function< void(Mode)> callback_post_mode_change
 
- Public Attributes inherited from igl::opengl::glfw::imgui::ImGuiWidget
std::string name
 

Additional Inherited Members

- Protected Attributes inherited from igl::opengl::glfw::imgui::ImGuiWidget
Viewerviewer
 
ImGuiPluginplugin
 

Detailed Description

Widget for selecting a region of the screen.

Member Enumeration Documentation

◆ Mode

Selection modes.

Enumerator
OFF 
RECTANGULAR_MARQUEE 
ELLIPTICAL_MARQUEE 
POLYGONAL_LASSO 
LASSO 
NUM_MODES 

Member Function Documentation

◆ init()

virtual void igl::opengl::glfw::imgui::SelectionWidget::init ( Viewer _viewer,
ImGuiPlugin _plugin 
)
overridevirtual

◆ draw()

virtual void igl::opengl::glfw::imgui::SelectionWidget::draw ( )
overridevirtual

◆ mouse_down()

virtual bool igl::opengl::glfw::imgui::SelectionWidget::mouse_down ( int  button,
int  modifier 
)
overridevirtual

◆ mouse_up()

virtual bool igl::opengl::glfw::imgui::SelectionWidget::mouse_up ( int  button,
int  modifier 
)
overridevirtual

◆ mouse_move()

virtual bool igl::opengl::glfw::imgui::SelectionWidget::mouse_move ( int  mouse_x,
int  mouse_y 
)
overridevirtual

◆ key_pressed()

virtual bool igl::opengl::glfw::imgui::SelectionWidget::key_pressed ( unsigned int  key,
int  modifiers 
)
overridevirtual

◆ clear()

void igl::opengl::glfw::imgui::SelectionWidget::clear ( )

◆ circle()

static void igl::opengl::glfw::imgui::SelectionWidget::circle ( const Eigen::Matrix< float, 2, 2 > &  M,
std::vector< Eigen::RowVector2f > &  L 
)
static

◆ rect()

static void igl::opengl::glfw::imgui::SelectionWidget::rect ( const Eigen::Matrix< float, 2, 2 > &  M,
std::vector< Eigen::RowVector2f > &  L 
)
static

◆ xy()

static Eigen::RowVector2f igl::opengl::glfw::imgui::SelectionWidget::xy ( const Viewer v)
static

Member Data Documentation

◆ MARQUEE_KEY

std::string igl::opengl::glfw::imgui::SelectionWidget::MARQUEE_KEY = "Mm"

Hot key to start marquee.

◆ LASSO_KEY

std::string igl::opengl::glfw::imgui::SelectionWidget::LASSO_KEY = "l"

Hot key to start lasso.

◆ OFF_KEY

std::string igl::opengl::glfw::imgui::SelectionWidget::OFF_KEY = "Vv"

Hot key to stop selection.

◆ mode

enum igl::opengl::glfw::imgui::SelectionWidget::Mode igl::opengl::glfw::imgui::SelectionWidget::mode = RECTANGULAR_MARQUEE

◆ is_down

bool igl::opengl::glfw::imgui::SelectionWidget::is_down = false

◆ has_moved_since_down

bool igl::opengl::glfw::imgui::SelectionWidget::has_moved_since_down = false

◆ is_drawing

bool igl::opengl::glfw::imgui::SelectionWidget::is_drawing = false

◆ M

Eigen::Matrix<float,2,2> igl::opengl::glfw::imgui::SelectionWidget::M = Eigen::Matrix<float,2,2>::Zero()

◆ L

std::vector<Eigen::RowVector2f> igl::opengl::glfw::imgui::SelectionWidget::L

◆ callback

std::function<void(void)> igl::opengl::glfw::imgui::SelectionWidget::callback

◆ callback_post_mode_change

std::function<void(Mode)> igl::opengl::glfw::imgui::SelectionWidget::callback_post_mode_change

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