20#ifndef HEADER_SKID_MARK_HPP
21#define HEADER_SKID_MARK_HPP
33 class SPDynamicDrawCall;
45#include "utils/no_copy.hpp"
46#include "utils/vec3.hpp"
88 video::SColor m_start_color;
93 std::shared_ptr<SP::SPDynamicDrawCall> m_dy_dc;
95 irr::scene::IMeshSceneNode* m_node;
97 void addSP (
const Vec3 &left,
102 void addLegacy (
const Vec3 &left,
109 std::shared_ptr<SP::SPShader> shader,
110 float z_offset, video::SColor* custom_color = NULL);
123 std::vector<std::unique_ptr<SkidMarkQuads> >
m_left, m_right;
132 void update (
float dt,
bool force_skid_marks=
false,
133 video::SColor* custom_color = NULL);
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Definition: material.hpp:48
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
Definition: skid_marks.hpp:79
float m_z_offset
Used to move skid marks at the same location slightly on top of each other to avoid a 'wobbling' effe...
Definition: skid_marks.hpp:83
float m_fade_out
Fade out = alpha value.
Definition: skid_marks.hpp:86
bool fade(float f)
Fades the current skid marks.
Definition: skid_marks.cpp:451
Vec3 m_center_start
Vector marking the start of the skidmarks (located between left and right wheel)
Definition: skid_marks.hpp:91
void add(const Vec3 &left, const Vec3 &right, const Vec3 &normal, float distance)
Adds the two points to this SkidMarkQuads.
Definition: skid_marks.cpp:435
This class is responsible for drawing skid marks for a kart.
Definition: skid_marks.hpp:54
static float m_avoid_z_fighting
Shared static so that consecutive skidmarks are at a slightly different height.
Definition: skid_marks.hpp:127
Material * m_material
Material to use for the skid marks.
Definition: skid_marks.hpp:72
std::shared_ptr< SP::SPShader > m_shader
Shader(alphablend) to use for the skid marks.
Definition: skid_marks.hpp:75
bool m_skid_marking
True if the kart was skidding in the previous frame.
Definition: skid_marks.hpp:60
std::vector< std::unique_ptr< SkidMarkQuads > > m_left
Two skidmark objects for the left and right wheel.
Definition: skid_marks.hpp:123
float m_width
Reduce effect of Z-fighting.
Definition: skid_marks.hpp:63
static const int m_start_alpha
Initial alpha value.
Definition: skid_marks.hpp:66
static const int m_start_grey
Initial grey value, same for the 3 channels.
Definition: skid_marks.hpp:69
const AbstractKart & m_kart
Reference to the kart to which these skidmarks belong.
Definition: skid_marks.hpp:57
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.
Definition: skid_marks.cpp:91
void reset()
Removes all skid marks, called when a race is restarted.
Definition: skid_marks.cpp:79
~SkidMarks()
Removes all skid marks from the scene graph and frees the state.
Definition: skid_marks.cpp:71
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35