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.
|
|
| ~SkidMarks () |
| Removes all skid marks from the scene graph and frees the state.
|
|
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.
|
|
void | reset () |
| Removes all skid marks, called when a race is restarted.
|
|
|
const AbstractKart & | m_kart |
| Reference to the kart to which these skidmarks belong.
|
|
bool | m_skid_marking |
| True if the kart was skidding in the previous frame.
|
|
float | m_width |
| Reduce effect of Z-fighting.
|
|
Material * | m_material |
| Material to use for the skid marks.
|
|
std::shared_ptr< SP::SPShader > | m_shader |
| Shader(alphablend) to use for the skid marks.
|
|
std::vector< std::unique_ptr< SkidMarkQuads > > | m_left |
| Two skidmark objects for the left and right wheel.
|
|
std::vector< std::unique_ptr< SkidMarkQuads > > | m_right |
|
|
static const int | m_start_alpha = 200 |
| Initial alpha value.
|
|
static const int | m_start_grey = 32 |
| Initial grey value, same for the 3 channels.
|
|
static float | m_avoid_z_fighting = 0.005f |
| Shared static so that consecutive skidmarks are at a slightly different height.
|
|
This class is responsible for drawing skid marks for a kart.
◆ 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
-
The documentation for this class was generated from the following files: