Blender V2.61 - r43446
Classes | Defines | Functions | Variables

GHOST_Test.cpp File Reference

#include <iostream>
#include <math.h>
#include <GL/gl.h>
#include "STR_String.h"
#include "GHOST_Rect.h"
#include "GHOST_ISystem.h"
#include "GHOST_IEvent.h"
#include "GHOST_IEventConsumer.h"

Go to the source code of this file.

Classes

class  Application

Defines

#define LEFT_EYE   0
#define RIGHT_EYE   1

Functions

static void gearsTimerProc (GHOST_ITimerTask *task, GHOST_TUns64 time)
void StereoProjection (float left, float right, float bottom, float top, float nearplane, float farplane, float zero_plane, float dist, float eye)
static void testTimerProc (GHOST_ITimerTask *, GHOST_TUns64 time)
static void gearGL (GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth)
static void drawGearGL (int id)
void RenderCamera ()
void RenderScene ()
static void View (GHOST_IWindow *window, bool stereo, int eye=0)
int main (int, char **)

Variables

static bool nVidiaWindows
static class ApplicationfApp
static GLfloat view_rotx = 20.0
static GLfloat view_roty = 30.0
static GLfloat view_rotz = 0.0
static GLfloat fAngle = 0.0
static GHOST_ISystemfSystem = 0

Define Documentation

#define LEFT_EYE   0

***** BEGIN GPL LICENSE BLOCK *****

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.

The Original Code is: all of this file.

Contributor(s): none yet.

***** END GPL LICENSE BLOCK *****

Copyright (C) 2001 NaN Technologies B.V. Simple test file for the GHOST library. The OpenGL gear code is taken from the Qt sample code which, in turn, is probably taken from somewhere as well.

Author:
Maarten Gribnau
Date:
May 31, 2001 Stereo code by Raymond de Vries, januari 2002

Definition at line 64 of file GHOST_Test.cpp.

Referenced by Application::processEvent(), and View().

#define RIGHT_EYE   1

Definition at line 65 of file GHOST_Test.cpp.

Referenced by Application::processEvent(), and View().


Function Documentation

static void drawGearGL ( int  id) [static]

Definition at line 196 of file GHOST_Test.cpp.

References gearGL().

Referenced by RenderScene().

static void gearGL ( GLfloat  inner_radius,
GLfloat  outer_radius,
GLfloat  width,
GLint  teeth,
GLfloat  tooth_depth 
) [static]

Definition at line 88 of file GHOST_Test.cpp.

References angle(), cos(), i, len(), sin(), and sqrt().

Referenced by drawGearGL().

static void gearsTimerProc ( GHOST_ITimerTask task,
GHOST_TUns64  time 
) [static]
int main ( int  ,
char **   
)
void RenderCamera ( )

Definition at line 230 of file GHOST_Test.cpp.

References view_rotx, view_roty, and view_rotz.

Referenced by Application::processEvent().

void RenderScene ( )

Definition at line 238 of file GHOST_Test.cpp.

References drawGearGL(), and fAngle.

Referenced by Application::processEvent().

void StereoProjection ( float  left,
float  right,
float  bottom,
float  top,
float  nearplane,
float  farplane,
float  zero_plane,
float  dist,
float  eye 
)

Definition at line 346 of file GHOST_Test.cpp.

References left().

Referenced by View().

static void testTimerProc ( GHOST_ITimerTask ,
GHOST_TUns64  time 
) [static]

Definition at line 82 of file GHOST_Test.cpp.

Referenced by Application::processEvent().

static void View ( GHOST_IWindow window,
bool  stereo,
int  eye = 0 
) [static]

Variable Documentation

GLfloat fAngle = 0.0 [static]

Definition at line 73 of file GHOST_Test.cpp.

Referenced by gearsTimerProc(), and RenderScene().

class Application* fApp [static]

Definition at line 71 of file GHOST_Test.cpp.

GHOST_ISystem* fSystem = 0 [static]

Definition at line 74 of file GHOST_Test.cpp.

bool nVidiaWindows [static]

Definition at line 67 of file GHOST_Test.cpp.

Referenced by main(), and View().

GLfloat view_rotx = 20.0 [static]

Definition at line 72 of file GHOST_Test.cpp.

Referenced by RenderCamera().

GLfloat view_roty = 30.0

Definition at line 72 of file GHOST_Test.cpp.

GLfloat view_rotz = 0.0

Definition at line 72 of file GHOST_Test.cpp.