Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
igl::opengl2::MouseController Class Reference

#include <src/libigl/igl/opengl2/MouseController.h>

+ Collaboration diagram for igl::opengl2::MouseController:

Public Types

enum  WidgetMode { WIDGET_MODE_ROTATE = 0 , WIDGET_MODE_TRANSLATE = 1 , NUM_WIDGET_MODES = 2 }
 
typedef Eigen::VectorXi VectorXb
 

Public Member Functions

 MouseController ()
 
const VectorXbselection () const
 
const bool & is_selecting () const
 
bool is_widget_down () const
 
bool is_trans_widget_down () const
 
const RotationListrotations () const
 
const TranslationListtranslations () const
 
bool & root_enabled ()
 
void reshape (const int w, const int h)
 
bool down (const int x, const int y)
 
bool drag (const int x, const int y)
 
bool up (const int x, const int y)
 
void draw () const
 
void set_selection_from_last_drag (const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const Eigen::VectorXi &RP)
 
void set_selection (const Eigen::VectorXi &S, const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const Eigen::VectorXi &RP)
 
void set_size (const int n)
 
void reset ()
 
void reset_selected ()
 
void reset_rotations ()
 
void reset_selected_rotations ()
 
void reset_translations ()
 
void reset_selected_translations ()
 
bool set_rotations (const RotationList &vQ)
 
bool set_translations (const TranslationList &vT)
 
void clear_selection ()
 
bool any_selection () const
 
void set_widget_mode (const WidgetMode &mode)
 

Static Public Member Functions

static void propogate_to_descendants_if (const VectorXb &S, const Eigen::VectorXi &P, VectorXb &T)
 
static void color_if (const VectorXb &S, const Eigen::Vector4f &selected_color, const Eigen::Vector4f &unselected_color, Eigen::MatrixXf &C)
 

Private Types

typedef std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > RotationList
 
typedef std::vector< Eigen::Vector3d > TranslationList
 

Private Attributes

bool m_is_selecting
 
VectorXb m_selection
 
int m_down_x
 
int m_down_y
 
int m_drag_x
 
int m_drag_y
 
int m_width
 
int m_height
 
igl::opengl2::RotateWidget m_widget
 
igl::opengl2::TranslateWidget m_trans_widget
 
Eigen::Quaterniond m_widget_rot_at_selection
 
RotationList m_rotations
 
RotationList m_rotations_at_selection
 
RotationList m_fk_rotations_at_selection
 
RotationList m_parent_rotations_at_selection
 
TranslationList m_translations
 
TranslationList m_translations_at_selection
 
TranslationList m_fk_translations_at_selection
 
bool m_root_enabled
 
WidgetMode m_widget_mode
 

Detailed Description

Member Typedef Documentation

◆ RotationList

◆ TranslationList

typedef std::vector< Eigen::Vector3d > igl::opengl2::MouseController::TranslationList
private

◆ VectorXb

typedef Eigen::VectorXi igl::opengl2::MouseController::VectorXb

Member Enumeration Documentation

◆ WidgetMode

Enumerator
WIDGET_MODE_ROTATE 
WIDGET_MODE_TRANSLATE 
NUM_WIDGET_MODES 
53 {
57 };
@ NUM_WIDGET_MODES
Definition MouseController.h:56
@ WIDGET_MODE_TRANSLATE
Definition MouseController.h:55
@ WIDGET_MODE_ROTATE
Definition MouseController.h:54

Constructor & Destructor Documentation

◆ MouseController()

