Blender V4.3
GHOST_Test.cpp File Reference
#include <iostream>
#include <math.h>
#include <string>
#include <GL/gl.h>
#include "GHOST_Rect.hh"
#include "GHOST_IEvent.hh"
#include "GHOST_IEventConsumer.hh"
#include "GHOST_ISystem.hh"

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

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

◆ RIGHT_EYE

#define RIGHT_EYE   1

Definition at line 38 of file GHOST_Test.cpp.

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

Function Documentation

◆ drawGearGL()

static void drawGearGL ( int id)
static

Definition at line 171 of file GHOST_Test.cpp.

References gearGL(), 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 64 of file GHOST_Test.cpp.

References angle(), cos(), len, sqrt(), and v.

Referenced by drawGearGL().

◆ gearsTimerProc()

static void gearsTimerProc ( GHOST_ITimerTask * task,
uint64_t time )
static

◆ main()

◆ RenderCamera()

void RenderCamera ( )

Definition at line 203 of file GHOST_Test.cpp.

References view_rotx, view_roty, and view_rotz.

Referenced by Application::processEvent().

◆ RenderScene()

void RenderScene ( )

Definition at line 210 of file GHOST_Test.cpp.

References drawGearGL(), and fAngle.

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

References left.

Referenced by View().

◆ testTimerProc()

static void testTimerProc ( GHOST_ITimerTask * ,
uint64_t time )
static

Definition at line 59 of file GHOST_Test.cpp.

References int.

Referenced by Application::processEvent().

◆ View()

Variable Documentation

◆ fAngle

GLfloat fAngle = 0.0
static

Definition at line 46 of file GHOST_Test.cpp.

Referenced by gearsTimerProc(), and RenderScene().

◆ fApp

class Application* fApp
static

Definition at line 44 of file GHOST_Test.cpp.

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

◆ fSystem

GHOST_ISystem* fSystem = 0
static

Definition at line 47 of file GHOST_Test.cpp.

Referenced by gearsTimerProc(), and main().

◆ nVidiaWindows

bool nVidiaWindows
static

Definition at line 40 of file GHOST_Test.cpp.

Referenced by main(), and View().

◆ view_rotx

GLfloat view_rotx = 20.0
static

Definition at line 45 of file GHOST_Test.cpp.

Referenced by RenderCamera().

◆ view_roty

GLfloat view_roty = 30.0
static

Definition at line 45 of file GHOST_Test.cpp.

Referenced by gearsTimerProc(), and RenderCamera().

◆ view_rotz

GLfloat view_rotz = 0.0
static

Definition at line 45 of file GHOST_Test.cpp.

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