SuperTuxKart
Public 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 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. More...
 
float m_fade_out
 Fade out = alpha value. More...
 
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
 

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)

Member Data Documentation

◆ m_fade_out

float SkidMarks::SkidMarkQuads::m_fade_out
private

Fade out = alpha value.

◆ m_z_offset

float SkidMarks::SkidMarkQuads::m_z_offset
private

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.


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