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"
89 video::SColor m_start_color;
94 std::shared_ptr<SP::SPDynamicDrawCall> m_dy_dc;
96 irr::scene::IMeshSceneNode* m_node;
98 void addSP (
const Vec3 &left,
103 void addLegacy (
const Vec3 &left,
110 std::shared_ptr<SP::SPShader> shader,
111 float z_offset, video::SColor* custom_color = NULL);
114 void add (
const Vec3 &left,
119 const Vec3& getCenterStart()
const {
return m_center_start; }
124 std::vector<std::unique_ptr<SkidMarkQuads> >
m_left, m_right;
133 void update (
float dt,
bool force_skid_marks=
false,
134 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:80
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:84
float m_fade_out
Fade out = alpha value.
Definition: skid_marks.hpp:87
Vec3 m_center_start
Vector marking the start of the skidmarks (located between left and right wheel)
Definition: skid_marks.hpp:92
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:128
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:124
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
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35