igl::opengl2::MouseController::MouseController ( )
inline
223 :
224 m_is_selecting(false),
225 m_selection(),
226 m_down_x(-1),m_down_y(-1),m_drag_x(-1),m_drag_y(-1),
227 m_width(-1),m_height(-1),
228 m_widget(),
230 //m_trans_widget_trans_at_selection(),
232 m_rotations(),
235 m_root_enabled(true),
237{
238}
int m_drag_x
Definition MouseController.h:77
RotationList m_rotations
Definition MouseController.h:88
bool m_is_selecting
Definition MouseController.h:75
int m_width
Definition MouseController.h:78
int m_drag_y
Definition MouseController.h:77
VectorXb m_selection
Definition MouseController.h:76
int m_down_y
Definition MouseController.h:77
WidgetMode m_widget_mode
Definition MouseController.h:97
int m_height
Definition MouseController.h:78
igl::opengl2::RotateWidget m_widget
Definition MouseController.h:79
RotationList m_rotations_at_selection
Definition MouseController.h:89
int m_down_x
Definition MouseController.h:77
bool m_root_enabled
Definition MouseController.h:96
Eigen::Quaterniond m_widget_rot_at_selection
Definition MouseController.h:81
igl::opengl2::TranslateWidget m_trans_widget
Definition MouseController.h:80
TranslationList m_translations
Definition MouseController.h:93

Member Function Documentation

◆ any_selection()

bool igl::opengl2::MouseController::any_selection ( ) const
inline
673{
674 return m_selection.array().any();
675}

◆ clear_selection()

void igl::opengl2::MouseController::clear_selection ( )
inline
668{
669 m_selection.setConstant(false);
670}

◆ color_if()

void igl::opengl2::MouseController::color_if ( const VectorXb S,
const Eigen::Vector4f &  selected_color,
const Eigen::Vector4f &  unselected_color,
Eigen::MatrixXf &  C 
)
inlinestatic
215{
216 C.resize(S.rows(),4);
217 for(int e=0;e<S.rows();e++)
218 {
219 C.row(e) = S(e)?selected_color:unselected_color;
220 }
221}

◆ down()

bool igl::opengl2::MouseController::down ( const int  x,
const int  y 
)
inline
247{
248 using namespace std;
251 const bool widget_down = any_selection() &&
252 (
256 );
257 if(!widget_down)
258 {
259 m_is_selecting = true;
260 }
261 return m_is_selecting || widget_down;
262}
bool any_selection() const
Definition MouseController.h:672
bool down(const int x, const int y)
Definition RotateWidget.h:204
bool down(const int x, const int y)
Definition TranslateWidget.h:69
const Scalar & y
Definition MathFunctions.h:552
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297
STL namespace.

◆ drag()

