#include <train.h>
Public Member Functions | |
void | draw () |
Draws the train. | |
bool | loadFromFile (char *filename) |
Loads a train from a file. | |
bool | initialize (Bridge &bridge) |
Creates the train and checks if an end-to-end road can be found. | |
bool | doPhysics (component timestep) |
Simulates the train. | |
void | finalize () |
Stops the train simulation. | |
void | cleanUp () |
Cleans up after train simulation. | |
Public Attributes | |
vector< coach > | coaches |
The coaches. | |
component | trainLength |
The length of the train. | |
vector< vertex > | coachVertices |
The vertices representing the train. | |
vector< edge > | coachEdges |
The edges representing the train. | |
int | textureWidth |
The dimensions of the texture image. | |
int | textureHeight |
The dimensions of the texture image. | |
unsigned char * | image |
The texture image. | |
bool | hasSmoke |
True iff this train has smoke. | |
Smoke | smoke |
The smoke particle system. | |
vector2 | smokeSource |
The source position of the smoke. |
|
Simulates the train.
|
|
Creates the train and checks if an end-to-end road can be found. Should be called before doTrain(component).
|
|
Loads a train from a file.
|