mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #852 IInterpolator::getInterpolatedParts interpolates the onGround value.
This commit is contained in:
@@ -119,6 +119,18 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
void setInterpolatorSetup(const CInterpolationAndRenderingSetup &setup);
|
||||
|
||||
/*!
|
||||
* Takes input between 0 and 1 and returns output between 0 and 1 smoothed with an S-shaped curve.
|
||||
*
|
||||
* Useful for making interpolation seem smoother, efficiently as it just uses simple arithmetic.
|
||||
* \see https://en.wikipedia.org/wiki/Smoothstep
|
||||
* \see http://sol.gfxile.net/interpolation/
|
||||
*/
|
||||
static double smootherStep(double x)
|
||||
{
|
||||
return x * x * x * (x * (x * 6.0 - 15.0) + 10.0);
|
||||
}
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
IInterpolator(BlackMisc::Simulation::IRemoteAircraftProvider *provider, const QString &objectName, QObject *parent);
|
||||
|
||||
Reference in New Issue
Block a user