bool igl::opengl2::MouseController::drag ( const int  x,
const int  y 
)
inline
265{
266 using namespace std;
267 using namespace Eigen;
268 m_drag_x = x;
269 m_drag_y = y;
271 {
272 return m_is_selecting;
273 }else
274 {
275 switch(m_widget_mode)
276 {
277 default: // fall through
279 {
280 if(!m_widget.drag(x,m_height-y))
281 {
282 return false;
283 }
284 assert(any_selection());
285 assert(m_selection.size() == (int)m_rotations.size());
286 assert(m_selection.size() == (int)m_translations.size());
287 for(int e = 0;e<m_selection.size();e++)
288 {
289 if(m_selection(e))
290 {
291 // Let:
292 // w.θr = w.θ ⋅ w.θ₀*
293 // w.θr takes (absolute) frame of w.θ₀ to w.θ:
294 // w.θ = w.θr ⋅ w.θ₀
295 // Define:
296 // w.θ₀ = θfk ⋅ θx,
297 // the absolute rotation of the x axis to the deformed bone at
298 // selection. Likewise,
299 // w.θ = θfk' ⋅ θx,
300 // the current absolute rotation of the x axis to the deformed bone.
301 // Define recursively:
302 // θfk = θfk(p) ⋅ Θr,
303 // then because we're only changeing this relative rotation
304 // θfk' = θfk(p) ⋅ Θr ⋅ θr* ⋅ θr'
305 // θfk' = θfk ⋅ θr* ⋅ θr'
306 // w.θ ⋅ θx* = θfk ⋅ θr* ⋅ θr'
307 // θr ⋅ θfk* ⋅ w.θ ⋅ θx* = θr'
308 // θr ⋅ θfk* ⋅ w.θr ⋅ w.θ₀ ⋅ θx* = θr'
309 // θr ⋅ θfk* ⋅ w.θr ⋅ θfk ⋅θx ⋅ θx* = θr'
310 // θr ⋅ θfk* ⋅ w.θr ⋅ θfk = θr'
311 // which I guess is the right multiply change after being changed to
312 // the bases of θfk, the rotation of the bone relative to its rest
313 // frame.
314 //
315 const Quaterniond & frame = m_fk_rotations_at_selection[e];
316 m_rotations[e] =
318 frame.conjugate() *
320 frame;
321 }
322 }
323 }
325 {
327 {
328 return false;
329 }
330 assert(any_selection());
331 assert(m_selection.size() == (int)m_rotations.size());
332 assert(m_selection.size() == (int)m_translations.size());
333 for(int e = 0;e<m_selection.size();e++)
334 {
335 if(m_selection(e))
336 {
337 m_translations[e] =
339 m_parent_rotations_at_selection[e].conjugate()*
341 }
342 }
343 }
344 }
345 return true;
346 }
347}
TranslationList m_translations_at_selection
Definition MouseController.h:94
RotationList m_parent_rotations_at_selection
Definition MouseController.h:91
RotationList m_fk_rotations_at_selection
Definition MouseController.h:90
bool drag(const int x, const int y)
Definition RotateWidget.h:286
Eigen::Quaterniond rot
Definition RotateWidget.h:30
bool drag(const int x, const int y)
Definition TranslateWidget.h:97
Eigen::Vector3d m_trans
Definition TranslateWidget.h:27
EIGEN_DEVICE_FUNC Quaternion< Scalar > conjugate() const
Definition Quaternion.h:695
The quaternion class used to represent 3D orientations and rotations.
Definition Quaternion.h:233
Definition LDLT.h:16

References Eigen::QuaternionBase< Derived >::conjugate().

+ Here is the call graph for this function:

◆ draw()

void igl::opengl2::MouseController::draw ( ) const
inline
358{
359 if(any_selection())
360 {
361 switch(m_widget_mode)
362 {
363 default:
365 m_widget.draw();
366 break;
369 break;
370 }
371 }
373 {
374 // Remember settings
375 GLboolean dt;
376 glGetBooleanv(GL_DEPTH_TEST,&dt);
377 int old_vp[4];
378 glGetIntegerv(GL_VIEWPORT,old_vp);
379
380 // True screen space
381 glViewport(0,0,m_width,m_height);
382 glMatrixMode(GL_PROJECTION);
383 glPushMatrix();
384 glLoadIdentity();
385 gluOrtho2D(0,m_width,0,m_height);
386 glMatrixMode(GL_MODELVIEW);
387 glPushMatrix();
388 glLoadIdentity();
389
390 glDisable(GL_DEPTH_TEST);
392 m_down_x,
394 m_drag_x,
396
397 // Restore settings
398 glMatrixMode(GL_PROJECTION);
399 glPopMatrix();
400 glMatrixMode(GL_MODELVIEW);
401 glPopMatrix();
402 glViewport(old_vp[0],old_vp[1],old_vp[2],old_vp[3]);
403 dt?glEnable(GL_DEPTH_TEST):glDisable(GL_DEPTH_TEST);
404
405 }
406}
void draw() const
Definition RotateWidget.h:372
void draw() const
Definition TranslateWidget.h:133
unsigned char GLboolean
Definition glu-libtess.h:54
IGL_INLINE void draw_rectangular_marquee(const int from_x, const int from_y, const int to_x, const int to_y)
Definition draw_rectangular_marquee.cpp:15

References igl::opengl2::draw_rectangular_marquee().

+ Here is the call graph for this function:

◆ is_selecting()

const bool & igl::opengl2::MouseController::is_selecting ( ) const
inline
103{return m_is_selecting;}

