TRACK Class Reference

#include <track.h>

Collaboration diagram for TRACK:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TRACK ()
 ~TRACK ()
ROADSTRIPAddNewRoad ()
void VisualizeRoads (bool wireframe, bool fill, ROADSTRIP *selectedroad)
void ClearRoads ()
void Write (string trackname)
void Load (string trackname)
void Delete (ROADSTRIP *striptodel)
double Elevation (VERTEX origin)
double Elevation (VERTEX origin, VERTEX &normal)
double ElevationSeg (VERTEX origin, VERTEX &normal, float seglen)
double ElevationSeg (VERTEX origin, VERTEX &normal, float seglen, BEZIER *&collidepatch, OBJECTNODE *&colnode)
bool Collide (VERTEX origin, VERTEX direction, float seglen, VERTEX &outtri, bool closest, VERTEX &normal, float &dist)
bool CollideD (VERTEXD origin, VERTEXD direction, double seglen, VERTEXD &outtri, bool closest, VERTEXD &normal, double &dist)
bool CollideRoads (VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest, ROADSTRIP *&collideroad, BEZIER *&collidepatch, VERTEX &normal)
bool CollideModel (VERTEX *modelverts, int numfaces, AABB bbox, VERTEX &outtri, bool closest, VERTEX &normal, float &depth)
void SetStart (VERTEX newloc)
VERTEX GetStart ()
BEZIERGetPatch (VERTEX corners[4])
QUATERNION GetStartOrientation ()
void SetStartOrientation (QUATERNION newquat)
bool GetCullFaces ()
BEZIERGetLapSequence (int idx)
int NumSectors ()
void GetFrictionParams (float &f1out, float &f2out)

Private Member Functions

int NumRoads ()
BEZIERGetBezier (int ridx, int pidx)

Private Attributes

ROADSTRIPNODEroads
VERTEX startloc
double lastelev
QUATERNION startquat
bool cullfaces
vector< BEZIER * > lapsequence
float friction1
float friction2

Detailed Description

Definition at line 96 of file track.h.


Constructor & Destructor Documentation

TRACK::TRACK  ) 
 

Definition at line 723 of file track.cpp.

References lastelev, NULL, and roads.

TRACK::~TRACK  ) 
 

Definition at line 729 of file track.cpp.

References ClearRoads().


Member Function Documentation

ROADSTRIP * TRACK::AddNewRoad  ) 
 

Definition at line 744 of file track.cpp.

References ROADSTRIPNODE::next, NULL, ROADSTRIPNODE::road, and roads.

Referenced by Load().

void TRACK::ClearRoads  ) 
 

Definition at line 734 of file track.cpp.

References ROADSTRIPNODE::next, NULL, and roads.

Referenced by VAMOSWORLD::DeInit(), Load(), and ~TRACK().

bool TRACK::Collide VERTEX  origin,
VERTEX  direction,
float  seglen,
VERTEX outtri,
bool  closest,
VERTEX normal,
float &  dist
 

Definition at line 1030 of file track.cpp.

References OBJECTS::Collide(), VERTEX::DebugPrint(), VERTEX::equals(), VERTEX::nan(), VERTEX::normalize(), objects, and VERTEX::Set().

bool TRACK::CollideD VERTEXD  origin,
VERTEXD  direction,
double  seglen,
VERTEXD outtri,
bool  closest,
VERTEXD normal,
double &  dist
 

Definition at line 1104 of file track.cpp.

References OBJECTS::CollideD(), VERTEXD::DebugPrint(), VERTEXD::nan(), VERTEXD::normalize(), objects, VERTEXD::Set(), VERTEXD::x, VERTEXD::y, and VERTEXD::z.

bool TRACK::CollideModel VERTEX modelverts,
int  numfaces,
AABB  bbox,
VERTEX outtri,
bool  closest,
VERTEX normal,
float &  depth
 

Definition at line 1323 of file track.cpp.

References OBJECTS::CollideModel(), and objects.

bool TRACK::CollideRoads VERTEX  origin,
VERTEX  direction,
VERTEX outtri,
bool  closest,
ROADSTRIP *&  collideroad,
BEZIER *&  collidepatch,
VERTEX normal
 

Definition at line 986 of file track.cpp.

References ROADSTRIP::Collide(), ROADSTRIPNODE::next, NULL, ROADSTRIPNODE::road, and roads.

Referenced by LoadWorld().

void TRACK::Delete ROADSTRIP striptodel  ) 
 

Definition at line 941 of file track.cpp.

References ROADSTRIPNODE::next, NULL, ROADSTRIPNODE::road, and roads.

double TRACK::Elevation VERTEX  origin,
VERTEX normal
 

Definition at line 1176 of file track.cpp.

References ElevationSeg(), and VERTEX::y.

double TRACK::Elevation VERTEX  origin  ) 
 

Definition at line 1170 of file track.cpp.

double TRACK::ElevationSeg VERTEX  origin,
VERTEX normal,
float  seglen,
BEZIER *&  collidepatch,
OBJECTNODE *&  colnode
 

Definition at line 1189 of file track.cpp.

