TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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 grSetRenderOrigin (double x, double y)
void grShutdownScene (void)
void grDrawBackground (class cGrCamera *cam, class cGrBackgroundCam *bgCam)
void grCustomizePits (void)

Variables

int grWrldX
int grWrldY
int grWrldZ
int grWrldMaxSize
sgVec3 grRenderOrigin
tTrack * grTrack
ssgStateSelector * grEnvSelector
grMultiTexState * grEnvState =NULL
grMultiTexState * grEnvShadowState =NULL
grMultiTexState * grEnvShadowStateOnCars =NULL
ssgRoot * TheScene = 0
static ssgRoot * TheBackground = 0
static ssgTransform * WorldAnchor = 0
ssgTransform * SunAnchor = 0
ssgBranch * LandAnchor = 0
ssgBranch * CarsAnchor = 0
ssgBranch * ShadowAnchor = 0
ssgBranch * PitsAnchor = 0
ssgTransform * 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 65 of file grscene.cpp.

◆ NB_BG_FACES

#define NB_BG_FACES   36

Definition at line 64 of file grscene.cpp.

Function Documentation

◆ grCustomizePits()

void grCustomizePits ( void )

Definition at line 642 of file grscene.cpp.

Here is the call graph for this function:

◆ grDrawBackground()

void grDrawBackground ( class cGrCamera * cam,
class cGrBackgroundCam * bgCam )

Definition at line 629 of file grscene.cpp.

Here is the call graph for this function:

◆ grDrawScene()

void grDrawScene ( void )

Definition at line 249 of file grscene.cpp.

◆ grInitScene()

int grInitScene ( void )

Definition at line 95 of file grscene.cpp.

Here is the call graph for this function:

◆ grLoadScene()

int grLoadScene ( tTrack * track)

Definition at line 170 of file grscene.cpp.

Here is the call graph for this function:

◆ grSetRenderOrigin()

void grSetRenderOrigin ( double x,
double y )

Definition at line 257 of file grscene.cpp.

◆ grShutdownScene()

void grShutdownScene ( void )

Definition at line 276 of file grscene.cpp.

◆ grssgLoadAC3D()

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

Definition at line 1149 of file grloadac.cpp.

◆ initBackground()

void initBackground ( void )
static

Definition at line 310 of file grscene.cpp.

Here is the call graph for this function:

◆ preScene()

int preScene ( ssgEntity * e)

Definition at line 88 of file grscene.cpp.

Variable Documentation

◆ CarlightAnchor

ssgBranch* CarlightAnchor = 0

Definition at line 79 of file grscene.cpp.

◆ CarsAnchor

ssgBranch* CarsAnchor = 0

Definition at line 74 of file grscene.cpp.

◆ grEnvSelector

ssgStateSelector* grEnvSelector

Definition at line 60 of file grscene.cpp.

◆ grEnvShadowState

grMultiTexState* grEnvShadowState =NULL

Definition at line 62 of file grscene.cpp.

◆ grEnvShadowStateOnCars

grMultiTexState* grEnvShadowStateOnCars =NULL

Definition at line 63 of file grscene.cpp.

◆ grEnvState

grMultiTexState* grEnvState =NULL

Definition at line 61 of file grscene.cpp.

◆ grRenderOrigin

sgVec3 grRenderOrigin

Definition at line 57 of file grscene.cpp.

◆ grTrack

tTrack* grTrack

Definition at line 58 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 73 of file grscene.cpp.

◆ options

ssgLoaderOptionsEx options
static

Definition at line 167 of file grscene.cpp.

◆ PitsAnchor

ssgBranch* PitsAnchor = 0

Definition at line 76 of file grscene.cpp.

◆ ShadowAnchor

ssgBranch* ShadowAnchor = 0

Definition at line 75 of file grscene.cpp.

◆ SkidAnchor

ssgBranch* SkidAnchor = 0

Definition at line 78 of file grscene.cpp.

◆ SmokeAnchor

ssgTransform* SmokeAnchor = 0

Definition at line 77 of file grscene.cpp.

◆ sun_grscene

ssgTransform* sun_grscene = NULL

Definition at line 82 of file grscene.cpp.

◆ SunAnchor

ssgTransform* SunAnchor = 0

Definition at line 72 of file grscene.cpp.

◆ TheBackground

ssgRoot* TheBackground = 0
static

Definition at line 68 of file grscene.cpp.

◆ ThePits

ssgBranch* ThePits = 0

Definition at line 81 of file grscene.cpp.

◆ TheScene

ssgRoot* TheScene = 0

Definition at line 67 of file grscene.cpp.

◆ WorldAnchor

ssgTransform* WorldAnchor = 0
static

Definition at line 69 of file grscene.cpp.