Blender  V3.3
Classes | Macros | Functions | Variables
GHOST_Test.cpp File Reference
#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, uint64_t 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 *, uint64_t 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
 

Macro Definition Documentation

◆ LEFT_EYE

#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 36 of file GHOST_Test.cpp.

◆ RIGHT_EYE

#define RIGHT_EYE   1

Definition at line 37 of file GHOST_Test.cpp.

Function Documentation

◆ drawGearGL()

static void drawGearGL ( int  id)
static

Definition at line 170 of file GHOST_Test.cpp.

References gearGL(), glEnable, glLightfv, glMaterialfv, and pos.

Referenced by RenderScene().

◆ gearGL()

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

Definition at line 63 of file GHOST_Test.cpp.

References angle(), KDL::cos(), glBegin, glEnd, glNormal3f, glShadeModel, glVertex3f, len, KDL::sin(), sqrt(), v, and width.

Referenced by drawGearGL().

◆ gearsTimerProc()

static void gearsTimerProc ( GHOST_ITimerTask task,
uint64_t  time 
)
static

◆ main()

int main ( int  ,
char **   
)

◆ RenderCamera()

void RenderCamera ( )

Definition at line 202 of file GHOST_Test.cpp.

References glRotatef, view_rotx, view_roty, and view_rotz.

Referenced by Application::processEvent().

◆ RenderScene()

void RenderScene ( )

Definition at line 209 of file GHOST_Test.cpp.

References drawGearGL(), fAngle, glPopMatrix, glPushMatrix, glRotatef, and glTranslatef.

Referenced by Application::processEvent().

◆ StereoProjection()

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

Definition at line 323 of file GHOST_Test.cpp.

References bottom, glFrustum, glLoadIdentity, glTranslatef, left, right, and top.

Referenced by View().

◆ testTimerProc()

static void testTimerProc ( GHOST_ITimerTask ,
uint64_t  time 
)
static

Definition at line 58 of file GHOST_Test.cpp.

References time.

Referenced by Application::processEvent().

◆ View()

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

Variable Documentation

◆ fAngle

GLfloat fAngle = 0.0
static

Definition at line 45 of file GHOST_Test.cpp.

Referenced by gearsTimerProc(), and RenderScene().

◆ fApp

class Application* fApp
static

Definition at line 43 of file GHOST_Test.cpp.

Referenced by Application::Application(), and gearsTimerProc().

◆ fSystem

GHOST_ISystem* fSystem = 0
static

Definition at line 46 of file GHOST_Test.cpp.

Referenced by gearsTimerProc(), and main().

◆ nVidiaWindows

bool nVidiaWindows
static

Definition at line 39 of file GHOST_Test.cpp.

Referenced by main(), and View().

◆ view_rotx

GLfloat view_rotx = 20.0
static

Definition at line 44 of file GHOST_Test.cpp.

Referenced by RenderCamera().

◆ view_roty

GLfloat view_roty = 30.0
static

Definition at line 44 of file GHOST_Test.cpp.

Referenced by gearsTimerProc(), and RenderCamera().

◆ view_rotz

GLfloat view_rotz = 0.0
static

Definition at line 44 of file GHOST_Test.cpp.

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