BlendTweenInterface Class Reference

#include <blend_animation.h>

Inheritance diagram for BlendTweenInterface:

详细描述

The BlendTweenInterface allows to add a values animated by BlendAnimationInterface . Each BlendTweenInterface is a separated channel with it's own data type and start and end values.

公共成员函数

MAXON_METHOD Result < 数据 GetMappedValue ( Float xValue)
MAXON_METHOD Result < void >  SetNewTarget (const BlendFunctionRef &blendFunction, const 数据 &endValue)
MAXON_METHOD Result < void >  SetFunction (const BlendFunctionRef &blendFunction)
MAXON_METHOD BlendFunctionRef  GetFunction () const
MAXON_METHOD Result < void >  SetStart (const 数据 &value)
MAXON_METHOD Result < 数据 GetStart () const
MAXON_METHOD Result < void >  SetEnd (const 数据 &value)
MAXON_METHOD Result < 数据 GetEnd () const
  MAXON_OBSERVABLE (void, ObservableAnimation,(const BlendAnimationRef &anim, const BlendTweenRef &tween, ANIMBLENDSTATE state, const 数据 &animValue), ObservableCombinerRunAllComponent)

成员函数文档编制

◆  GetMappedValue()

MAXON_METHOD Result < 数据 > GetMappedValue ( Float   xValue )

Calculates the value for the given x value.

参数
[in] xValue Value to be mapped with the given blend function, start and end value. The value is must be with in the 0.0 .. 1.0 range.

◆  SetNewTarget()

MAXON_METHOD Result <void> SetNewTarget ( const BlendFunctionRef &  blendFunction ,
const 数据 endValue  
)

Allows to set a new target value for the BlendTweenInterface . The last value calculated by this tween will be used as the new start value. Warning: The BlendAnimationInterface should be canceled before calling this function and can be restarted afterwards. Otherwise the behavior is undefined.

参数
[in] blendFunction Blend function to be used to reach the end value.
[in] endValue New end value.

◆  SetFunction()

MAXON_METHOD Result <void> SetFunction ( const BlendFunctionRef &  blendFunction )

Sets the blend function for this tween. Warning: The BlendAnimationInterface should be canceled before calling this function and can be restarted afterwards. Otherwise the behavior is undefined.

参数
[in] blendFunction Blend function to be used. See BlendFunctions registry.

◆  GetFunction()

MAXON_METHOD BlendFunctionRef GetFunction ( ) const

Returns the current blend function.

◆  SetStart()

MAXON_METHOD Result <void> SetStart ( const 数据 value )

Sets the start value of this tween. Warning: The BlendAnimationInterface should be canceled before calling this function and can be restarted afterwards. Otherwise the behavior is undefined.

参数
[in] value Start value to be used.

◆  GetStart()

MAXON_METHOD Result < 数据 > GetStart ( ) const

Returns the current start value.

◆  SetEnd()

MAXON_METHOD Result <void> SetEnd ( const 数据 value )

Sets the end value of this tween. Warning: The BlendAnimationInterface should be canceled before calling this function and can be restarted afterwards. Otherwise the behavior is undefined.

参数
[in] value End value to be used.

◆  GetEnd()

MAXON_METHOD Result < 数据 > GetEnd ( ) const

Returns the current end value.

◆  MAXON_OBSERVABLE()

MAXON_OBSERVABLE ( void  ,
ObservableAnimation  ,
(const BlendAnimationRef &anim, const BlendTweenRef &tween, ANIMBLENDSTATE state, const 数据 &animValue)  ,
ObservableCombinerRunAllComponent   
)

Observable which is triggered for each BlendAnimationInterface timer event. It's only guaranteed that ANIMBLENDSTATE::FINISHED or ANIMBLENDSTATE::CANCELED is triggered. ANIMBLENDSTATE::STARTED and ANIMBLENDSTATE::RUNNING are optional messages if enough timer events are fired.

参数
[in] anim BlendAnimationRef object.
[in] tween BlendTweenRef object (this object).
[in] state The current state of the animation. See ANIMBLENDSTATE for more details.
[in] animValue The animated value.