Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Physics::Component::EngineSettings Struct Reference

Engine configuration. More...

#include <Vehicle.hpp>

Public Attributes

float maxTorque = 500.0f
 Maximum engine torque in Nm.
float minRPM = 1000.0f
 Minimum RPM.
float maxRPM = 6000.0f
 Maximum RPM.
std::vector< TorqueCurvePointnormalizedTorque
float inertia = 0.5f
 Moment of inertia (kg m^2) of the engine.
float angularDamping = 0.2f

Detailed Description

Engine configuration.

Member Data Documentation

◆ angularDamping

float Physics::Component::EngineSettings::angularDamping = 0.2f

Angular damping factor: dw/dt = -c * w Value should be zero or positive, usually close to 0

◆ inertia

float Physics::Component::EngineSettings::inertia = 0.5f

Moment of inertia (kg m^2) of the engine.

◆ maxRPM

float Physics::Component::EngineSettings::maxRPM = 6000.0f

Maximum RPM.

◆ maxTorque

float Physics::Component::EngineSettings::maxTorque = 500.0f

Maximum engine torque in Nm.

◆ minRPM

float Physics::Component::EngineSettings::minRPM = 1000.0f

Minimum RPM.

◆ normalizedTorque

std::vector<TorqueCurvePoint> Physics::Component::EngineSettings::normalizedTorque
Initial value:
= {
{0.0f, 0.8f},
{0.66f, 1.0f},
{1.0f, 0.8f}
}

Normalized torque curve - describes torque output across RPM range Y-axis: Ratio of max torque (0.0 = 0 Nm, 1.0 = maxTorque) X-axis: Fraction of RPM (0.0 = minRPM, 1.0 = maxRPM) Default: realistic curve with peak torque at mid-range RPM


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