Klasa CCustomInterpolatorCCustomInterpolator Class
Implementuje podstawową interpolację.Implements a basic interpolator.
SkładniaSyntax
class CCustomInterpolator;
Elementy członkowskieMembers
Konstruktory publicznePublic Constructors
NazwaName | OpisDescription |
---|---|
CCustomInterpolator::CCustomInterpolatorCCustomInterpolator::CCustomInterpolator | Przeciążone.Overloaded. Konstruuje niestandardowy obiekt interpolacji i inicjuje czas trwania i szybkość do określonych wartości.Constructs a custom interpolator object and initializes duration and velocity to specified values. |
Metody publicznePublic Methods
NazwaName | OpisDescription |
---|---|
CCustomInterpolator:: getzależnościCCustomInterpolator::GetDependencies | Pobiera zależności interpolacji.Gets the interpolator's dependencies. |
CCustomInterpolator:: GetDurationCCustomInterpolator::GetDuration | Pobiera czas trwania interpolacji.Gets the interpolator's duration. |
CCustomInterpolator::GetFinalValueCCustomInterpolator::GetFinalValue | Pobiera końcową wartość, do której prowadzi ten Interpolacja.Gets the final value to which the interpolator leads. |
CCustomInterpolator:: initCCustomInterpolator::Init | Inicjuje czas trwania i końcową wartość.Initializes duration and final value. |
CCustomInterpolator::InterpolateValueCCustomInterpolator::InterpolateValue | Interpoluje wartość w danym przesunięciu.Interpolates the value at a given offset. |
CCustomInterpolator::InterpolateVelocityCCustomInterpolator::InterpolateVelocity | Interpoluje szybkość dla danego przesunięciaInterpolates the velocity at a given offset |
CCustomInterpolator:: SetDurationCCustomInterpolator::SetDuration | Ustawia czas trwania interpolacji.Sets the interpolator's duration. |
CCustomInterpolator::SetInitialValueAndVelocityCCustomInterpolator::SetInitialValueAndVelocity | Ustawia wartość początkową i prędkość dla interpolacji.Sets the interpolator's initial value and velocity. |
Chronione elementy członkowskie danychProtected Data Members
NazwaName | OpisDescription |
---|---|
CCustomInterpolator:: m_currentValueCCustomInterpolator::m_currentValue | Wartość interpolowana.The interpolated value. |
CCustomInterpolator:: m_currentVelocityCCustomInterpolator::m_currentVelocity | Prędkość interpolowana.The interpolated velocity. |
CCustomInterpolator:: m_durationCCustomInterpolator::m_duration | Czas trwania przejścia.The duration of the transition. |
CCustomInterpolator:: m_finalValueCCustomInterpolator::m_finalValue | Końcowa wartość zmiennej na końcu przejścia.The final value of a variable at the end of the transition. |
CCustomInterpolator:: m_initialValueCCustomInterpolator::m_initialValue | Wartość zmiennej na początku przejścia.The value of the variable at the start of the transition. |
CCustomInterpolator:: m_initialVelocityCCustomInterpolator::m_initialVelocity | Szybkość zmiennej na początku przejścia.The velocity of the variable at the start of the transition. |
UwagiRemarks
Utwórz klasę z CCustomInterpolator i Zastąp wszystkie niezbędne metody w celu zaimplementowania niestandardowego algorytmu interpolacji.Derive a class from CCustomInterpolator and override all necessary methods in order to implement a custom interpolation algorithm. Wskaźnik do tej klasy powinien być przesłany jako parametr do CCustomTransition.A pointer to this class should be passed as a parameter to CCustomTransition.
Hierarchia dziedziczeniaInheritance Hierarchy
CCustomInterpolator
WymaganiaRequirements
Nagłówek: afxanimationcontroller. hHeader: afxanimationcontroller.h
CCustomInterpolator::CCustomInterpolatorCCustomInterpolator::CCustomInterpolator
Konstruuje niestandardowy obiekt interpolacji i ustawia wszystkie wartości domyślne 0.Constructs a custom interpolator object and sets all values to default 0.
CCustomInterpolator();
CCustomInterpolator(
UI_ANIMATION_SECONDS duration,
DOUBLE finalValue);
ParametryParameters
czas trwaniaduration
Czas trwania przejścia.The duration of the transition.
finalValuefinalValue
UwagiRemarks
Użyj CCustomInterpolator:: init, aby zainicjować czas trwania i wartość końcową później w kodzie.Use CCustomInterpolator::Init to initialize duration and final value later in the code.
CCustomInterpolator:: getzależnościCCustomInterpolator::GetDependencies
Pobiera zależności interpolacji.Gets the interpolator's dependencies.
virtual BOOL GetDependencies(
UI_ANIMATION_DEPENDENCIES* initialValueDependencies,
UI_ANIMATION_DEPENDENCIES* initialVelocityDependencies,
UI_ANIMATION_DEPENDENCIES* durationDependencies);
ParametryParameters
initialValueDependenciesinitialValueDependencies
Rozdzielczości.Output. Aspekty interpolacji, które są zależne od wartości początkowej przesłanej do SetInitialValueAndVelocity.Aspects of the interpolator that depend on the initial value passed to SetInitialValueAndVelocity.
initialVelocityDependenciesinitialVelocityDependencies
Rozdzielczości.Output. Aspekty interpolacji, które zależą od początkowej prędkości przekazaną do SetInitialValueAndVelocity.Aspects of the interpolator that depend on the initial velocity passed to SetInitialValueAndVelocity.
durationDependenciesdurationDependencies
Rozdzielczości.Output. Aspekty interpolacji, które zależą od czasu trwania przesłanego do SetDuration.Aspects of the interpolator that depend on the duration passed to SetDuration.
Wartość zwracanaReturn Value
Implementacja podstawowa zawsze zwraca wartość TRUE.Basic implementation always returns TRUE. Zwróć wartość FALSE z przesłoniętej implementacji, jeśli chcesz, aby zdarzenie zostało zakończone niepowodzeniem.Return FALSE from overridden implementation if you wish to fail the event.
CCustomInterpolator:: GetDurationCCustomInterpolator::GetDuration
Pobiera czas trwania interpolacji.Gets the interpolator's duration.
virtual BOOL GetDuration(UI_ANIMATION_SECONDS* duration);
ParametryParameters
czas trwaniaduration
Rozdzielczości.Output. Czas trwania przejścia (w sekundach).The duration of the transition, in seconds.
Wartość zwracanaReturn Value
Implementacja podstawowa zawsze zwraca wartość TRUE.Basic implementation always returns TRUE. Zwróć wartość FALSE z przesłoniętej implementacji, jeśli chcesz, aby zdarzenie zostało zakończone niepowodzeniem.Return FALSE from overridden implementation if you wish to fail the event.
CCustomInterpolator::GetFinalValueCCustomInterpolator::GetFinalValue
Pobiera końcową wartość, do której prowadzi ten Interpolacja.Gets the final value to which the interpolator leads.
virtual BOOL GetFinalValue(DOUBLE* value);
ParametryParameters
wartośćvalue
Rozdzielczości.Output. Końcowa wartość zmiennej na końcu przejścia.The final value of a variable at the end of the transition.
Wartość zwracanaReturn Value
Implementacja podstawowa zawsze zwraca wartość TRUE.Basic implementation always returns TRUE. Zwróć wartość FALSE z przesłoniętej implementacji, jeśli chcesz, aby zdarzenie zostało zakończone niepowodzeniem.Return FALSE from overridden implementation if you wish to fail the event.
CCustomInterpolator:: initCCustomInterpolator::Init
Inicjuje czas trwania i końcową wartość.Initializes duration and final value.
void Init(
UI_ANIMATION_SECONDS duration,
DOUBLE finalValue);
ParametryParameters
czas trwaniaduration
Czas trwania przejścia.The duration of the transition.
finalValuefinalValue
Końcowa wartość zmiennej na końcu przejścia.The final value of a variable at the end of the transition.
CCustomInterpolator::InterpolateValueCCustomInterpolator::InterpolateValue
Interpoluje wartość w danym przesunięciu.Interpolates the value at a given offset.
virtual BOOL InterpolateValue(
UI_ANIMATION_SECONDS */,
DOUBLE* value);
ParametryParameters
wartośćvalue
Rozdzielczości.Output. Wartość interpolowana.The interpolated value.
Wartość zwracanaReturn Value
Implementacja podstawowa zawsze zwraca wartość TRUE.Basic implementation always returns TRUE. Zwróć wartość FALSE z przesłoniętej implementacji, jeśli chcesz, aby zdarzenie zostało zakończone niepowodzeniem.Return FALSE from overridden implementation if you wish to fail the event.
CCustomInterpolator::InterpolateVelocityCCustomInterpolator::InterpolateVelocity
Interpoluje szybkość dla danego przesunięciaInterpolates the velocity at a given offset
virtual BOOL InterpolateVelocity(
UI_ANIMATION_SECONDS */,
DOUBLE* velocity);
ParametryParameters
prędkośćvelocity
Rozdzielczości.Output. Szybkość zmiennej w przesunięciu.The velocity of the variable at the offset.
Wartość zwracanaReturn Value
Implementacja podstawowa zawsze zwraca wartość TRUE.Basic implementation always returns TRUE. Zwróć wartość FALSE z przesłoniętej implementacji, jeśli chcesz, aby zdarzenie zostało zakończone niepowodzeniem.Return FALSE from overridden implementation if you wish to fail the event.
CCustomInterpolator:: m_currentValueCCustomInterpolator::m_currentValue
Wartość interpolowana.The interpolated value.
DOUBLE m_currentValue;
CCustomInterpolator:: m_currentVelocityCCustomInterpolator::m_currentVelocity
Prędkość interpolowana.The interpolated velocity.
DOUBLE m_currentVelocity;
CCustomInterpolator:: m_durationCCustomInterpolator::m_duration
Czas trwania przejścia.The duration of the transition.
UI_ANIMATION_SECONDS m_duration;
CCustomInterpolator:: m_finalValueCCustomInterpolator::m_finalValue
Końcowa wartość zmiennej na końcu przejścia.The final value of a variable at the end of the transition.
DOUBLE m_finalValue;
CCustomInterpolator:: m_initialValueCCustomInterpolator::m_initialValue
Wartość zmiennej na początku przejścia.The value of the variable at the start of the transition.
DOUBLE m_initialValue;
CCustomInterpolator:: m_initialVelocityCCustomInterpolator::m_initialVelocity
Szybkość zmiennej na początku przejścia.The velocity of the variable at the start of the transition.
DOUBLE m_initialVelocity;
CCustomInterpolator:: SetDurationCCustomInterpolator::SetDuration
Ustawia czas trwania interpolacji.Sets the interpolator's duration.
virtual BOOL SetDuration(UI_ANIMATION_SECONDS duration);
ParametryParameters
czas trwaniaduration
Czas trwania przejścia.The duration of the transition.
Wartość zwracanaReturn Value
Implementacja podstawowa zawsze zwraca wartość TRUE.Basic implementation always returns TRUE. Zwróć wartość FALSE z przesłoniętej implementacji, jeśli chcesz, aby zdarzenie zostało zakończone niepowodzeniem.Return FALSE from overridden implementation if you wish to fail the event.
CCustomInterpolator::SetInitialValueAndVelocityCCustomInterpolator::SetInitialValueAndVelocity
Ustawia wartość początkową i prędkość dla interpolacji.Sets the interpolator's initial value and velocity.
virtual BOOL SetInitialValueAndVelocity(
DOUBLE initialValue,
DOUBLE initialVelocity);
ParametryParameters
initialValueinitialValue
Wartość zmiennej na początku przejścia.The value of the variable at the start of the transition.
initialVelocityinitialVelocity
Szybkość zmiennej na początku przejścia.The velocity of the variable at the start of the transition.
Wartość zwracanaReturn Value
Podstawowa implementacja zawsze zwraca wartość TRUE.The basic implementation always returns TRUE. Zwróć wartość FALSE z przesłoniętej implementacji, jeśli chcesz, aby zdarzenie zostało zakończone niepowodzeniem.Return FALSE from overridden implementation if you wish to fail the event.