1#ifndef __SINTERPOLATORIMPL__H__
2#define __SINTERPOLATORIMPL__H__
4#include <interface/sinterpolator-i.h>
5#include <helper/obj-ref-impl.hpp>
6#include <sobject/Sobject.hpp>
17 DEF_SOBJECT(SInterpolatorBase, L
"Linear")
33 DEF_SOBJECT(SInterpolatorBase, L
"Accelerate")
58 ATTR_FLOAT(L
"factor", mFactor, FALSE)
67 DEF_SOBJECT(SInterpolatorBase, L
"Decelerate")
91 ATTR_FLOAT(L
"factor", mFactor, FALSE)
100 DEF_SOBJECT(SInterpolatorBase, L
"AccelerateDecelerate")
116 DEF_SOBJECT(SInterpolatorBase, L
"Anticipate")
144 ATTR_FLOAT(L
"tension", mTension, FALSE)
153 DEF_SOBJECT(SInterpolatorBase, L
"AnticipateOvershoot")
165 static float a(
float t,
float s);
173 static float o(
float t,
float s);
179 float getTensionMulti()
const
181 return mTension * mExtraTension;
203 ATTR_FLOAT(L
"tension", mTension, FALSE)
204 ATTR_FLOAT(L
"extraTension", mExtraTension, FALSE)
213 DEF_SOBJECT(SInterpolatorBase, L
"Bounce")
221 static float bounce(
float t);
237 DEF_SOBJECT(SInterpolatorBase, L
"Cycle")
260 ATTR_FLOAT(L
"cycles", mCycles, FALSE)
269 DEF_SOBJECT(SInterpolatorBase, L
"Overshoot")
292 ATTR_FLOAT(L
"tension", mTension, FALSE)
An interpolator where the rate of change starts and ends slowly, accelerating in the middle.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
SAccelerateInterpolator(float factor=1.0f)
Constructor for SAccelerateInterpolator.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
SAnticipateInterpolator()
Default constructor for SAnticipateInterpolator.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
SAnticipateOvershootInterpolator(float tension=2.0f, float extraTension=1.5f)
Constructor for SAnticipateOvershootInterpolator.
An interpolator where the change bounces at the end.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
SCycleInterpolator(float cycles=1.0f)
Constructor for SCycleInterpolator.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
SDecelerateInterpolator(float factor=1.0f)
Constructor for SDecelerateInterpolator.
An interpolator where the rate of change is constant.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
SOvershootInterpolator(float tension=2.0f)
Constructor for SOvershootInterpolator.
float getInterpolation(float input) SCONST OVERRIDE
Gets the interpolated value for the given input.
Template class implementing the IObjRef interface.