Go to the documentation of this file.
33 #ifndef _AK_VALUERAMP_H_
34 #define _AK_VALUERAMP_H_
55 m_fStepIncrement( 0.f ),
76 m_fStepIncrement = fStepIncrement;
77 m_fCurrent = fInitVal;
88 AkReal32 fDiff = m_fTarget - m_fCurrent;
89 m_uRampLength =
static_cast<AkUInt32>( fabs(fDiff) / m_fStepIncrement );
90 m_fInc = fDiff > 0 ? m_fStepIncrement : -m_fStepIncrement;
97 if ( m_uRampCount >= m_uRampLength )
98 m_fCurrent = m_fTarget;
102 m_fCurrent += m_fInc;
124 m_fCurrent = m_fTarget;
125 m_uRampCount = m_uRampLength;
139 #endif //_AK_VALUERAMP_H_
void StopRamp()
The ramp is no longer necessary; set to target.
void SetCurrent(AkReal32 in_fCurrent)
Set the current interpolated value.
AkForceInline AkReal32 Tick()
CAkValueRamp()
Constructor method.
void RampSetup(AkReal32 fStepIncrement, AkReal32 fInitVal)
Initial parameter interpolation ramp setup.
~CAkValueRamp()
Destructor method.
#define AKASSERT(Condition)
AkForceInline void SetTarget(AkReal32 fTarget)
Set the ramp's target value.
void SetRampCount(AkUInt32 in_uRampCount)
Set the current interpolation frame count.
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise