RigsofRods
Soft-body Physics Simulation
Data Structures | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
RoR::Skidmark Class Reference

#include <Skidmark.h>

+ Collaboration diagram for RoR::Skidmark:

Data Structures

struct  SkidmarkSegment
 < Also reffered to as 'bucket' More...
 

Public Member Functions

 Skidmark (SkidmarkConfig *config, wheel_t *m_wheel, Ogre::SceneNode *snode, int m_length=500, int m_bucket_count=20)
 Constructor - see setOperationType() for description of argument. More...
 
virtual ~Skidmark ()
 
void reset ()
 
void update (Ogre::Vector3 contact_point, int index, float slip, Ogre::String ground_model_name)
 

Private Member Functions

void PopSegment ()
 
void LimitObjects ()
 
void AddObject (Ogre::Vector3 start, Ogre::String texture)
 
void SetPointInt (unsigned short index, const Ogre::Vector3 &value, Ogre::Real fsize, Ogre::String texture)
 
void AddPoint (const Ogre::Vector3 &value, Ogre::Real fsize, Ogre::String texture)
 
void UpdatePoint (Ogre::Vector3 contact_point, int index, float slip, Ogre::String ground_model_name)
 

Private Attributes

bool m_is_dirty
 
std::queue< SkidmarkSegmentm_objects
 
float m_max_distance
 
float m_min_distance
 
int m_bucket_count
 
int m_length
 
wheel_tm_wheel
 
Ogre::SceneNode * m_scene_node
 
SkidmarkConfigm_config
 

Static Private Attributes

static int m_instance_counter = 0
 
static Ogre::Vector2 m_tex_coords [4] = {Ogre::Vector2(0, 0), Ogre::Vector2(0, 1), Ogre::Vector2(1, 0), Ogre::Vector2(1, 1)}
 

Detailed Description

Definition at line 58 of file Skidmark.h.

Constructor & Destructor Documentation

◆ Skidmark()

RoR::Skidmark::Skidmark ( RoR::SkidmarkConfig config,
wheel_t m_wheel,
Ogre::SceneNode *  snode,
int  m_length = 500,
int  m_bucket_count = 20 
)

Constructor - see setOperationType() for description of argument.

Definition at line 112 of file Skidmark.cpp.

◆ ~Skidmark()

RoR::Skidmark::~Skidmark ( )
virtual

Definition at line 129 of file Skidmark.cpp.

Member Function Documentation

◆ AddObject()

void RoR::Skidmark::AddObject ( Ogre::Vector3  start,
Ogre::String  texture 
)
private

Definition at line 134 of file Skidmark.cpp.

+ Here is the call graph for this function:

◆ AddPoint()

void RoR::Skidmark::AddPoint ( const Ogre::Vector3 &  value,
Ogre::Real  fsize,
Ogre::String  texture 
)
private

Definition at line 302 of file Skidmark.cpp.

◆ LimitObjects()

void RoR::Skidmark::LimitObjects ( )
private

Definition at line 188 of file Skidmark.cpp.

◆ PopSegment()

void RoR::Skidmark::PopSegment ( )
private

Definition at line 177 of file Skidmark.cpp.

+ Here is the call graph for this function:

◆ reset()

void RoR::Skidmark::reset ( )

Definition at line 312 of file Skidmark.cpp.

+ Here is the caller graph for this function:

◆ SetPointInt()

void RoR::Skidmark::SetPointInt ( unsigned short  index,
const Ogre::Vector3 &  value,
Ogre::Real  fsize,
Ogre::String  texture 
)
private

Definition at line 196 of file Skidmark.cpp.

◆ update()

void RoR::Skidmark::update ( Ogre::Vector3  contact_point,
int  index,
float  slip,
Ogre::String  ground_model_name 
)

Definition at line 318 of file Skidmark.cpp.

◆ UpdatePoint()

void RoR::Skidmark::UpdatePoint ( Ogre::Vector3  contact_point,
int  index,
float  slip,
Ogre::String  ground_model_name 
)
private

Definition at line 205 of file Skidmark.cpp.

Field Documentation

◆ m_bucket_count

int RoR::Skidmark::m_bucket_count
private

Definition at line 96 of file Skidmark.h.

◆ m_config

SkidmarkConfig* RoR::Skidmark::m_config
private

Definition at line 100 of file Skidmark.h.

◆ m_instance_counter

int RoR::Skidmark::m_instance_counter = 0
staticprivate

Definition at line 90 of file Skidmark.h.

◆ m_is_dirty

bool RoR::Skidmark::m_is_dirty
private

Definition at line 91 of file Skidmark.h.

◆ m_length

int RoR::Skidmark::m_length
private

Definition at line 97 of file Skidmark.h.

◆ m_max_distance

float RoR::Skidmark::m_max_distance
private

Definition at line 93 of file Skidmark.h.

◆ m_min_distance

float RoR::Skidmark::m_min_distance
private

Definition at line 94 of file Skidmark.h.

◆ m_objects

std::queue<SkidmarkSegment> RoR::Skidmark::m_objects
private

Definition at line 92 of file Skidmark.h.

◆ m_scene_node

Ogre::SceneNode* RoR::Skidmark::m_scene_node
private

Definition at line 99 of file Skidmark.h.

◆ m_tex_coords

Ogre::Vector2 RoR::Skidmark::m_tex_coords = {Ogre::Vector2(0, 0), Ogre::Vector2(0, 1), Ogre::Vector2(1, 0), Ogre::Vector2(1, 1)}
staticprivate

Definition at line 95 of file Skidmark.h.

◆ m_wheel

wheel_t* RoR::Skidmark::m_wheel
private

Definition at line 98 of file Skidmark.h.


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