Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

TransformerZoom Class Reference

Implements the Transformer to compute the transformation Matrix as a translation in/out of the screen (along the Z axis) from the current mouse position in the direction of the Y mouse movement. More...

#include <TransformerZoom.h>

Inheritance diagram for TransformerZoom:

Transformer List of all members.

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.


Detailed Description

Implements the Transformer to compute the transformation Matrix as a translation in/out of the screen (along the Z axis) from the current mouse position in the direction of the Y 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).


Member Function Documentation

void TransformerZoom::reshape int  width,
int  height
[virtual]
 

Update the TransformerZoom dimensions.

This method does nothing.

Implements Transformer.

void TransformerZoom::start float  x,
float  y
[virtual]
 

Starts a translation.

Sets up m_startY to point to the current mouse click.

Implements Transformer.


Member Data Documentation

float TransformerZoom::m_scale [private]
 

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.


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 23:40:58 2003 for Shadow by doxygen 1.3.2