SuperTuxKart
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SkidMarks::SkidMarkQuads Class Reference
Inheritance diagram for SkidMarks::SkidMarkQuads:
Inheritance graph
[legend]

Public Member Functions

 SkidMarkQuads (const Vec3 &left, const Vec3 &right, const Vec3 &normal, Material *material, std::shared_ptr< SP::SPShader > shader, float z_offset, video::SColor *custom_color=NULL)
 
void add (const Vec3 &left, const Vec3 &right, const Vec3 &normal, float distance)
 Adds the two points to this SkidMarkQuads. More...
 
bool fade (float f)
 Fades the current skid marks. More...
 
const Vec3getCenterStart () const
 

Private Member Functions

void addSP (const Vec3 &left, const Vec3 &right, const Vec3 &normal, float distance)
 
void addLegacy (const Vec3 &left, const Vec3 &right, const Vec3 &normal, float distance)
 

Private Attributes

float m_z_offset
 Used to move skid marks at the same location slightly on top of each other to avoid a 'wobbling' effect when sometines the first and sometimes the 2nd one is drawn on top.
 
float m_fade_out
 Fade out = alpha value.
 
video::SColor m_start_color
 
Vec3 m_center_start
 Vector marking the start of the skidmarks (located between left and right wheel)
 
std::shared_ptr< SP::SPDynamicDrawCallm_dy_dc
 
irr::scene::IMeshSceneNode * m_node
 

Member Function Documentation

◆ add()

void SkidMarks::SkidMarkQuads::add ( const Vec3 left,
const Vec3 right,
const Vec3 normal,
float  distance 
)

Adds the two points to this SkidMarkQuads.

Parameters
left,rightLeft and right coordinates.

◆ fade()

bool SkidMarks::SkidMarkQuads::fade ( float  f)

Fades the current skid marks.

Parameters
ffade factor.
Returns
true if this skid mark can be deleted (alpha == zero)

The documentation for this class was generated from the following files: