|
Blender
V2.93
|
#include <iostream>#include <math.h>#include <string>#include <GL/gl.h>#include "GHOST_Rect.h"#include "GHOST_IEvent.h"#include "GHOST_IEventConsumer.h"#include "GHOST_ISystem.h"Go to the source code of this file.
Classes | |
| class | Application |
Macros | |
| #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 |
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. Stereo code by Raymond de Vries, januari 2002
Definition at line 52 of file GHOST_Test.cpp.
| #define RIGHT_EYE 1 |
Definition at line 53 of file GHOST_Test.cpp.
|
static |
Definition at line 186 of file GHOST_Test.cpp.
References gearGL(), glEnable, glLightfv, glMaterialfv, and pos.
Referenced by RenderScene().
|
static |
Definition at line 79 of file GHOST_Test.cpp.
References angle(), KDL::cos(), glBegin, glEnd, glNormal3f, glShadeModel, glVertex3f, len, KDL::sin(), sqrt(), v, and width.
Referenced by drawGearGL().
|
static |
Definition at line 734 of file GHOST_Test.cpp.
References fAngle, fApp, fSystem, GHOST_IWindow::invalidate(), Application::m_fullScreenWindow, blender::compositor::task, GHOST_ISystem::validWindow(), and view_roty.
Referenced by Application::Application().
| int main | ( | int | , |
| char ** | |||
| ) |
Definition at line 665 of file GHOST_Test.cpp.
References GHOST_ISystem::addEventConsumer(), GHOST_ISystem::createSystem(), GHOST_ISystem::dispatchEvents(), GHOST_ISystem::disposeSystem(), fSystem, GHOST_ISystem::getSystem(), Application::m_exitRequested, nVidiaWindows, GHOST_ISystem::processEvents(), and GHOST_ISystem::removeEventConsumer().
| void RenderCamera | ( | ) |
Definition at line 218 of file GHOST_Test.cpp.
References glRotatef, view_rotx, view_roty, and view_rotz.
Referenced by Application::processEvent().
| void RenderScene | ( | ) |
Definition at line 225 of file GHOST_Test.cpp.
References drawGearGL(), fAngle, glPopMatrix, glPushMatrix, glRotatef, and glTranslatef.
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 339 of file GHOST_Test.cpp.
References bottom, glFrustum, glLoadIdentity, glTranslatef, left, right, and top.
Referenced by View().
|
static |
Definition at line 74 of file GHOST_Test.cpp.
References time.
Referenced by Application::processEvent().
|
static |
Definition at line 247 of file GHOST_Test.cpp.
References GHOST_IWindow::activateDrawingContext(), bottom, distance(), GHOST_IWindow::getClientBounds(), GHOST_Rect::getHeight(), GHOST_Rect::getWidth(), glFrustum, glLoadIdentity, glMatrixMode, glTranslatef, left, LEFT_EYE, nVidiaWindows, right, RIGHT_EYE, Application::stereo, StereoProjection(), and top.
Referenced by Application::processEvent().
|
static |
Definition at line 61 of file GHOST_Test.cpp.
Referenced by gearsTimerProc(), and RenderScene().
|
static |
Definition at line 59 of file GHOST_Test.cpp.
Referenced by Application::Application(), and gearsTimerProc().
|
static |
Definition at line 62 of file GHOST_Test.cpp.
Referenced by gearsTimerProc(), and main().
|
static |
Definition at line 55 of file GHOST_Test.cpp.
|
static |
Definition at line 60 of file GHOST_Test.cpp.
Referenced by RenderCamera().
|
static |
Definition at line 60 of file GHOST_Test.cpp.
Referenced by gearsTimerProc(), and RenderCamera().
|
static |
Definition at line 60 of file GHOST_Test.cpp.
Referenced by Application::processEvent(), and RenderCamera().