Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::scene::ScaleTimelineResolver Class Referencefinal

#include <property_resolver.h>

Inheritance diagram for impeller::scene::ScaleTimelineResolver:
impeller::scene::TimelineResolver impeller::scene::PropertyResolver

Public Member Functions

 ~ScaleTimelineResolver ()
 
void Apply (AnimationTransforms &target, SecondsF time, Scalar weight) override
 Resolve and apply the property value to a target node. This operation is additive; a given node property may be amended by many different PropertyResolvers prior to rendering. For example, an AnimationPlayer may blend multiple Animations together by applying several AnimationClips.
 
- Public Member Functions inherited from impeller::scene::TimelineResolver
virtual ~TimelineResolver ()
 
SecondsF GetEndTime ()
 
- Public Member Functions inherited from impeller::scene::PropertyResolver
virtual ~PropertyResolver ()
 

Additional Inherited Members

- Static Public Member Functions inherited from impeller::scene::PropertyResolver
static std::unique_ptr< TranslationTimelineResolverMakeTranslationTimeline (std::vector< Scalar > times, std::vector< Vector3 > values)
 
static std::unique_ptr< RotationTimelineResolverMakeRotationTimeline (std::vector< Scalar > times, std::vector< Quaternion > values)
 
static std::unique_ptr< ScaleTimelineResolverMakeScaleTimeline (std::vector< Scalar > times, std::vector< Vector3 > values)
 
- Protected Member Functions inherited from impeller::scene::TimelineResolver
TimelineKey GetTimelineKey (SecondsF time)
 
- Protected Attributes inherited from impeller::scene::TimelineResolver
std::vector< Scalartimes_
 

Detailed Description

Definition at line 120 of file property_resolver.h.

Constructor & Destructor Documentation

◆ ~ScaleTimelineResolver()

impeller::scene::ScaleTimelineResolver::~ScaleTimelineResolver ( )
default

Member Function Documentation

◆ Apply()

void impeller::scene::ScaleTimelineResolver::Apply ( AnimationTransforms target,
SecondsF  time,
Scalar  weight 
)
overridevirtual

Resolve and apply the property value to a target node. This operation is additive; a given node property may be amended by many different PropertyResolvers prior to rendering. For example, an AnimationPlayer may blend multiple Animations together by applying several AnimationClips.

Implements impeller::scene::PropertyResolver.

Definition at line 123 of file property_resolver.cc.

125 {
126 if (values_.empty()) {
127 return;
128 }
129 auto key = GetTimelineKey(time);
130 auto value = values_[key.index];
131 if (key.lerp < 1) {
132 value = values_[key.index - 1].Lerp(value, key.lerp);
133 }
134
135 target.animated_pose.scale *=
136 Vector3(1, 1, 1).Lerp(value / target.bind_pose.scale, weight);
137}
TimelineKey GetTimelineKey(SecondsF time)
uint8_t value
uint32_t * target

The documentation for this class was generated from the following files: