#include <TransformerZoom.h>
Inheritance diagram for TransformerZoom:
Public Member Functions | |
TransformerZoom (int width, int height, float scale) | |
Create a TransformerZoom with the given dimensions and scaling factor. | |
void | reshape (int width, int height) |
Update the TransformerZoom 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_startY) and the current mouse Y position. | |
Private Attributes | |
float | m_startY |
The mouse click starting Y coordinate. | |
float | m_scale |
The scaling factor for the mouse movement. |
If the mouse moves up, the translation into the screen (positive Z axis), else the transformation is out of the screen (negative Z axis).
|
Update the TransformerZoom dimensions. This method does nothing. Implements Transformer. |
|
Starts a translation. Sets up 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. |