|
| | SlipStream (AbstractKart *kart) |
| | Creates the slip stream object. More...
|
| |
|
| ~SlipStream () |
| | Removes the node from the scene graph.
|
| |
|
void | reset () |
| | Called at re-start of a race.
|
| |
| void | update (int ticks) |
| | Update, called once per timestep. More...
|
| |
|
bool | isSlipstreamReady () const |
| | Returns true if enough slipstream credits have been accumulated to get a boost when leaving the slipstream area.
|
| |
|
void | updateSpeedIncrease () |
| |
|
const Quad & | getSlipstreamQuad () const |
| | Returns the quad in which slipstreaming is effective for this kart.
|
| |
|
const AbstractKart * | getSlipstreamTarget () const |
| | Returns the kart from which slipstream is 'collected'.
|
| |
|
bool | inUse () const |
| | Returns if slipstream is being used.
|
| |
|
| enum | { SS_NONE
, SS_COLLECT
} |
| | Slipstream mode: either nothing happening, or the kart is collecting 'slipstream credits'. More...
|
| |
|
| SP::SPMesh * | createMeshSP (unsigned material_id, bool bonus_mesh) |
| | Creates the mesh for the slipstream effect. More...
|
| |
| scene::IAnimatedMesh * | createMesh (unsigned material_id, bool bonus_mesh) |
| | Creates the mesh for the slipstream effect. More...
|
| |
| void | setDebugColor (const video::SColor &color, bool inner) |
| | Sets the color of the debug mesh (which shows the area in which slipstream can be accumulated). More...
|
| |
|
void | updateQuad () |
| | UpdateQuad.
|
| |
|
void | updateSlipstreamingTextures (float f, const AbstractKart *kart) |
| |
|
void | updateBonusTexture () |
| |
|
void | hideAllNodes () |
| |
◆ anonymous enum
Slipstream mode: either nothing happening, or the kart is collecting 'slipstream credits'.
Credits can be accumulated while the bonus is used
◆ SlipStream()
Creates the slip stream object.
- Parameters
-
| kart | Pointer to the kart to which the slip stream belongs to. |
◆ createMesh()
| scene::IAnimatedMesh * SlipStream::createMesh |
( |
unsigned |
material_id, |
|
|
bool |
bonus_mesh |
|
) |
| |
|
private |
Creates the mesh for the slipstream effect.
This function creates a first a series of circles (with a certain number of vertices each and distance from each other. Then it will create the triangles and add texture coordniates.
- Parameters
-
| material_id | The material to use. |
◆ createMeshSP()
| SP::SPMesh * SlipStream::createMeshSP |
( |
unsigned |
material_id, |
|
|
bool |
bonus_mesh |
|
) |
| |
|
private |
Creates the mesh for the slipstream effect.
This function creates a first a series of circles (with a certain number of vertices each and distance from each other. Then it will create the triangles and add texture coordniates.
- Parameters
-
| material_id | The material to use. |
◆ setDebugColor()
| void SlipStream::setDebugColor |
( |
const video::SColor & |
color, |
|
|
bool |
inner |
|
) |
| |
|
private |
Sets the color of the debug mesh (which shows the area in which slipstream can be accumulated).
Color codes: black: kart too slow red: not inside of slipstream area green: slipstream is being accumulated.
- Parameters
-
| inner | : bool to know if we apply the color to the inner quad or to the main one |
◆ update()
| void SlipStream::update |
( |
int |
ticks | ) |
|
Update, called once per timestep.
- Parameters
-
◆ m_length
| float SlipStream::m_length |
|
private |
The length of the slipstream cylinder.
This is used to scale the actual scene node correctly. Shared between node and node_fast
| enum { ... } SlipStream::m_slipstream_mode |
Slipstream mode: either nothing happening, or the kart is collecting 'slipstream credits'.
Credits can be accumulated while the bonus is used
◆ m_slipstream_outer_quad
| Quad* SlipStream::m_slipstream_outer_quad |
|
private |
This is the outer slipstream area if the kart is at 0,0,0 without rotation.
No slipstream time is accumulated there, but it's lost slower
◆ m_target_kart
The kart from which this kart gets slipstream.
Used by the AI to overtake the right kart.
The documentation for this class was generated from the following files: