My Project
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
RayWindow Class Reference

#include <rayWindow.h>

Public Types

enum  { NO_CULL, CULL_BACK_FACE, CULL_FRONT_FACE }
 

Static Public Member Functions

static int PrintError (const int &showNoError=0)
 
static void WriteLeftString (const int &x, const int &y, const char *str)
 
static void WriteRightString (const int &x, const int &y, const char *str)
 
static int TakeSnapshot (Image32 &img)
 
static void IdleFunction (void)
 
static void VisibilityFunction (int state)
 
static void MouseFunction (int button, int state, int x, int y)
 
static void MotionFunction (int x, int y)
 
static void PassiveMotionFunction (int x, int y)
 
static void KeyboardFunction (unsigned char c, int x, int y)
 
static void SpecialFunction (int key, int x, int y)
 
static void DrawModeMenu (int entry)
 
static void CullModeMenu (int entry)
 
static void CurveFitMenu (int entry)
 
static void MainMenu (int entry)
 
static void DisplayFunction (void)
 
static void ReshapeFunction (int width, int height)
 
static void RayView (RayScene *scene, int width, int height, int cplx)
 

Static Public Attributes

static const char KEY_ESCAPE ='\033'
 
static RayScenescene =NULL
 
static Mouse mouse
 
static Point3D center
 
static double radius
 
static int isVisible
 
static int frameCount
 
static double frameCountStart
 
static double frameRate
 
static double startTime
 
static int curveFit =LINEAR
 

Detailed Description

This class represents the OpenGL window within which the 3D models are drawn.

Member Enumeration Documentation

anonymous enum
Enumerator
NO_CULL 

A value indicating that no culling should be used

CULL_BACK_FACE 

A value indicating that back-face culling should be used

CULL_FRONT_FACE 

A value indicating that front-face culling should be used

Member Function Documentation

void RayWindow::CullModeMenu ( int  entry)
static

This function is called when the user updates the cull mode in the drop-down menu.

void RayWindow::CurveFitMenu ( int  entry)
static

This function is called when the user updates the curve fitting method in the drop-down menu.

void RayWindow::DisplayFunction ( void  )
static

This function draws the OpenGL window.

void RayWindow::DrawModeMenu ( int  entry)
static

This function is called when the user updates the draw mode in the drop-down menu.

void RayWindow::IdleFunction ( void  )
static

This function is called when no events need to be processed.

void RayWindow::KeyboardFunction ( unsigned char  c,
int  x,
int  y 
)
static

This function is called when the user presses a key.

void RayWindow::MainMenu ( int  entry)
static

This function is called when the user selects one of the main menu options in the drop-down menu.

void RayWindow::MotionFunction ( int  x,
int  y 
)
static

This function is called when one of the mouse buttons is depressed and the mouse is moved.

void RayWindow::MouseFunction ( int  button,
int  state,
int  x,
int  y 
)
static

This function is called when the state of a mouse button is changed

void RayWindow::PassiveMotionFunction ( int  x,
int  y 
)
static

This function is called when the mouse is moved moved but no buttons are depressed.

int RayWindow::PrintError ( const int &  showNoError = 0)
static

This function prints out the state of the OpenGL error.

void RayWindow::RayView ( RayScene s,
int  width,
int  height,
int  cplx 
)
static

This function instantiates the OpenGL window, reading in the RayScene from the specified file and setting the initial OpenGL window size. The function never returns!

void RayWindow::ReshapeFunction ( int  width,
int  height 
)
static

This function is called when the window is resized.

void RayWindow::SpecialFunction ( int  key,
int  x,
int  y 
)
static

This function is called when the user presses one of the special keys.

int RayWindow::TakeSnapshot ( Image32 img)
static

This function reads the current frame buffer and sets the pixels of the image accordingly.

void RayWindow::VisibilityFunction ( int  state)
static

This function is called when the visibility state of the window changes.

void RayWindow::WriteLeftString ( const int &  x,
const int &  y,
const char *  str 
)
static

This function writes out the specified string, left-aligned, at the specified location, onto the OpenGL window.

void RayWindow::WriteRightString ( const int &  x,
const int &  y,
const char *  str 
)
static

This function writes out the specified string, right-aligned, at the specified location, onto the OpenGL window.

Member Data Documentation

Point3D RayWindow::center
static

The center of the bounding box of the drawn RayScene

int RayWindow::frameCount
static

The number of frames that have been drawn since the last updated frame rate

double RayWindow::frameCountStart
static

The time of the last updated frame rate

double RayWindow::frameRate
static

The current frame rate

int RayWindow::isVisible
static

Is the window visible

const char RayWindow::KEY_ESCAPE ='\033'
static

The ascii value of the escape character

Mouse RayWindow::mouse
static

The current state of the mouse

double RayWindow::radius
static

The radius of the bounding box of the drawn RayScene

RayScene * RayWindow::scene =NULL
static

A pointer to the scene that is drawn.


The documentation for this class was generated from the following files: