TORCS  1.3.9
The Open Racing Car Simulator
grscene.cpp File Reference
#include <math.h>
#include <stdlib.h>
#include <sys/types.h>
#include <stdio.h>
#include <ctype.h>
#include <GL/glut.h>
#include <plib/ssg.h>
#include <plib/ssgAux.h>
#include <tgfclient.h>
#include <track.h>
#include <car.h>
#include <graphic.h>
#include <robottools.h>
#include <portability.h>
#include "grmain.h"
#include "grshadow.h"
#include "grskidmarks.h"
#include "grsmoke.h"
#include "grcar.h"
#include "grcam.h"
#include "grscene.h"
#include "grutil.h"
#include "grssgext.h"
#include "grtexture.h"
Include dependency graph for grscene.cpp:

Go to the source code of this file.

Macros

#define NB_BG_FACES   36
 
#define BG_DIST   1.0
 

Functions

static void initBackground (void)
 
ssgEntity * grssgLoadAC3D (const char *fname, const ssgLoaderOptions *options)
 
int preScene (ssgEntity *e)
 
int grInitScene (void)
 
int grLoadScene (tTrack *track)
 
void grDrawScene (void)
 
void grShutdownScene (void)
 
void grDrawBackground (class cGrCamera *cam, class cGrBackgroundCam *bgCam)
 
void grCustomizePits (void)
 

Variables

int grWrldX
 
int grWrldY
 
int grWrldZ
 
int grWrldMaxSize
 
tTrackgrTrack
 
ssgStateSelector * grEnvSelector
 
grMultiTexStategrEnvState =NULL
 
grMultiTexStategrEnvShadowState =NULL
 
grMultiTexStategrEnvShadowStateOnCars =NULL
 
ssgRoot * TheScene = 0
 
static ssgRoot * TheBackground = 0
 
ssgBranch * SunAnchor = 0
 
ssgBranch * LandAnchor = 0
 
ssgBranch * CarsAnchor = 0
 
ssgBranch * ShadowAnchor = 0
 
ssgBranch * PitsAnchor = 0
 
ssgBranch * SmokeAnchor = 0
 
ssgBranch * SkidAnchor = 0
 
ssgBranch * CarlightAnchor = 0
 
ssgBranch * ThePits = 0
 
ssgTransform * sun_grscene = NULL
 
static ssgLoaderOptionsEx options
 

Macro Definition Documentation

◆ BG_DIST

#define BG_DIST   1.0

Definition at line 64 of file grscene.cpp.

◆ NB_BG_FACES

#define NB_BG_FACES   36

Definition at line 63 of file grscene.cpp.

Function Documentation

◆ grCustomizePits()

void grCustomizePits ( void  )

Definition at line 618 of file grscene.cpp.

Here is the call graph for this function:

◆ grDrawBackground()

void grDrawBackground ( class cGrCamera cam,
class cGrBackgroundCam bgCam 
)

Definition at line 605 of file grscene.cpp.

Here is the call graph for this function:

◆ grDrawScene()

void grDrawScene ( void  )

Definition at line 244 of file grscene.cpp.

◆ grInitScene()

int grInitScene ( void  )

Definition at line 93 of file grscene.cpp.

Here is the call graph for this function:

◆ grLoadScene()

int grLoadScene ( tTrack track)

Definition at line 168 of file grscene.cpp.

Here is the call graph for this function:

◆ grShutdownScene()

void grShutdownScene ( void  )

Definition at line 252 of file grscene.cpp.

◆ grssgLoadAC3D()

ssgEntity* grssgLoadAC3D ( const char *  fname,
const ssgLoaderOptions *  options 
)

Definition at line 1149 of file grloadac.cpp.

Here is the call graph for this function:

◆ initBackground()

static void initBackground ( void  )
static

Definition at line 286 of file grscene.cpp.

Here is the call graph for this function:

◆ preScene()

int preScene ( ssgEntity *  e)

Definition at line 86 of file grscene.cpp.

Variable Documentation

◆ CarlightAnchor

ssgBranch* CarlightAnchor = 0

Definition at line 77 of file grscene.cpp.

◆ CarsAnchor

ssgBranch* CarsAnchor = 0

Definition at line 72 of file grscene.cpp.

◆ grEnvSelector

ssgStateSelector* grEnvSelector

Definition at line 59 of file grscene.cpp.

◆ grEnvShadowState

grMultiTexState* grEnvShadowState =NULL

Definition at line 61 of file grscene.cpp.

◆ grEnvShadowStateOnCars

grMultiTexState* grEnvShadowStateOnCars =NULL

Definition at line 62 of file grscene.cpp.

◆ grEnvState

grMultiTexState* grEnvState =NULL

Definition at line 60 of file grscene.cpp.

◆ grTrack

tTrack* grTrack

Definition at line 57 of file grscene.cpp.

◆ grWrldMaxSize

int grWrldMaxSize

Definition at line 56 of file grscene.cpp.

◆ grWrldX

int grWrldX

Definition at line 53 of file grscene.cpp.

◆ grWrldY

int grWrldY

Definition at line 54 of file grscene.cpp.

◆ grWrldZ

int grWrldZ

Definition at line 55 of file grscene.cpp.

◆ LandAnchor

ssgBranch* LandAnchor = 0

Definition at line 71 of file grscene.cpp.

◆ options

ssgLoaderOptionsEx options
static

Definition at line 165 of file grscene.cpp.

◆ PitsAnchor

ssgBranch* PitsAnchor = 0

Definition at line 74 of file grscene.cpp.

◆ ShadowAnchor

ssgBranch* ShadowAnchor = 0

Definition at line 73 of file grscene.cpp.

◆ SkidAnchor

ssgBranch* SkidAnchor = 0

Definition at line 76 of file grscene.cpp.

◆ SmokeAnchor

ssgBranch* SmokeAnchor = 0

Definition at line 75 of file grscene.cpp.

◆ sun_grscene

ssgTransform* sun_grscene = NULL

Definition at line 80 of file grscene.cpp.

◆ SunAnchor

ssgBranch* SunAnchor = 0

Definition at line 70 of file grscene.cpp.

◆ TheBackground

ssgRoot* TheBackground = 0
static

Definition at line 67 of file grscene.cpp.

◆ ThePits

ssgBranch* ThePits = 0

Definition at line 79 of file grscene.cpp.

◆ TheScene

ssgRoot* TheScene = 0

Definition at line 66 of file grscene.cpp.