![Logo](../../rorlogo.png) |
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
111 int processLine(Ogre::StringVector args, Ogre::String model);
115 std::map<Ogre::String, Ogre::SimpleSpline>
splines;
int loadDefaultTorqueModels()
Loads default torque models from the 'torque_models.cfg' file.
int spaceCurveEvenly(Ogre::SimpleSpline *spline)
Spaces the points of a spline evenly; this is needed for the correct calculation of the Ogre simple s...
Ogre::SimpleSpline * getUsedSpline()
Returns the used spline.
void AddCurveSample(float rpm, float progress, Ogre::String const &model=customModel)
Adds a point to the torque curve graph.
Ogre::String usedModel
name of the torque model used by the truck.
This class loads and processes a torque curve for a vehicle.
TorqueCurve()
Constructor.
Ogre::SimpleSpline * usedSpline
spline which is used for calculating the torque, set by setTorqueModel().
const static Ogre::String customModel
Ogre::String getTorqueModel()
Returns the name of the torque model used by the vehicle.
~TorqueCurve()
Destructor.
int setTorqueModel(Ogre::String name)
Sets the torque model which is used for the vehicle.
int processLine(Ogre::StringVector args, Ogre::String model)
Processes the given vector.
Central state/object manager and communications hub.
bool CreateNewCurve(Ogre::String const &name=customModel)
Creates new torque curve.
Ogre::Real getEngineTorque(Ogre::Real rpm)
Returns the calculated engine torque based on the given RPM, interpolating the torque curve spline.
std::map< Ogre::String, Ogre::SimpleSpline > splines
container were all torque curve splines are stored in.