Manages the source sound of each individual car.
More...
#include <CarSoundData.h>
|
| void | calculateAttenuation (tCarElt *car) |
| | Use inverse distance to calculate attenuation of sounds originating from this car. Useful for prioritisation of sounds. More...
|
| |
| void | calculateEngineSound (tCarElt *car) |
| | Calculate characteristics of the engine sound. More...
|
| |
| void | calculateBackfireSound (tCarElt *car) |
| | Calculate the frequency and amplitude of a looped backfiring sound. More...
|
| |
| void | calculateTyreSound (tCarElt *car) |
| |
| void | calculateGearChangeSound (tCarElt *car) |
| |
| void | calculateCollisionSound (tCarElt *car) |
| |
| bool | isOffRoadSurface (const tTrackSeg *const seg) |
| |
| tdble | calculateRoughnessFreqency (const tTrackSeg *const seg) |
| |
| void | getDirtRoughnessParams (tCarElt *car, int wheelIndex, bool mainSurfaceIsOffroad, tdble roughnessFreq, tdble otherRoughnessFreq, tdble &dirtRoughnessFreq, tdble &dirtRoughness) |
| |
| void | handleDirtContribution (tdble dirtContribution, tdble dirtRoughnessFreq, tdble dirtRoughness, tdble wheelSkid, tdble tmpvol, tdble ride) |
| |
| void | handleRoadContribution (bool mainSurfaceIsOffroad, tdble roadContribution, tdble roughnessFreq, tdble otherRoughnessFreq, tdble tmpvol, tdble ride, int wheelIndex, tdble wheelSkid, tdble wheelSlipAccel, tdble wheelReaction) |
| |
| void | handleCurbContribution (tPrivCar *car, bool onOtherSurface, tdble otherSurfaceContribution, tdble curbRoughnessFreq, tdble otherRoughnessFreq, tdble tmpvol, tdble ride, int wheelIndex, tdble wheelReaction) |
| |
Manages the source sound of each individual car.
Definition at line 25 of file CarSoundData.h.
◆ CarSoundData()
| CarSoundData::CarSoundData |
( |
int |
id, |
|
|
SoundInterface * |
sound_interface |
|
) |
| |
◆ calculateAttenuation()
| void CarSoundData::calculateAttenuation |
( |
tCarElt * |
car | ) |
|
|
protected |
Use inverse distance to calculate attenuation of sounds originating from this car. Useful for prioritisation of sounds.
Definition at line 119 of file CarSoundData.cpp.
◆ calculateBackfireSound()
| void CarSoundData::calculateBackfireSound |
( |
tCarElt * |
car | ) |
|
|
protected |
Calculate the frequency and amplitude of a looped backfiring sound.
Definition at line 186 of file CarSoundData.cpp.
◆ calculateCollisionSound()
| void CarSoundData::calculateCollisionSound |
( |
tCarElt * |
car | ) |
|
|
protected |
◆ calculateEngineSound()
| void CarSoundData::calculateEngineSound |
( |
tCarElt * |
car | ) |
|
|
protected |
Calculate characteristics of the engine sound.
Definition at line 135 of file CarSoundData.cpp.
◆ calculateGearChangeSound()
| void CarSoundData::calculateGearChangeSound |
( |
tCarElt * |
car | ) |
|
|
protected |
◆ calculateRoughnessFreqency()
| tdble CarSoundData::calculateRoughnessFreqency |
( |
const tTrackSeg *const |
seg | ) |
|
|
protected |
◆ calculateTyreSound()
| void CarSoundData::calculateTyreSound |
( |
tCarElt * |
car | ) |
|
|
protected |
◆ copyEngPri()
| void CarSoundData::copyEngPri |
( |
SoundPri & |
epri | ) |
|
|
inline |
◆ getCarPosition()
| void CarSoundData::getCarPosition |
( |
sgVec3 |
p | ) |
|
|
inline |
◆ getCarSpeed()
| void CarSoundData::getCarSpeed |
( |
sgVec3 |
u | ) |
|
|
inline |
◆ getDirtRoughnessParams()
| void CarSoundData::getDirtRoughnessParams |
( |
tCarElt * |
car, |
|
|
int |
wheelIndex, |
|
|
bool |
mainSurfaceIsOffroad, |
|
|
tdble |
roughnessFreq, |
|
|
tdble |
otherRoughnessFreq, |
|
|
tdble & |
dirtRoughnessFreq, |
|
|
tdble & |
dirtRoughness |
|
) |
| |
|
protected |
◆ getEngineSound()
◆ handleCurbContribution()
| void CarSoundData::handleCurbContribution |
( |
tPrivCar * |
car, |
|
|
bool |
onOtherSurface, |
|
|
tdble |
otherSurfaceContribution, |
|
|
tdble |
curbRoughnessFreq, |
|
|
tdble |
otherRoughnessFreq, |
|
|
tdble |
tmpvol, |
|
|
tdble |
ride, |
|
|
int |
wheelIndex, |
|
|
tdble |
wheelReaction |
|
) |
| |
|
protected |
◆ handleDirtContribution()
| void CarSoundData::handleDirtContribution |
( |
tdble |
dirtContribution, |
|
|
tdble |
dirtRoughnessFreq, |
|
|
tdble |
dirtRoughness, |
|
|
tdble |
wheelSkid, |
|
|
tdble |
tmpvol, |
|
|
tdble |
ride |
|
) |
| |
|
protected |
◆ handleRoadContribution()
| void CarSoundData::handleRoadContribution |
( |
bool |
mainSurfaceIsOffroad, |
|
|
tdble |
roadContribution, |
|
|
tdble |
roughnessFreq, |
|
|
tdble |
otherRoughnessFreq, |
|
|
tdble |
tmpvol, |
|
|
tdble |
ride, |
|
|
int |
wheelIndex, |
|
|
tdble |
wheelSkid, |
|
|
tdble |
wheelSlipAccel, |
|
|
tdble |
wheelReaction |
|
) |
| |
|
protected |
◆ isOffRoadSurface()
| bool CarSoundData::isOffRoadSurface |
( |
const tTrackSeg *const |
seg | ) |
|
|
protected |
◆ setCarPosition()
| void CarSoundData::setCarPosition |
( |
sgVec3 |
p | ) |
|
|
inline |
◆ setCarSpeed()
| void CarSoundData::setCarSpeed |
( |
sgVec3 |
u | ) |
|
|
inline |
◆ setEngineSound()
| void CarSoundData::setEngineSound |
( |
TorcsSound * |
engine_sound, |
|
|
float |
rpm_scale |
|
) |
| |
◆ setListenerPosition()
| void CarSoundData::setListenerPosition |
( |
sgVec3 |
p | ) |
|
|
inline |
◆ setTurboParameters()
| void CarSoundData::setTurboParameters |
( |
bool |
turbo_on, |
|
|
float |
turbo_rpm, |
|
|
float |
turbo_lag |
|
) |
| |
◆ update()
| void CarSoundData::update |
( |
tCarElt * |
car | ) |
|
◆ attenuation
| float CarSoundData::attenuation |
◆ axle
◆ bang
◆ base_frequency
| float CarSoundData::base_frequency |
engine base frequency for ~ 6000 rpm
Definition at line 86 of file CarSoundData.h.
◆ bottom_crash
| bool CarSoundData::bottom_crash |
◆ crash
◆ curb
◆ drag_collision
◆ eng_pri
◆ engine
◆ engine_backfire
◆ engine_sound
◆ gear_changing
| bool CarSoundData::gear_changing |
◆ grass
◆ grass_skid
◆ listener_position
| sgVec3 CarSoundData::listener_position |
|
protected |
◆ position
| sgVec3 CarSoundData::position |
|
protected |
◆ pre_axle
| float CarSoundData::pre_axle |
◆ prev_gear
| int CarSoundData::prev_gear |
◆ road
◆ skid_metal
◆ smooth_accel
| float CarSoundData::smooth_accel |
◆ sound_interface
◆ speed
| sgVec3 CarSoundData::speed |
|
protected |
◆ turbo
◆ turbo_ilag
| float CarSoundData::turbo_ilag |
how fast turbo catches up with engine
Definition at line 91 of file CarSoundData.h.
◆ turbo_on
| bool CarSoundData::turbo_on |
◆ turbo_rpm
| float CarSoundData::turbo_rpm |
◆ wheel
The documentation for this class was generated from the following files: