ROADSTRIP Class Reference

#include <track.h>

Collaboration diagram for ROADSTRIP:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ROADSTRIP ()
 ~ROADSTRIP ()
BEZIERAdd (BEZIER newpatch)
BEZIERAddNew ()
bool ReadFrom (ifstream &openfile)
bool WriteTo (ofstream &openfile)
bool DeleteLastPatch ()
void Visualize (bool wireframe, bool fill, VERTEX color)
BEZIERGetLastPatch ()
BEZIERNODEGetFirstNode ()
int NumPatches ()
bool Collide (VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest)
bool Collide (VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest, BEZIER *&colpatch, VERTEX &normal)
bool CollideBruteForce (VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest, BEZIER *&colpatch)
bool CollideBranch (VERTEX origin, VERTEX direction, VERTEX &outtri, bool closest, BEZIER *&colpatch, BEZIERCOLBRANCH *branch, VERTEX &normal)

Public Attributes

BEZIERNODEpatchnodes

Private Member Functions

void ClearPatches ()
void GenerateCollisionTree ()
void GenerateBranches (BEZIERCOLBRANCH *branch)

Private Attributes

BEZIERCOLBRANCH coltree
BEZIERlastcolpatch

Detailed Description

Definition at line 60 of file track.h.


Constructor & Destructor Documentation

ROADSTRIP::ROADSTRIP  ) 
 

Definition at line 27 of file track.cpp.

References NULL, and patchnodes.

ROADSTRIP::~ROADSTRIP  )  [inline]
 

Definition at line 72 of file track.h.

References ClearPatches(), coltree, and BEZIERCOLBRANCH::DeleteChildren().


Member Function Documentation

BEZIER * ROADSTRIP::Add BEZIER  newpatch  ) 
 

Definition at line 45 of file track.cpp.

References BEZIER::Attach(), BEZIER::CopyFrom(), BEZIERNODE::next, NULL, BEZIERNODE::patch, and patchnodes.

Referenced by AddNew(), and ReadFrom().

BEZIER * ROADSTRIP::AddNew  ) 
 

Definition at line 77 of file track.cpp.

References Add().

void ROADSTRIP::ClearPatches  )  [private]
 

Definition at line 32 of file track.cpp.

References coltree, BEZIERCOLBRANCH::DeleteChildren(), BEZIERCOLBRANCH::leaves, BEZIERNODE::next, NULL, and patchnodes.

Referenced by ReadFrom(), and ~ROADSTRIP().

bool ROADSTRIP::Collide VERTEX  origin,
VERTEX  direction,
VERTEX outtri,
bool  closest,
BEZIER *&  colpatch,
VERTEX normal
 

Definition at line 334 of file track.cpp.

References CollideBranch(), coltree, and lastcolpatch.

bool ROADSTRIP::Collide VERTEX  origin,
VERTEX  direction,
VERTEX outtri,
bool  closest
 

Definition at line 269 of file track.cpp.

Referenced by TRACK::CollideRoads().

bool ROADSTRIP::CollideBranch VERTEX  origin,
VERTEX  direction,
VERTEX outtri,
bool  closest,
BEZIER *&  colpatch,
BEZIERCOLBRANCH branch,
VERTEX normal
 

Definition at line 357 of file track.cpp.

References BEZIERCOLBRANCH::leaves, BEZIERCOLBRANCH::left, NULL, and BEZIERCOLBRANCH::right.

Referenced by Collide().

bool ROADSTRIP::CollideBruteForce VERTEX  origin,
VERTEX  direction,
VERTEX outtri,
bool  closest,
BEZIER *&  colpatch
 

Definition at line 276 of file track.cpp.

References BEZIERNODE::next, NULL, BEZIERNODE::patch, and patchnodes.

bool ROADSTRIP::DeleteLastPatch  ) 
 

Definition at line 158 of file track.cpp.

References BEZIERNODE::next, NULL, and patchnodes.

void ROADSTRIP::GenerateBranches BEZIERCOLBRANCH branch  )  [private]
 

Definition at line 527 of file track.cpp.

References BEZIERCOLBRANCH::leaves.

Referenced by GenerateCollisionTree().

void ROADSTRIP::GenerateCollisionTree  )  [private]
 

Definition at line 498 of file track.cpp.

References coltree, BEZIERCOLBRANCH::DeleteChildren(), GenerateBranches(), BEZIERCOLBRANCH::leaves, BEZIERCOLBRANCH::left, NULL, patchnodes, and BEZIERCOLBRANCH::right.

BEZIERNODE* ROADSTRIP::GetFirstNode  )  [inline]
 

Definition at line 80 of file track.h.

References patchnodes.

Referenced by TRACK::GetPatch().

BEZIER * ROADSTRIP::GetLastPatch  ) 
 

Definition at line 191 of file track.cpp.

References BEZIERNODE::next, NULL, BEZIERNODE::patch, and patchnodes.

int ROADSTRIP::NumPatches  ) 
 

Definition at line 142 of file track.cpp.

References BEZIERNODE::next, NULL, and patchnodes.

Referenced by WriteTo().

bool ROADSTRIP::ReadFrom ifstream &  openfile  ) 
 

Definition at line 83 of file track.cpp.

References Add(), ClearPatches(), lastcolpatch, NULL, and BEZIER::ReadFrom().

Referenced by TRACK::Load().

void ROADSTRIP::Visualize bool  wireframe,
bool  fill,
VERTEX  color
 

Definition at line 220 of file track.cpp.

References cam, BEZIER::center, CAMERA::frustum, NULL, BEZIERNODE::patch, patchnodes, VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by TRACK::VisualizeRoads().

bool ROADSTRIP::WriteTo ofstream &  openfile  ) 
 

Definition at line 125 of file track.cpp.

References BEZIERNODE::next, NULL, NumPatches(), BEZIERNODE::patch, patchnodes, and BEZIER::WriteTo().

Referenced by TRACK::Write().


Member Data Documentation

BEZIERCOLBRANCH ROADSTRIP::coltree [private]
 

Definition at line 65 of file track.h.

Referenced by ClearPatches(), Collide(), GenerateCollisionTree(), and ~ROADSTRIP().

BEZIER* ROADSTRIP::lastcolpatch [private]
 

Definition at line 67 of file track.h.

Referenced by Collide(), and ReadFrom().

BEZIERNODE* ROADSTRIP::patchnodes
 

Definition at line 70 of file track.h.

Referenced by Add(), ClearPatches(), CollideBruteForce(), DeleteLastPatch(), GenerateCollisionTree(), TRACK::GetBezier(), GetFirstNode(), GetLastPatch(), NumPatches(), ROADSTRIP(), Visualize(), and WriteTo().


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