References m_is_selecting.

◆ is_trans_widget_down()

bool igl::opengl2::MouseController::is_trans_widget_down ( ) const
inline
105{return m_trans_widget.is_down();}
bool is_down() const
Definition TranslateWidget.h:128

References igl::opengl2::TranslateWidget::is_down(), and m_trans_widget.

+ Here is the call graph for this function:

◆ is_widget_down()

bool igl::opengl2::MouseController::is_widget_down ( ) const
inline
104{return m_widget.is_down();}
bool is_down() const
Definition RotateWidget.h:367

References igl::opengl2::RotateWidget::is_down(), and m_widget.

+ Here is the call graph for this function:

◆ propogate_to_descendants_if()

void igl::opengl2::MouseController::propogate_to_descendants_if ( const VectorXb S,
const Eigen::VectorXi &  P,
VectorXb T 
)
inlinestatic
180{
181 using namespace std;
182 const int n = S.rows();
183 assert(P.rows() == n);
184 // dynamic programming
185 T = S;
186 vector<bool> seen(n,false);
187 // Recursively look up chain and see if ancestor is selected
188 const function<bool(int)> look_up = [&](int e) -> bool
189 {
190 if(e==-1)
191 {
192 return false;
193 }
194 if(!seen[e])
195 {
196 seen[e] = true;
197 T(e) |= look_up(P(e));
198 }
199 return T(e);
200 };
201 for(int e = 0;e<n;e++)
202 {
203 if(!seen[e])
204 {
205 T(e) = look_up(e);
206 }
207 }
208}

◆ reset()

void igl::opengl2::MouseController::reset ( )
inline
592{
595}
void reset_rotations()
Definition MouseController.h:603
void reset_translations()
Definition MouseController.h:624

◆ reset_rotations()

void igl::opengl2::MouseController::reset_rotations ( )
inline
604{
605 using namespace Eigen;
606 using namespace std;
607 fill(m_rotations.begin(),m_rotations.end(),Quaterniond::Identity());
608 // cop out. just clear selection
610}
void clear_selection()
Definition MouseController.h:667

◆ reset_selected()

void igl::opengl2::MouseController::reset_selected ( )
inline
598{
601}
void reset_selected_translations()
Definition MouseController.h:633
void reset_selected_rotations()
Definition MouseController.h:612

◆ reset_selected_rotations()

void igl::opengl2::MouseController::reset_selected_rotations ( )
inline
613{
614 using namespace Eigen;
615 for(int e = 0;e<m_selection.size();e++)
616 {
617 if(m_selection(e))
618 {
619 m_rotations[e] = Quaterniond::Identity();
620 }
621 }
622}

◆ reset_selected_translations()

void igl::opengl2::MouseController::reset_selected_translations ( )
inline
634{
635 using namespace Eigen;
636 for(int e = 0;e<m_selection.size();e++)
637 {
638 if(m_selection(e))
639 {
640 m_translations[e] = Vector3d(0,0,0);
641 }
642 }
643}

◆ reset_translations()

void igl::opengl2::MouseController::reset_translations ( )
inline
625{
626 using namespace Eigen;
627 using namespace std;
628 fill(m_translations.begin(),m_translations.end(),Vector3d(0,0,0));
629 // cop out. just clear selection
631}

◆ reshape()

void igl::opengl2::MouseController::reshape ( const int  w,
const int  h 
)
inline
241{
242 m_width = w;
243 m_height = h;
244}

◆ root_enabled()

bool & igl::opengl2::MouseController::root_enabled ( )
inline
110{ return m_root_enabled;}

References m_root_enabled.

◆ rotations()

const RotationList & igl::opengl2::MouseController::rotations ( ) const
inline
107{return m_rotations;}

References m_rotations.

◆ selection()

const VectorXb & igl::opengl2::MouseController::selection ( ) const
inline
101{return m_selection;};

References m_selection.

◆ set_rotations()

bool igl::opengl2::MouseController::set_rotations ( const RotationList vQ)
inline
646{
647 if(vQ.size() != m_rotations.size())
648 {
649 return false;
650 }
651 assert(!any_selection());
652 m_rotations = vQ;
653 return true;
654}

◆ set_selection()

void igl::opengl2::MouseController::set_selection ( const Eigen::VectorXi &  S,
const Eigen::MatrixXd &  C,
const Eigen::MatrixXi &  BE,
const Eigen::VectorXi &  P,
const Eigen::VectorXi &  RP 
)
inline
451{
452 using namespace Eigen;
453 using namespace std;
454 vector<Quaterniond,aligned_allocator<Quaterniond> > & vQ =
456 vector<Vector3d> & vT = m_fk_translations_at_selection;
459 m_rotations.size(),Quaterniond::Identity());
460 for(size_t r = 0;r<vQ.size();r++)
461 {
462 if(P(r)>=0)
463 {
465 }
466 }
467
468
469 if(&m_selection != &S)
470 {
471 m_selection = S;
472 }
473 assert(m_selection.rows() == BE.rows());
474 assert(BE.rows() == P.rows());
475 assert(BE.rows() == RP.rows());
476 // Zero-out S up a path of ones from e
477 auto propagate = [&](const int e, const VectorXb & S, VectorXb & N)
478 {
479 if(S(e))
480 {
481 int f = e;
482 while(true)
483 {
484 int p = P(f);
485 if(p==-1||!S(p))
486 {
487 break;
488 }
489 N(f) = false;
490 f = p;
491 }
492 }
493 };
494 VectorXb prev_selection = m_selection;
495 // Combine upward, group rigid parts, repeat
496 while(true)
497 {
498 // Spread selection across rigid pieces
499 VectorXb SRP(VectorXb::Zero(RP.maxCoeff()+1));
500 for(int e = 0;e<BE.rows();e++)
501 {
502 SRP(RP(e)) |= m_selection(e);
503 }
504 for(int e = 0;e<BE.rows();e++)
505 {
506 m_selection(e) = SRP(RP(e));
507 }
508 // Clear selections below m_selection ancestors
509 VectorXb new_selection = m_selection;
510 for(int e = 0;e<P.rows();e++)
511 {
512 propagate(e,m_selection,new_selection);
513 }
514 m_selection = new_selection;
515 if(m_selection==prev_selection)
516 {
517 break;
518 }
519 prev_selection = m_selection;
520 }
521
522 // Now selection should contain just bone roots of m_selection subtrees
523 if(m_selection.array().any())
524 {
525 // Taking average
526 Vector3d avg_pos(0,0,0);
527 //m_trans_widget_trans_at_selection.setConstant(0);
528 m_widget_rot_at_selection.coeffs().setConstant(0);
529 m_widget.rot.coeffs().array().setConstant(0);
530 Quaterniond cur_rot(0,0,0,0);
531 int num_selection = 0;
532 // Compute average widget for selection
533 for(int e = 0;e<BE.rows();e++)
534 {
535 if(m_selection(e))
536 {
537 Vector3d s = C.row(BE(e,0));
538 Vector3d d = C.row(BE(e,1));
539 auto b = (d-s).transpose().eval();
540 {
541 Affine3d a = Affine3d::Identity();
542 a.translate(vT[e]);
543 a.rotate(vQ[e]);
544 avg_pos += a*s;
545 }
546 // Rotation of x axis to this bone
547 Quaterniond rot_at_bind;
548 rot_at_bind.setFromTwoVectors(Vector3d(1,0,0),b);
549 const Quaterniond abs_rot = vQ[e] * rot_at_bind;
551 //m_trans_widget_trans_at_selection += vT[e];
552 num_selection++;
553 }
554 }
555 // Take average
556 avg_pos.array() /= (double)num_selection;
557 //m_trans_widget_trans_at_selection.array() /= (double)num_selection;
558 m_widget_rot_at_selection.coeffs().array() /= (double)num_selection;
561 m_widget.pos = avg_pos;
562 m_trans_widget.m_pos = avg_pos;
563 //m_trans_widget.m_trans = m_trans_widget_trans_at_selection;
564 m_trans_widget.m_trans.setConstant(0);
565 }
566 m_widget.m_is_enabled = true;
568 for(int s = 0;s<m_selection.rows();s++)
569 {
570 // a root is selected then disable.
571 if(!m_root_enabled && m_selection(s) && P(s) == -1)
572 {
573 m_widget.m_is_enabled = false;
575 break;
576 }
577 }
578}
TranslationList m_fk_translations_at_selection
Definition MouseController.h:95
Eigen::VectorXi VectorXb
Definition MouseController.h:26
Eigen::Vector3d pos
Definition RotateWidget.h:29
bool m_is_enabled
Definition RotateWidget.h:35
bool m_is_enabled
Definition TranslateWidget.h:29
Eigen::Vector3d m_pos
Definition TranslateWidget.h:27
EIGEN_DEVICE_FUNC Coefficients & coeffs()
Definition Quaternion.h:284
EIGEN_DEVICE_FUNC Derived & setFromTwoVectors(const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b)
Definition Quaternion.h:582
EIGEN_DEVICE_FUNC void normalize()
Definition Quaternion.h:129
Represents an homogeneous transformation in a N dimensional space.
Definition Transform.h:202
IGL_INLINE void forward_kinematics(const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &dQ, const std::vector< Eigen::Vector3d > &dT, std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &vQ, std::vector< Eigen::Vector3d > &vT)
Definition forward_kinematics.cpp:12

