Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

GlutWindowExaminer Class Reference
[GLUT Master]

Examiner Style Window Class. More...

#include <winexam.h>

Inheritance diagram for GlutWindowExaminer:

Inheritance graph
[legend]
Collaboration diagram for GlutWindowExaminer:

Collaboration graph
[legend]
List of all members.

Public Types

enum  MouseMode
 Mouse zoom-pan-rotate mode.


Public Methods

 GlutWindowExaminer (const std::string &title=titleDefault, int width=widthDefault, int height=heightDefault, int x=xDefault, int y=yDefault, unsigned int displayMode=displayModeDefault)
 Constructor.

virtual ~GlutWindowExaminer ()
 Destructor.

void OnOpen ()
 Handler for window open event(s).

void OnClose ()
 Handler for window close event(s).

void OnReshape (int w, int h)
 Handler for window reshape events.

void OnKeyboard (unsigned char key, int x, int y)
 Handler for keyboard events.

void OnSpecial (int key, int x, int y)
 Handler for special keyboard events (function keys, etc).

void OnMenu (int value)
 Handler for menu events.

void OnMouse (int button, int state, int x, int y)
 Handler for mouse button events.

void OnMotion (int x, int y)
 Handler for mouse movement events.

void OnPassiveMotion (int x, int y)
 Handler for passive mouse motion events (no button pressed).

virtual void OnOrient (const Matrix &viewing, const Matrix &inverse)
 Callback handler for changes in viewing direction.

virtual Vector getReferencePoint (int x, int y, const Vector &pos, const Matrix &modelView, const Matrix &modelViewInverse) const
 Callback handler for getting a refernce point from mouse x and y.

VectorreferencePoint ()
 Current reference point.

bool & mouseZoom ()
 Enable mouse zooming.

bool & mousePan ()
 Enable mouse panning.

bool & mouseRotate ()
 Enable mouse rotation.

MouseModemouseMode ()
 Mouse mode.


Protected Methods

bool mousePressed () const
 Is any mouse button currently pressed?

Vector xAxisOfRotation () const
 Calculate x-axis rotation in transformed co-ordinates.

Vector yAxisOfRotation () const
 Calculate y-axis rotation in transformed co-ordinates.

Vector axisOfRotation (const Vector &v) const
 Calculate rotation axis in transformed co-ordinates.

void OnPreDisplay ()
 Apply current transformation matrix before doing anything else.

Vector dragPos (const int x, const int y) const
 Convert from screen co-ordinates to world co-ordinates.


Protected Attributes

Matrix _viewMatrix
 Current transformation matrix.

Matrix _viewMatrixInverse
 Current transformation matrix inverse.


Detailed Description

Examiner Style Window Class.

Definition at line 42 of file winexam.h.


Member Function Documentation

void GlutWindowExaminer::OnOpen   [virtual]
 

Handler for window open event(s).

Note:
Implement your own OpenGL initialisation here

Reimplemented from GlutWindow.

Definition at line 73 of file winexam.cpp.

References _viewMatrix, _viewMatrixInverse, GlutWindow::OnOpen(), and OnOrient().

void GlutWindowExaminer::OnClose   [virtual]
 

Handler for window close event(s).

Note:
Implement your own OpenGL shutdown/cleanup here

Reimplemented from GlutWindow.

Definition at line 79 of file winexam.cpp.

References GlutWindow::OnClose().


The documentation for this class was generated from the following files:
Generated on Tue Nov 5 11:11:49 2002 for GLT by doxygen1.2.18