This class is responsible for drawing skid marks for a kart.
More...
#include <skid_marks.hpp>
|
| SkidMarks (const AbstractKart &kart, float width=0.32f) |
| Initialises empty skid marks. More...
|
|
| ~SkidMarks () |
| Removes all skid marks from the scene graph and frees the state. More...
|
|
void | update (float dt, bool force_skid_marks=false, video::SColor *custom_color=NULL) |
| Either adds to an existing skid mark quad, or (if the kart is skidding) starts a new skid mark quad. More...
|
|
void | reset () |
| Removes all skid marks, called when a race is restarted.
|
|
This class is responsible for drawing skid marks for a kart.
◆ SkidMarks()
SkidMarks::SkidMarks |
( |
const AbstractKart & |
kart, |
|
|
float |
width = 0.32f |
|
) |
| |
Initialises empty skid marks.
◆ ~SkidMarks()
SkidMarks::~SkidMarks |
( |
| ) |
|
Removes all skid marks from the scene graph and frees the state.
◆ update()
void SkidMarks::update |
( |
float |
dt, |
|
|
bool |
force_skid_marks = false , |
|
|
video::SColor * |
custom_color = NULL |
|
) |
| |
Either adds to an existing skid mark quad, or (if the kart is skidding) starts a new skid mark quad.
- Parameters
-
◆ m_avoid_z_fighting
float SkidMarks::m_avoid_z_fighting = 0.005f |
|
staticprivate |
Shared static so that consecutive skidmarks are at a slightly different height.
◆ m_kart
Reference to the kart to which these skidmarks belong.
◆ m_left
Two skidmark objects for the left and right wheel.
◆ m_material
◆ m_shader
◆ m_skid_marking
bool SkidMarks::m_skid_marking |
|
private |
True if the kart was skidding in the previous frame.
◆ m_start_alpha
const int SkidMarks::m_start_alpha = 200 |
|
staticprivate |
◆ m_start_grey
const int SkidMarks::m_start_grey = 32 |
|
staticprivate |
Initial grey value, same for the 3 channels.
◆ m_width
Reduce effect of Z-fighting.
The documentation for this class was generated from the following files: