vtLastMouse Class Reference
[Engines and Events]

Inheritance diagram for vtLastMouse:

Inheritance graph
[legend]
List of all members.

Detailed Description

This simple engine extends the base class vtEngine with the ability to remember the last state of the mouse. This is useful for engines which simply need to know mouse state (cursor position and button state). They can simply subclass from vtLastMouse and use the inherited fields rather than having to catch mouse events.


Public Member Functions

void OnMouse (vtMouseEvent &event)
 Virtual handler, to catch mouse events, can be overridden by your engine class.
void GetNormalizedMouseCoords (float &mx, float &my)

Public Attributes

int m_buttons
IPoint2 m_pos
int m_flags


Member Function Documentation

void vtLastMouse::GetNormalizedMouseCoords float &  mx,
float &  my
 

Returns the mouse coordinates in the window, normalized such that X and Y range from -1 to 1 (left to right, top to bottom across the window.


Member Data Documentation

int vtLastMouse::m_buttons
 

The state of the mouse buttons

int vtLastMouse::m_flags
 

Last known state of the modifier flags

IPoint2 vtLastMouse::m_pos
 

The location of the mouse cursor


Generated on Tue Apr 22 10:11:07 2008 for vtlib library by  doxygen 1.4.5