RigsofRods
Soft-body Physics Simulation
Data Fields | Static Public Attributes
RigDef::Shock Struct Reference

#include <RigDef_File.h>

+ Collaboration diagram for RigDef::Shock:

Data Fields

Node::Ref nodes [2]
 
float spring_rate = 0.f
 The 'stiffness' of the shock. The higher the value, the less the shock will move for a given bump. More...
 
float damping = 0.f
 The 'resistance to motion' of the shock. The best value is given by this equation: 2 * sqrt(suspended mass * springness) More...
 
float short_bound = 0.f
 Maximum contraction. The shortest length the shock can be, as a proportion of its original length. "0" means the shock will not be able to contract at all, "1" will let it contract all the way to zero length. If the shock tries to shorten more than this value allows, it will become as rigid as a normal beam. More...
 
float long_bound = 0.f
 Maximum extension. The longest length a shock can be, as a proportion of its original length. "0" means the shock will not be able to extend at all. "1" means the shock will be able to double its length. Higher values allow for longer extension. More...
 
float precompression = 1.f
 Changes compression or extension of the suspension when the truck spawns. This can be used to "level" the suspension of a truck if it sags in game. The default value is 1.0. More...
 
BitMask_t options = 0
 
std::shared_ptr< BeamDefaultsbeam_defaults
 
int detacher_group = 0
 

Static Public Attributes

static const BitMask_t OPTION_i_INVISIBLE = BITMASK(1)
 
static const BitMask_t OPTION_L_ACTIVE_LEFT = BITMASK(2)
 
static const BitMask_t OPTION_R_ACTIVE_RIGHT = BITMASK(3)
 
static const BitMask_t OPTION_m_METRIC = BITMASK(4)
 

Detailed Description

Definition at line 1174 of file RigDef_File.h.

Field Documentation

◆ beam_defaults

std::shared_ptr<BeamDefaults> RigDef::Shock::beam_defaults

Definition at line 1188 of file RigDef_File.h.

◆ damping

float RigDef::Shock::damping = 0.f

The 'resistance to motion' of the shock. The best value is given by this equation: 2 * sqrt(suspended mass * springness)

Definition at line 1183 of file RigDef_File.h.

◆ detacher_group

int RigDef::Shock::detacher_group = 0

Definition at line 1189 of file RigDef_File.h.

◆ long_bound

float RigDef::Shock::long_bound = 0.f

Maximum extension. The longest length a shock can be, as a proportion of its original length. "0" means the shock will not be able to extend at all. "1" means the shock will be able to double its length. Higher values allow for longer extension.

Definition at line 1185 of file RigDef_File.h.

◆ nodes

Node::Ref RigDef::Shock::nodes[2]

Definition at line 1181 of file RigDef_File.h.

◆ OPTION_i_INVISIBLE

const BitMask_t RigDef::Shock::OPTION_i_INVISIBLE = BITMASK(1)
static

Definition at line 1176 of file RigDef_File.h.

◆ OPTION_L_ACTIVE_LEFT

const BitMask_t RigDef::Shock::OPTION_L_ACTIVE_LEFT = BITMASK(2)
static

Definition at line 1177 of file RigDef_File.h.

◆ OPTION_m_METRIC

const BitMask_t RigDef::Shock::OPTION_m_METRIC = BITMASK(4)
static

Definition at line 1179 of file RigDef_File.h.

◆ OPTION_R_ACTIVE_RIGHT

const BitMask_t RigDef::Shock::OPTION_R_ACTIVE_RIGHT = BITMASK(3)
static

Definition at line 1178 of file RigDef_File.h.

◆ options

BitMask_t RigDef::Shock::options = 0

Definition at line 1187 of file RigDef_File.h.

◆ precompression

float RigDef::Shock::precompression = 1.f

Changes compression or extension of the suspension when the truck spawns. This can be used to "level" the suspension of a truck if it sags in game. The default value is 1.0.

Definition at line 1186 of file RigDef_File.h.

◆ short_bound

float RigDef::Shock::short_bound = 0.f

Maximum contraction. The shortest length the shock can be, as a proportion of its original length. "0" means the shock will not be able to contract at all, "1" will let it contract all the way to zero length. If the shock tries to shorten more than this value allows, it will become as rigid as a normal beam.

Definition at line 1184 of file RigDef_File.h.

◆ spring_rate

float RigDef::Shock::spring_rate = 0.f

The 'stiffness' of the shock. The higher the value, the less the shock will move for a given bump.

Definition at line 1182 of file RigDef_File.h.


The documentation for this struct was generated from the following file: