Share via


CInterpolatorBase クラス

アニメーション変数の新しい値を計算する必要があるときに、Animation API によって呼び出されるコールバックを実装します。

構文

class CInterpolatorBase : public CUIAnimationInterpolatorBase<CInterpolatorBase>;

メンバー

パブリック コンストラクター

名前 説明
CInterpolatorBase::CInterpolatorBase オブジェクトを CInterpolatorBase 構築します。

パブリック メソッド

名前 説明
CInterpolatorBase::CreateInstance イベント CInterpolatorBase を処理するカスタム補間器へのポインターを作成し、格納します。
CInterpolatorBase::GetDependencies 補間子の依存関係を取得します。 ( CUIAnimationInterpolatorBase::GetDependenciesをオーバーライドします)。
CInterpolatorBase::GetDuration 補間の期間を取得します。 ( CUIAnimationInterpolatorBase::GetDurationをオーバーライドします)。
CInterpolatorBase::GetFinalValue 補間器が導く最後の値を取得します。 ( CUIAnimationInterpolatorBase::GetFinalValueをオーバーライドします)。
CInterpolatorBase::InterpolateValue 指定したオフセットで値を補間します (オーバーライド. CUIAnimationInterpolatorBase::InterpolateValue)
CInterpolatorBase::InterpolateVelocity 特定のオフセットで速度を補間します (オーバーライド. CUIAnimationInterpolatorBase::InterpolateVelocity)
CInterpolatorBase::SetCustomInterpolator イベントを処理するカスタム補間へのポインターを格納します。
CInterpolatorBase::SetDuration 補間の継続時間を設定します (オーバーライド. CUIAnimationInterpolatorBase::SetDuration)
CInterpolatorBase::SetInitialValueAndVelocity 補間器の初期値と速度を設定します。 ( CUIAnimationInterpolatorBase::SetInitialValueAndVelocityをオーバーライドします)。

解説

このハンドラーは、オブジェクトがアニメーション初期化プロセスの一部 (開始CAnimationController::AnimateGroup者) として作成されるときに作成され、渡IUIAnimationTransitionFactory::CreateTransitionCCustomTransitionされます。 通常、このクラスを直接CCustomInterpolatorCCustomTransition使用する必要はありません。

継承階層

CUIAnimationCallbackBase

CUIAnimationInterpolatorBase

CInterpolatorBase

必要条件

ヘッダー: afxanimationcontroller.h

CInterpolatorBase::CInterpolatorBase

CInterpolatorBase オブジェクトを構築します。

CInterpolatorBase();

CInterpolatorBase::CreateInstance

CInterpolatorBase のインスタンスを作成し、イベントを処理するカスタム補間ツールへのポインターを格納します。

static COM_DECLSPEC_NOTHROW HRESULT CreateInstance(
    CCustomInterpolator* pInterpolator,
    IUIAnimationInterpolator** ppHandler);

パラメーター

pInterpolator
カスタム補間へのポインター。

ppHandler
出力。 関数が戻るときに CInterpolatorBase のインスタンスへのポインターを格納します。

戻り値

CInterpolatorBase::GetDependencies

補間子の依存関係を取得します。

IFACEMETHOD(GetDependencies)(
    __out UI_ANIMATION_DEPENDENCIES* initialValueDependencies,
    __out UI_ANIMATION_DEPENDENCIES* initialVelocityDependencies,
    __out UI_ANIMATION_DEPENDENCIES* durationDependencies);

パラメーター

initialValueDependencies
出力。 SetInitialValueAndVelocity に渡される初期値に依存する補間器の側面。

initialVelocityDependencies
出力。 SetInitialValueAndVelocity に渡される初期速度に依存する補間器の側面。

durationDependencies
出力。 SetDuration に渡される期間に依存する補間器の側面。

戻り値

メソッドが成功した場合は、S_OK を返します。 CCustomInterpolator が設定されていない場合、またはカスタム実装が GetDependencies メソッドから FAL Standard Edition を返す場合は、E_FAILを返します。

CInterpolatorBase::GetDuration

補間の期間を取得します。

IFACEMETHOD(GetDuration)(__out UI_ANIMATION_SECONDS* duration);

パラメーター

duration
出力。 切り替えの期間 (秒単位)。

戻り値

メソッドが成功した場合は、S_OK を返します。 CCustomInterpolator が設定されていない場合、またはカスタム実装が GetDuration メソッドから FAL Standard Edition を返す場合は、E_FAILを返します。

CInterpolatorBase::GetFinalValue

補間器が導く最後の値を取得します。

IFACEMETHOD(GetFinalValue)(__out DOUBLE* value);

パラメーター

value
出力。 遷移の最後にある変数の最終的な値。

戻り値

メソッドが成功した場合は、S_OK を返します。 CCustomInterpolator が設定されていない場合、またはカスタム実装が GetFinalValue メソッドから FAL Standard Edition を返す場合は、E_FAILを返します。

CInterpolatorBase::InterpolateValue

指定されたオフセットで値を補間します。

IFACEMETHOD(InterpolateValue)(
    __in UI_ANIMATION_SECONDS offset,
    __out DOUBLE* value);

パラメーター

オフセット
遷移の開始からのオフセット。 オフセットは常に 0 以上で、遷移の継続時間より小さくなります。 遷移の継続時間が 0 の場合、このメソッドは呼び出されません。

value
出力。 補間値。

戻り値

メソッドが成功した場合は、S_OK を返します。 CCustomInterpolator が設定されていない場合、またはカスタム実装が InterpolateValue メソッドから FAL Standard Edition を返す場合は、E_FAILを返します。

CInterpolatorBase::InterpolateVelocity

特定のオフセットで速度を補間します。

IFACEMETHOD(InterpolateVelocity)(
    __in UI_ANIMATION_SECONDS offset,
    __out DOUBLE* velocity);

パラメーター

オフセット
遷移の開始からのオフセット。 オフセットは常に 0 以上で、遷移の継続時間以下です。 遷移の継続時間が 0 の場合、このメソッドは呼び出されません。

速度
出力。 オフセットでの変数の速度。

戻り値

メソッドが成功した場合は、S_OK を返します。 CCustomInterpolator が設定されていない場合、またはカスタム実装が InterpolateVelocity メソッドから FAL Standard Edition を返す場合は、E_FAILを返します。

CInterpolatorBase::SetCustomInterpolator

イベントを処理するカスタム補間へのポインターを格納します。

void SetCustomInterpolator(CCustomInterpolator* pInterpolator);

パラメーター

pInterpolator
カスタム補間へのポインター。

CInterpolatorBase::SetDuration

補間の継続時間を設定します。

IFACEMETHOD(SetDuration)(__in UI_ANIMATION_SECONDS duration);

パラメーター

duration
切り替えの期間。

戻り値

メソッドが成功した場合は、S_OK を返します。 CCustomInterpolator が設定されていない場合、またはカスタム実装が SetDuration メソッドから FAL Standard Edition を返す場合は、E_FAILを返します。

CInterpolatorBase::SetInitialValueAndVelocity

補間器の初期値と速度を設定します。

IFACEMETHOD(SetInitialValueAndVelocity)(
    __in DOUBLE initialValue,
    __in DOUBLE initialVelocity);

パラメーター

initialValue
遷移の開始時の変数の値。

initialVelocity
遷移の開始時の変数の速度。

戻り値

メソッドが成功した場合は、S_OK を返します。 CCustomInterpolator が設定されていない場合、またはカスタム実装が SetInitialValueAndVelocity メソッドから FAL Standard Edition を返す場合は、E_FAILを返します。

関連項目

クラス