Blender V2.61 - r43446
|
#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 Application * | fApp |
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_ISystem * | fSystem = 0 |
#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.
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().
static void drawGearGL | ( | int | id | ) | [static] |
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] |
Definition at line 738 of file GHOST_Test.cpp.
References fAngle, GHOST_ITimerTask::getUserData(), GHOST_IWindow::invalidate(), Application::m_fullScreenWindow, GHOST_ISystem::validWindow(), and view_roty.
Referenced by Application::Application().
int main | ( | int | , |
char ** | |||
) |
Definition at line 672 of file GHOST_Test.cpp.
References GHOST_ISystem::addEventConsumer(), MakeCursor::app, GHOST_ISystem::createSystem(), GHOST_ISystem::dispatchEvents(), GHOST_ISystem::disposeSystem(), DWORD, GHOST_ISystem::getSystem(), HKEY, LONG, Application::m_exitRequested, nVidiaWindows, and GHOST_ISystem::processEvents().
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 | ||
) |
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] |
Definition at line 261 of file GHOST_Test.cpp.
References GHOST_IWindow::activateDrawingContext(), distance(), GHOST_IWindow::getClientBounds(), GHOST_Rect::getHeight(), GHOST_Rect::getWidth(), left(), LEFT_EYE, nVidiaWindows, RIGHT_EYE, and StereoProjection().
Referenced by Application::processEvent().
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.
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.