Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

main.cpp File Reference

#include "common/math/real.h"
#include "common/math/vector3.h"
#include "iframeworkapp.h"
#include "sceneorbiter.h"
#include <cassert>
#include <cstdlib>
#include <GL/glut.h>
#include <IL/il.h>
#include <IL/ilu.h>
#include <IL/ilut.h>

Go to the source code of this file.

Functions

void reset ()
void print_help ()
void reshape (int width, int height)
void keyboard (unsigned char key, int x, int y)
void special (int key, int x, int y)
Vector2 convert_mouse_to_ndc (int x, int y)
void mouse (int button, int state, int x, int y)
void motion (int x, int y)
void think (int)
void update_screen (int)
void draw_grid ()
void draw_axis ()
void draw_dragging_axis ()
void display ()
void shutdown ()
void print_disclaimer ()
int main (int argc, char **argv)

Variables

const Real TUMBLING_SPEED = 3.0
const Real TRACKING_SPEED = 10.0
const Real DOLLYING_SPEED = 8.0
IFrameworkAppg_app
int g_argc
char ** g_argv
GLuint g_grid_list
int g_width
int g_height
int g_old_width
int g_old_height
bool g_is_fullscreen = false
bool g_display_grid = true
bool g_use_freelook = false
bool g_in_step_mode = true
bool g_take_step = false


Function Documentation

Vector2 convert_mouse_to_ndc int  x,
int  y
 

Definition at line 162 of file sheep/src/framework/main.cpp.

References g_height, and g_width.

Referenced by motion(), and mouse().

void display  ) 
 

Definition at line 342 of file sheep/src/framework/main.cpp.

References draw_axis(), draw_dragging_axis(), g_app, g_display_grid, g_grid_list, sheep::SceneOrbiter::GetAzimuth(), sheep::SceneOrbiter::GetCenter(), sheep::SceneOrbiter::GetDistance(), sheep::SceneOrbiter::GetElevation(), sheep::SceneOrbiter::IsDragging(), sheep::IFrameworkApp::m_orbiter, sheep::PI, sheep::IFrameworkApp::Render(), and rtod().

Referenced by main().

void draw_axis  ) 
 

Definition at line 300 of file sheep/src/framework/main.cpp.

References g_app, sheep::SceneOrbiter::GetDistance(), and sheep::IFrameworkApp::m_orbiter.

Referenced by display().

void draw_dragging_axis  ) 
 

Definition at line 324 of file sheep/src/framework/main.cpp.

References g_app, sheep::SceneOrbiter::GetDistance(), and sheep::IFrameworkApp::m_orbiter.

Referenced by display().

void draw_grid  ) 
 

Definition at line 257 of file sheep/src/framework/main.cpp.

Referenced by main().

void keyboard unsigned char  key,
int  x,
int  y
 

Definition at line 68 of file sheep/src/framework/main.cpp.

References sheep::SceneOrbiter::CancelDrag(), sheep::SceneOrbiter::Configure(), sheep::DEFAULT_AZIMUTH, sheep::DEFAULT_DISTANCE, sheep::DEFAULT_ELEVATION, g_app, g_display_grid, g_height, g_in_step_mode, g_is_fullscreen, g_old_height, g_old_width, g_take_step, g_use_freelook, g_width, sheep::SceneOrbiter::IsDragging(), sheep::IFrameworkApp::KeyPressed(), sheep::IFrameworkApp::m_orbiter, print_help(), and reset().

Referenced by main().

int main int  argc,
char **  argv
 

Definition at line 437 of file sheep/src/framework/main.cpp.

References display(), draw_grid(), sheep::FRAME_RATE, g_app, g_argc, g_argv, g_grid_list, keyboard(), motion(), mouse(), print_disclaimer(), print_help(), reset(), reshape(), shutdown(), special(), think(), sheep::THINK_RATE, and update_screen().

void motion int  x,
int  y
 

Definition at line 224 of file sheep/src/framework/main.cpp.

References convert_mouse_to_ndc(), DOLLYING_SPEED, g_app, sheep::SceneOrbiter::IsDollying(), sheep::SceneOrbiter::IsDragging(), sheep::SceneOrbiter::IsTracking(), sheep::SceneOrbiter::IsTumbling(), sheep::IFrameworkApp::m_orbiter, TRACKING_SPEED, TUMBLING_SPEED, and sheep::SceneOrbiter::UpdateDrag().

Referenced by main().

void mouse int  button,
int  state,
int  x,
int  y
 

Definition at line 174 of file sheep/src/framework/main.cpp.

