Rosetta
Signals | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget Class Reference

#include <HelicalBundlePoseDrawOpenGLWidget.h>

Inheritance diagram for ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget:
Inheritance graph
[legend]

Signals

void nonparametric_geometry_has_moved ()
 Signal that the nonparametric geometry has moved, and that it's time to update it. More...
 

Public Member Functions

 HelicalBundlePoseDrawOpenGLWidget (QWidget *parent=nullptr)
 Constructor. More...
 
void set_extended_drag_mode (HBPDOGLW_extended_drag_mode const mode_in)
 Set the extended drag mode. More...
 
void determine_xyz_unit_vectors ()
 Given the current orientation of the viewport, determine unit vectors in the viewport X (horizontal), Y (vertical), and Z (out of screen) directions. More...
 
numeric::xyzVector< core::Real > const & get_nonparametric_translation_vect () const
 Get the current nonparametric translation vector. More...
 
numeric::xyzTransform< core::Real > const & get_nonparametric_rotation_xform () const
 Get the current nonparametric rotation transform. More...
 
void reset_nonparametric_translation_vect ()
 Reset the current nonparametric translation vector. More...
 
void reset_nonparametric_rotation_xform ()
 Reset the current nonparametric rotation transform. More...
 
void set_nonparametric_COM_vect (numeric::xyzVector< core::Real > const &vect_in)
 Set the current nonparametric centre of mass. More...
 
- Public Member Functions inherited from ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget
 SimplePoseDrawOpenGLWidget (QWidget *parent=nullptr)
 Constructor. More...
 
void set_pose (core::pose::PoseCOP pose)
 Set the pose that we'll be drawing. More...
 
core::pose::PoseCOP pose () const
 Get currently assigned pose object. More...
 
void set_residue_selector (core::select::residue_selector::ResidueSelectorCOP selector_in)
 Set the residue selector that we'll use for colouring the pose. More...
 
void set_color_mode (ColorMode mode)
 Set the colour mode that we'll use for colouring the pose. More...
 
void set_energy_range (core::Real const &lower, core::Real const &upper)
 Set the lower and upper ends of the energy range in the gradient of colour values used. More...
 
void set_score_type (core::scoring::ScoreType scoretype_in)
 Set the score term to use if we're colouring by a single score type. More...
 
void update_pose_draw ()
 The pose has changed; redraw it. More...
 
void set_drag_mode (DragMode mode)
 Set what happens when the user drags in the viewport. More...
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *event) override
 What to do when the user moves the mouse. More...
 
- Protected Member Functions inherited from ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget
void initializeGL () override
 Initialize the OpenGL rendering environment. More...
 
void resizeGL (int width, int height) override
 What to do when the window has been resized. More...
 
void paintGL () override
 How to actually draw a pose. More...
 
void mousePressEvent (QMouseEvent *event) override
 What to do when the user clicks. More...
 
void mouseMoveEvent (QMouseEvent *event) override
 What do do when the user drags. More...
 
GLfloat const & rotx () const
 Read the x-rotation value. More...
 
GLfloat const & roty () const
 Read the y-rotation value. More...
 
GLfloat const & rotz () const
 Read the z-rotation value. More...
 
QPoint const & lastpos () const
 The start of a mouse click-and-drag event. More...
 
void set_lastpos (QPoint const &point_in)
 Set the value of lastpos. More...
 

Private Attributes

HBPDOGLW_extended_drag_mode extended_drag_mode_
 The drag mode, with extended options for translating the nonparametric geometry or rotating it. More...
 
numeric::xyzVector< GLfloat > x_unit_vect_
 A unit vector in the X-direction, used for translating in the screen plane. More...
 
numeric::xyzVector< GLfloat > y_unit_vect_
 A unit vector in the Y-direction, used for translating in the screen plane. More...
 
numeric::xyzVector< GLfloat > z_unit_vect_
 A unit vector in the Z-direction, used for translating perpendicular to the screen plane. More...
 
numeric::xyzVector< core::Realnonparametric_translation_vect_
 The translation vector for nonparametric geometry. More...
 
numeric::xyzVector< core::Realnonparametric_COM_vect_
 The centre-of-mass of nonparametric geometry, for rotation. More...
 
numeric::xyzTransform< core::Realnonparametric_rotation_xform_
 The rotation vector for nonparametric geometry. More...
 

Additional Inherited Members

- Public Types inherited from ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget
enum class  ColorMode {
  none , selection , input_domain , total_energy ,
  score_term , list = score_term
}
 Enum for the different ways that the pose could be coloured. More...
 
enum class  DragMode { rotate_and_zoom_viewport , list = rotate_and_zoom_viewport }
 

Constructor & Destructor Documentation

◆ HelicalBundlePoseDrawOpenGLWidget()

ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::HelicalBundlePoseDrawOpenGLWidget ( QWidget parent = nullptr)

Constructor.

Member Function Documentation

◆ determine_xyz_unit_vectors()

void ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::determine_xyz_unit_vectors ( )

Given the current orientation of the viewport, determine unit vectors in the viewport X (horizontal), Y (vertical), and Z (out of screen) directions.

References ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::rotx(), ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::rotz(), x_unit_vect_, y_unit_vect_, and z_unit_vect_.

Referenced by MainWindow::on_tool_drag_nonparametric_clicked(), and MainWindow::on_tool_rotate_nonparametric_clicked().

◆ get_nonparametric_rotation_xform()

numeric::xyzTransform< core::Real > const& ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::get_nonparametric_rotation_xform ( ) const
inline

Get the current nonparametric rotation transform.

References nonparametric_rotation_xform_.

Referenced by MainWindow::on_nonparametric_geometry_moved().

◆ get_nonparametric_translation_vect()

numeric::xyzVector< core::Real > const& ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::get_nonparametric_translation_vect ( ) const
inline

Get the current nonparametric translation vector.

References nonparametric_translation_vect_.

Referenced by MainWindow::on_nonparametric_geometry_moved().

◆ mouseMoveEvent()

void ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

◆ nonparametric_geometry_has_moved

void ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::nonparametric_geometry_has_moved ( )
signal

Signal that the nonparametric geometry has moved, and that it's time to update it.

Referenced by mouseMoveEvent().

◆ reset_nonparametric_rotation_xform()

void ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::reset_nonparametric_rotation_xform ( )

Reset the current nonparametric rotation transform.

References numeric::xyzTransform< T >::identity(), and nonparametric_rotation_xform_.

◆ reset_nonparametric_translation_vect()

void ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::reset_nonparametric_translation_vect ( )

◆ set_extended_drag_mode()

void ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::set_extended_drag_mode ( HBPDOGLW_extended_drag_mode const  mode_in)

◆ set_nonparametric_COM_vect()

void ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::set_nonparametric_COM_vect ( numeric::xyzVector< core::Real > const &  vect_in)

Set the current nonparametric centre of mass.

References nonparametric_COM_vect_.

Referenced by MainWindow::on_tool_rotate_nonparametric_clicked().

Member Data Documentation

◆ extended_drag_mode_

HBPDOGLW_extended_drag_mode ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::extended_drag_mode_
private

The drag mode, with extended options for translating the nonparametric geometry or rotating it.

Referenced by mouseMoveEvent(), and set_extended_drag_mode().

◆ nonparametric_COM_vect_

numeric::xyzVector< core::Real > ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::nonparametric_COM_vect_
private

The centre-of-mass of nonparametric geometry, for rotation.

Referenced by mouseMoveEvent(), and set_nonparametric_COM_vect().

◆ nonparametric_rotation_xform_

numeric::xyzTransform< core::Real > ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::nonparametric_rotation_xform_
private

The rotation vector for nonparametric geometry.

Referenced by get_nonparametric_rotation_xform(), mouseMoveEvent(), and reset_nonparametric_rotation_xform().

◆ nonparametric_translation_vect_

numeric::xyzVector< core::Real > ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::nonparametric_translation_vect_
private

The translation vector for nonparametric geometry.

Referenced by get_nonparametric_translation_vect(), mouseMoveEvent(), and reset_nonparametric_translation_vect().

◆ x_unit_vect_

numeric::xyzVector< GLfloat > ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::x_unit_vect_
private

A unit vector in the X-direction, used for translating in the screen plane.

Referenced by determine_xyz_unit_vectors(), and mouseMoveEvent().

◆ y_unit_vect_

numeric::xyzVector< GLfloat > ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::y_unit_vect_
private

A unit vector in the Y-direction, used for translating in the screen plane.

Referenced by determine_xyz_unit_vectors(), and mouseMoveEvent().

◆ z_unit_vect_

numeric::xyzVector< GLfloat > ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::z_unit_vect_
private

A unit vector in the Z-direction, used for translating perpendicular to the screen plane.

Referenced by determine_xyz_unit_vectors(), and mouseMoveEvent().


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