References VERTEX::nan().

double TRACK::ElevationSeg VERTEX  origin,
VERTEX normal,
float  seglen
 

Definition at line 1182 of file track.cpp.

Referenced by Elevation().

BEZIER * TRACK::GetBezier int  ridx,
int  pidx
[private]
 

Definition at line 1354 of file track.cpp.

References ROADSTRIPNODE::next, BEZIERNODE::next, NULL, BEZIERNODE::patch, ROADSTRIP::patchnodes, Vamos_Geometry::pi, ROADSTRIPNODE::road, and roads.

bool TRACK::GetCullFaces  )  [inline]
 

Definition at line 134 of file track.h.

References cullfaces.

void TRACK::GetFrictionParams float &  f1out,
float &  f2out
[inline]
 

Definition at line 137 of file track.h.

References friction1, and friction2.

BEZIER * TRACK::GetLapSequence int  idx  ) 
 

Definition at line 1387 of file track.cpp.

References lapsequence, NULL, and NumSectors().

Referenced by VAMOSWORLD::Update().

BEZIER * TRACK::GetPatch VERTEX  corners[4]  ) 
 

Definition at line 1328 of file track.cpp.

References VERTEX::equals(), ROADSTRIP::GetFirstNode(), ROADSTRIPNODE::next, BEZIERNODE::next, NULL, BEZIERNODE::patch, BEZIER::points, ROADSTRIPNODE::road, and roads.

Referenced by LoadWorld().

VERTEX TRACK::GetStart  )  [inline]
 

Definition at line 130 of file track.h.

References startloc.

Referenced by VAMOSWORLD::Init(), Vamos_World::World::reset(), SelectCar(), and Write().

QUATERNION TRACK::GetStartOrientation  )  [inline]
 

Definition at line 132 of file track.h.

References startquat.

Referenced by Vamos_World::World::reset().

void TRACK::Load string  trackname  ) 
 

Definition at line 863 of file track.cpp.

References AddNewRoad(), ClearRoads(), cullfaces, SETTINGS::GetDataDir(), CONFIGFILE::GetParam(), CONFIGFILE::Load(), ROADSTRIP::ReadFrom(), VERTEX::Set(), SetStart(), SetStartOrientation(), settings, QUATERNION::w, VERTEX::x, QUATERNION::x, VERTEX::y, QUATERNION::y, VERTEX::z, and QUATERNION::z.

Referenced by LoadWorld().

int TRACK::NumRoads  )  [private]
 

Definition at line 848 of file track.cpp.

References ROADSTRIPNODE::next, NULL, and roads.

Referenced by Write().

int TRACK::NumSectors  )  [inline]
 

Definition at line 136 of file track.h.

References lapsequence.

Referenced by GetLapSequence(), and VAMOSWORLD::Update().

void TRACK::SetStart VERTEX  newloc  )  [inline]
 

Definition at line 129 of file track.h.

References startloc.

Referenced by Load().

void TRACK::SetStartOrientation QUATERNION  newquat  )  [inline]
 

Definition at line 133 of file track.h.

References startquat.

Referenced by Load().

void TRACK::VisualizeRoads bool  wireframe,
bool  fill,
ROADSTRIP selectedroad
 

Definition at line 781 of file track.cpp.

References ROADSTRIPNODE::next, NULL, ROADSTRIPNODE::road, roads, ROADSTRIP::Visualize(), VERTEX::y, VERTEX::z, and VERTEX::zero().

void TRACK::Write string  trackname  ) 
 

Definition at line 829 of file track.cpp.

References SETTINGS::GetDataDir(), GetStart(), ROADSTRIPNODE::next, NULL, NumRoads(), ROADSTRIPNODE::road, roads, settings, ROADSTRIP::WriteTo(), VERTEX::x, VERTEX::y, and VERTEX::z.


Member Data Documentation

bool TRACK::cullfaces [private]
 

Definition at line 104 of file track.h.

Referenced by GetCullFaces(), and Load().

float TRACK::friction1 [private]
 

Definition at line 107 of file track.h.

Referenced by GetFrictionParams().

float TRACK::friction2 [private]
 

Definition at line 108 of file track.h.

Referenced by GetFrictionParams().

vector<BEZIER *> TRACK::lapsequence [private]
 

Definition at line 105 of file track.h.

Referenced by GetLapSequence(), and NumSectors().

double TRACK::lastelev [private]
 

Definition at line 102 of file track.h.

Referenced by TRACK().

ROADSTRIPNODE* TRACK::roads [private]
 

Definition at line 99 of file track.h.

Referenced by AddNewRoad(), ClearRoads(), CollideRoads(), Delete(), GetBezier(), GetPatch(), NumRoads(), TRACK(), VisualizeRoads(), and Write().

VERTEX TRACK::startloc [private]
 

Definition at line 101 of file track.h.

Referenced by GetStart(), and SetStart().

QUATERNION TRACK::startquat [private]
 

Definition at line 103 of file track.h.

Referenced by GetStartOrientation(), and SetStartOrientation().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:12:35 2006 by  doxygen 1.4.6