References Eigen::Quaternion< _Scalar, _Options >::coeffs(), igl::forward_kinematics(), and Eigen::QuaternionBase< Derived >::setFromTwoVectors().

+ Here is the call graph for this function:

◆ set_selection_from_last_drag()

void igl::opengl2::MouseController::set_selection_from_last_drag ( const Eigen::MatrixXd &  C,
const Eigen::MatrixXi &  BE,
const Eigen::VectorXi &  P,
const Eigen::VectorXi &  RP 
)
inline
413{
414 using namespace Eigen;
415 using namespace std;
418 assert(BE.rows() == P.rows());
419 m_selection = VectorXb::Zero(BE.rows());
420 // m_rotation[e] is the relative rotation stored at bone e (as seen by the
421 // joint traveling with its parent)
422 // vQ[e] is the absolute rotation of a bone at rest to its current position:
423 // vQ[e] = vQ[p(e)] * m_rotation[e]
424 vector<Quaterniond,aligned_allocator<Quaterniond> > vQ;
425 vector<Vector3d> vT;
427 // Loop over deformed bones
428 for(int e = 0;e<BE.rows();e++)
429 {
430 Affine3d a = Affine3d::Identity();
431 a.translate(vT[e]);
432 a.rotate(vQ[e]);
433 Vector3d s = a * (Vector3d)C.row(BE(e,0));
434 Vector3d d = a * (Vector3d)C.row(BE(e,1));
435 Vector3d projs = project(s);
436 Vector3d projd = project(d);
438 projs.head(2),projd.head(2),
439 Vector2d(m_down_x,m_height-m_down_y),
440 Vector2d(m_drag_x,m_height-m_drag_y));
441 }
442 return set_selection(m_selection,C,BE,P,RP);
443}
void set_selection(const Eigen::VectorXi &S, const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const Eigen::VectorXi &RP)
Definition MouseController.h:445
IGL_INLINE int project(const double objX, const double objY, const double objZ, double *winX, double *winY, double *winZ)
Definition project.cpp:14
IGL_INLINE bool line_segment_in_rectangle(const Eigen::Vector2d &s, const Eigen::Vector2d &d, const Eigen::Vector2d &A, const Eigen::Vector2d &B)
Definition line_segment_in_rectangle.cpp:10

