ReTo  0.3.7
reto::SelectionSystem::RubberBand Class Reference

Class to manage rubberband selection. More...

#include <SelectionSystem.h>

+ Collaboration diagram for reto::SelectionSystem::RubberBand:

Public Member Functions

 RubberBand (const unsigned int &width, const unsigned int &height)
 RubberBand constructor. More...
 
 ~RubberBand (void)
 Rubberband destructor.
 
void setColor (const Eigen::Vector4f &color)
 Method to set the selection color. More...
 
void setLineWidth (const float &width)
 Method to set the width of the border line of the selection. More...
 
void resize (const unsigned int &width, const unsigned int &height)
 Method used on resize callback to change width and height for calculating points. More...
 
void draw (void)
 Method to draw rubberband.
 
void mouseDown (const Point &point)
 Method used on mouse down callback to get a point. More...
 
void mouseMove (const Point &point)
 Method used on mouse move callback to get the a point. More...
 
void mouseUp (const Point &point, float *viewProj)
 Method used on mouse up callback to get the a point, call to transform feedback and clear points. More...
 
reto::ShaderProgram *const & program (void) const
 Method to get program handler for line and filling. More...
 
void addObject (reto::Pickable *object)
 Method to add a pickable object. More...
 
void removeObject (reto::Pickable *object)
 Method to remove a pickable object. More...
 

Detailed Description

Class to manage rubberband selection.

Definition at line 52 of file SelectionSystem.h.

Constructor & Destructor Documentation

reto::SelectionSystem::RubberBand::RubberBand ( const unsigned int &  width,
const unsigned int &  height 
)

RubberBand constructor.

Parameters
widthscreen width
heightscreen height

Member Function Documentation

void reto::SelectionSystem::RubberBand::addObject ( reto::Pickable object)

Method to add a pickable object.

Parameters
objectPickable object
void reto::SelectionSystem::RubberBand::mouseDown ( const Point &  point)

Method used on mouse down callback to get a point.

Parameters
pointfirst point of the selection
void reto::SelectionSystem::RubberBand::mouseMove ( const Point &  point)

Method used on mouse move callback to get the a point.

Parameters
pointlast point of the selection (while moving)
void reto::SelectionSystem::RubberBand::mouseUp ( const Point &  point,
float *  viewProj 
)

Method used on mouse up callback to get the a point, call to transform feedback and clear points.

Parameters
pointlast point of the selection
viewProjview projection matrix
reto::ShaderProgram* const& reto::SelectionSystem::RubberBand::program ( void  ) const

Method to get program handler for line and filling.

Returns
program handler.
void reto::SelectionSystem::RubberBand::removeObject ( reto::Pickable object)

Method to remove a pickable object.

Parameters
objectPickable object
void reto::SelectionSystem::RubberBand::resize ( const unsigned int &  width,
const unsigned int &  height 
)

Method used on resize callback to change width and height for calculating points.

Parameters
widthscreen width
heightscreen height
void reto::SelectionSystem::RubberBand::setColor ( const Eigen::Vector4f &  color)

Method to set the selection color.

Parameters
colorselection color
void reto::SelectionSystem::RubberBand::setLineWidth ( const float &  width)

Method to set the width of the border line of the selection.

Parameters
widthline size

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