References sheep::SceneOrbiter::BeginDrag(), convert_mouse_to_ndc(), DOLLYING_SPEED, sheep::SceneOrbiter::EndDrag(), g_app, g_use_freelook, sheep::SceneOrbiter::IsDragging(), sheep::IFrameworkApp::m_orbiter, TRACKING_SPEED, and TUMBLING_SPEED.

Referenced by main().

void print_disclaimer  ) 
 

Definition at line 399 of file sheep/src/framework/main.cpp.

void print_help  ) 
 

Definition at line 406 of file sheep/src/framework/main.cpp.

References g_app, and sheep::IFrameworkApp::PrintHelp().

Referenced by keyboard(), and main().

void reset  ) 
 

Definition at line 391 of file sheep/src/framework/main.cpp.

References g_app, g_argc, g_argv, and new_frameworkapp().

Referenced by keyboard(), and main().

void reshape int  width,
int  height
 

Definition at line 61 of file sheep/src/framework/main.cpp.

References g_app, g_height, g_width, and sheep::IFrameworkApp::Reshape().

Referenced by main().

void shutdown  ) 
 

Definition at line 387 of file sheep/src/framework/main.cpp.

References g_app.

Referenced by main().

void special int  key,
int  x,
int  y
 

Definition at line 145 of file sheep/src/framework/main.cpp.

References g_app, g_use_freelook, sheep::SceneOrbiter::GetCenter(), sheep::SceneOrbiter::GetEyePosition(), sheep::IFrameworkApp::m_orbiter, and sheep::SceneOrbiter::SetCenter().

Referenced by main().

void think int   ) 
 

Definition at line 239 of file sheep/src/framework/main.cpp.

References g_app, g_in_step_mode, g_take_step, sheep::IFrameworkApp::Think(), think(), and sheep::THINK_RATE.

Referenced by main(), and think().

void update_screen int   ) 
 

Definition at line 250 of file sheep/src/framework/main.cpp.

References sheep::FRAME_RATE, and update_screen().

Referenced by main(), and update_screen().


Variable Documentation

const Real DOLLYING_SPEED = 8.0
 

Definition at line 40 of file sheep/src/framework/main.cpp.

Referenced by motion(), and mouse().

IFrameworkApp* g_app
 

Definition at line 42 of file sheep/src/framework/main.cpp.

Referenced by display(), draw_axis(), draw_dragging_axis(), keyboard(), main(), motion(), mouse(), print_help(), reset(), reshape(), shutdown(), special(), and think().

int g_argc
 

Definition at line 44 of file sheep/src/framework/main.cpp.

Referenced by main(), and reset().

char** g_argv
 

Definition at line 45 of file sheep/src/framework/main.cpp.

Referenced by main(), and reset().

bool g_display_grid = true
 

Definition at line 53 of file sheep/src/framework/main.cpp.

Referenced by display(), and keyboard().

GLuint g_grid_list
 

Definition at line 47 of file sheep/src/framework/main.cpp.

Referenced by display(), and main().

int g_height
 

Definition at line 49 of file sheep/src/framework/main.cpp.

Referenced by convert_mouse_to_ndc(), keyboard(), and reshape().

bool g_in_step_mode = true
 

Definition at line 55 of file sheep/src/framework/main.cpp.

Referenced by keyboard(), and think().

bool g_is_fullscreen = false
 

Definition at line 52 of file sheep/src/framework/main.cpp.

Referenced by keyboard().

int g_old_height
 

Definition at line 50 of file sheep/src/framework/main.cpp.

Referenced by keyboard().

int g_old_width
 

Definition at line 50 of file sheep/src/framework/main.cpp.

Referenced by keyboard().

bool g_take_step = false
 

Definition at line 56 of file sheep/src/framework/main.cpp.

Referenced by keyboard(), and think().

bool g_use_freelook = false
 

Definition at line 54 of file sheep/src/framework/main.cpp.

Referenced by keyboard(), mouse(), and special().

int g_width
 

Definition at line 49 of file sheep/src/framework/main.cpp.

Referenced by convert_mouse_to_ndc(), keyboard(), and reshape().

const Real TRACKING_SPEED = 10.0
 

Definition at line 39 of file sheep/src/framework/main.cpp.

Referenced by motion(), and mouse().

const Real TUMBLING_SPEED = 3.0
 

Definition at line 38 of file sheep/src/framework/main.cpp.

Referenced by motion(), and mouse().


Generated on Tue May 11 01:31:53 2004 for toxic by doxygen 1.3.6