References igl::forward_kinematics(), igl::line_segment_in_rectangle(), and igl::opengl2::project().

+ Here is the call graph for this function:

◆ set_size()

void igl::opengl2::MouseController::set_size ( const int  n)
inline
581{
582 using namespace Eigen;
584 m_rotations.clear();
585 m_rotations.resize(n,Quaterniond::Identity());
586 m_translations.clear();
587 m_translations.resize(n,Vector3d(0,0,0));
588 m_selection = VectorXb::Zero(n);
589}

◆ set_translations()

bool igl::opengl2::MouseController::set_translations ( const TranslationList vT)
inline
657{
658 if(vT.size() != m_translations.size())
659 {
660 return false;
661 }
662 assert(!any_selection());
663 m_translations = vT;
664 return true;
665}

◆ set_widget_mode()

void igl::opengl2::MouseController::set_widget_mode ( const WidgetMode mode)
inline
678{
679 switch(m_widget_mode)
680 {
681 default:
684 break;
686 break;
687 }
689}
IGL_INLINE void mode(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &X, const int d, Eigen::Matrix< T, Eigen::Dynamic, 1 > &M)
Definition mode.cpp:14

References igl::mode().

+ Here is the call graph for this function:

◆ translations()

const TranslationList & igl::opengl2::MouseController::translations ( ) const
inline
108{return m_translations;}

References m_translations.

◆ up()

bool igl::opengl2::MouseController::up ( const int  x,
const int  y 
)
inline
350{
351 m_is_selecting = false;
352 m_widget.up(x,m_height-y);
354 return false;
355}
bool up(const int x, const int y)
Definition RotateWidget.h:360
bool up(const int x, const int y)
Definition TranslateWidget.h:121

Member Data Documentation

◆ m_down_x

int igl::opengl2::MouseController::m_down_x
private

◆ m_down_y

int igl::opengl2::MouseController::m_down_y
private

◆ m_drag_x

int igl::opengl2::MouseController::m_drag_x
private

◆ m_drag_y

int igl::opengl2::MouseController::m_drag_y
private

◆ m_fk_rotations_at_selection

RotationList igl::opengl2::MouseController::m_fk_rotations_at_selection
private

◆ m_fk_translations_at_selection

TranslationList igl::opengl2::MouseController::m_fk_translations_at_selection
private

◆ m_height

int igl::opengl2::MouseController::m_height
private

◆ m_is_selecting

bool igl::opengl2::MouseController::m_is_selecting
private

Referenced by is_selecting().

◆ m_parent_rotations_at_selection

RotationList igl::opengl2::MouseController::m_parent_rotations_at_selection
private

◆ m_root_enabled

bool igl::opengl2::MouseController::m_root_enabled
private

Referenced by root_enabled().

◆ m_rotations

RotationList igl::opengl2::MouseController::m_rotations
private

Referenced by rotations().

◆ m_rotations_at_selection

RotationList igl::opengl2::MouseController::m_rotations_at_selection
private

◆ m_selection

VectorXb igl::opengl2::MouseController::m_selection
private

Referenced by selection().

◆ m_trans_widget

igl::opengl2::TranslateWidget igl::opengl2::MouseController::m_trans_widget
private

Referenced by is_trans_widget_down().

◆ m_translations

TranslationList igl::opengl2::MouseController::m_translations
private

Referenced by translations().

◆ m_translations_at_selection

TranslationList igl::opengl2::MouseController::m_translations_at_selection
private

◆ m_widget

igl::opengl2::RotateWidget igl::opengl2::MouseController::m_widget
private

Referenced by is_widget_down().

◆ m_widget_mode

WidgetMode igl::opengl2::MouseController::m_widget_mode
private

◆ m_widget_rot_at_selection

Eigen::Quaterniond igl::opengl2::MouseController::m_widget_rot_at_selection
private

◆ m_width

int igl::opengl2::MouseController::m_width
private

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