#include <TransformerPan.h>
Inheritance diagram for TransformerPan:
Public Member Functions | |
TransformerPan (int width, int height, float scale) | |
Create a TransformerPan with the given dimensions and scaling factor. | |
void | reshape (int width, int height) |
Update the TransformerPan dimensions. | |
void | start (float x, float y) |
Starts a translation. | |
const Matrix | end (float x, float y) |
Compute the translation matrix determined by the start of the transformation (m_startX, m_startY) and the current mouse position. | |
Private Attributes | |
float | m_startX |
The mouse click starting coordinate. | |
float | m_startY |
The mouse click starting coordinate. | |
float | m_scale |
The scaling factor for the mouse movement. |
|
Update the TransformerPan dimensions. This method does nothing. Implements Transformer. |
|
Starts a translation. Sets up m_startX and m_startY to point to the current mouse click. Implements Transformer. |
|
The scaling factor for the mouse movement. The mouse movement distance (in window space) is scaled by this value in order to avoid creating translations which are too big or to small relative to the object coordinates. |