/foundation/arkui/ace_engine/frameworks/core/gestures/ |
H A D | velocity.h | 39 Velocity operator+(const Velocity& velocity) const in operator +() 41 return Velocity(offsetPerSecond_ + velocity.offsetPerSecond_); in operator +() 44 Velocity operator-(const Velocity& velocity) const in operator -() 46 return Velocity(offsetPerSecond_ - velocity.offsetPerSecond_); in operator -() 54 Velocity& operator+=(const Velocity& velocity) in operator +=() argument 56 offsetPerSecond_ += velocity.offsetPerSecond_; in operator +=() 60 bool operator==(const Velocity& velocity) const in operator ==() 62 return offsetPerSecond_ == velocity.offsetPerSecond_; in operator ==() 65 bool operator!=(const Velocity& velocity) const in operator !=() 67 return !operator==(velocity); in operator !=() [all...] |
/foundation/arkui/ace_engine/frameworks/core/animation/ |
H A D | spring_motion.cpp | 25 SpringMotion::SpringMotion(double start, double end, double velocity, const RefPtr<SpringProperty>& spring) in SpringMotion() argument 27 Reset(start, end, velocity, spring); in SpringMotion() 54 bool SpringMotion::IsCompleted(double value, double velocity) const in IsCompleted() 56 return NearZero(value - endPosition_, accuracy_) && NearZero(velocity, velocityAccuracy_); in IsCompleted() 74 void SpringMotion::Reset(double start, double end, double velocity, const RefPtr<SpringProperty>& spring) in Reset() argument 77 currentVelocity_ = velocity; in Reset() 79 model_ = SpringModel::Build(start - end, velocity, spring); in Reset() 98 ScrollSpringMotion::ScrollSpringMotion(double start, double end, double velocity, const RefPtr<SpringProperty>& spring) in ScrollSpringMotion() argument 99 : SpringMotion(start, end, velocity, spring) in ScrollSpringMotion()
|
H A D | spring_model.cpp | 72 RefPtr<SpringModel> SpringModel::Build(double distance, double velocity, const RefPtr<SpringProperty>& spring) in Build() argument 84 return AceType::MakeRefPtr<CriticalDampedModel>(distance, velocity, spring); in Build() 86 return AceType::MakeRefPtr<OverdampedModel>(distance, velocity, spring); in Build() 88 return AceType::MakeRefPtr<UnderdampedModel>(distance, velocity, spring); in Build() 94 CriticalDampedModel::CriticalDampedModel(double distance, double velocity, const RefPtr<SpringProperty>& spring) in CriticalDampedModel() argument 99 c2_ = velocity / (r_ * distance); in CriticalDampedModel() 120 OverdampedModel::OverdampedModel(double distance, double velocity, const RefPtr<SpringProperty>& spring) in OverdampedModel() argument 127 c2_ = (velocity - r1_ * distance) / (r2_ - r1_); in OverdampedModel() 149 UnderdampedModel::UnderdampedModel(double distance, double velocity, const RefPtr<SpringProperty>& spring) in UnderdampedModel() argument 157 c2_ = (velocity in UnderdampedModel() [all...] |
H A D | scroll_motion.h | 48 ScrollMotion(double position, double velocity, const ExtentPair& extent, const ExtentPair& initExtent, 62 RefPtr<ScrollSpringMotion> MakeUnderScrollMotion(double position, double velocity) in MakeUnderScrollMotion() argument 64 return AceType::MakeRefPtr<ScrollSpringMotion>(position, leadingExtent_, velocity, spring_); in MakeUnderScrollMotion() 67 RefPtr<ScrollSpringMotion> MakeOverScrollMotion(double position, double velocity) in MakeOverScrollMotion() argument 69 return AceType::MakeRefPtr<ScrollSpringMotion>(position, trailingExtent_, velocity, spring_); in MakeOverScrollMotion() 74 // init velocity
|
H A D | scroll_motion.cpp | 27 ScrollMotion::ScrollMotion(double position, double velocity, const ExtentPair& extent, in ScrollMotion() argument 29 : position_(position), velocity_(velocity), leadingExtent_(extent.Leading()), trailingExtent_(extent.Trailing()) in ScrollMotion() 39 springMotion_ = MakeOverScrollMotion(position, velocity); in ScrollMotion() 41 springMotion_ = MakeUnderScrollMotion(position, velocity); in ScrollMotion() 71 // do not move yet, return init velocity. in GetCurrentVelocity()
|
H A D | simple_spring_node.h | 33 void EndToValue(double endValue, double velocity) override; 49 void ResetNode(double value, double velocity) override; 56 void SetVelocity(double velocity) in SetVelocity() argument 58 velocity_ = velocity; in SetVelocity()
|
H A D | spring_curve.cpp | 34 SpringCurve::SpringCurve(float velocity, float mass, float stiffness, float damping) in SpringCurve() argument 35 : velocity_(velocity), mass_(mass), stiffness_(stiffness), damping_(damping) in SpringCurve() 63 float velocity = 0.0f; in InitEstimateDuration() local 69 velocity = solution_->Velocity(time * i); in InitEstimateDuration() 70 if (NearEqual(position, endPosition_, valueThreshold_) && NearZero(velocity, velocityThreshold_)) { in InitEstimateDuration() 84 velocity = solution_->Velocity(duration); in InitEstimateDuration() 85 if (NearZero(positionChange, valueThreshold_) && NearZero(velocity, velocityThreshold_)) { in InitEstimateDuration()
|
H A D | spring_animation.cpp | 37 SpringAnimation::SpringAnimation(const RefPtr<SpringProperty>& property, float velocity) in SpringAnimation() argument 41 SetEndPosition(DEFAULT_END_POSITION, velocity); in SpringAnimation() 44 SpringAnimation::SpringAnimation(const RefPtr<SpringProperty>& property, float velocity, float valueThreshold) in SpringAnimation() argument 48 SetEndPosition(DEFAULT_END_POSITION, velocity); in SpringAnimation() 76 float velocity = 0.0f; in InitEstimateDuration() local 80 velocity = solution_->Velocity(time * i); in InitEstimateDuration() 81 if (NearEqual(position, endPosition_, valueThreshold_) && NearZero(velocity, velocityThreshold_)) { in InitEstimateDuration()
|
H A D | spring_motion.h | 31 SpringMotion(double start, double end, double velocity, const RefPtr<SpringProperty>& spring); 45 bool IsCompleted(double value, double velocity) const; 53 void Reset(double start, double end, double velocity, const RefPtr<SpringProperty>& spring); 74 ScrollSpringMotion(double start, double end, double velocity, const RefPtr<SpringProperty>& spring);
|
H A D | simple_spring_node.cpp | 72 void SimpleSpringNode::EndToValue(double endValue, double velocity) in EndToValue() argument 83 SpringNode::EndToValue(endValue, velocity); in EndToValue() 104 NotifyNext(endValue, velocity); in EndToValue() 149 void SimpleSpringNode::ResetNode(double value, double velocity) in ResetNode() argument 152 velocity_ = velocity; in ResetNode()
|
H A D | spring_curve.h | 28 SpringCurve(float velocity, float mass, float stiffness, float damping); 34 void UpdateVelocity(float velocity) in UpdateVelocity() argument 36 velocity_ = velocity; in UpdateVelocity()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/list/ |
H A D | list_event_test_ng.cpp | 150 * @tc.desc: Handle drag over top and drag back with velocity 168 * @tc.steps: step2. Drag back and drag with velocity in HWTEST_F() 297 float velocity = 0; in HWTEST_F() local 298 DragAction(frameNode_, startOffset, -49, velocity); in HWTEST_F() 307 DragAction(frameNode_, startOffset, -50, velocity); in HWTEST_F() 313 * @tc.steps: step4. Drag end with velocity and over the edge in HWTEST_F() 325 DragAction(frameNode_, startOffset, 1, velocity); in HWTEST_F() 334 DragAction(frameNode_, startOffset, 50, velocity); in HWTEST_F() 343 DragAction(frameNode_, startOffset, 51, velocity); in HWTEST_F() 349 * @tc.steps: step8. Drag end with velocity an in HWTEST_F() 382 float velocity = 0; HWTEST_F() local 468 float velocity = 0; HWTEST_F() local 636 float velocity = 0; HWTEST_F() local 699 float velocity = 0; HWTEST_F() local 768 float velocity = 0; HWTEST_F() local 871 float velocity = 0; HWTEST_F() local 905 float velocity = 0; HWTEST_F() local [all...] |
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_client/unittest/animation/ |
H A D | rs_animation_timing_curve_test.cpp | 50 float velocity = 0.0f; in HWTEST_F() local 54 rsAnimationTimingCurve.CreateSpringCurve(velocity, mass, stiffness, damping); in HWTEST_F() 55 ASSERT_EQ(velocity, 0.0f); in HWTEST_F() 67 float velocity = -1.0f; in HWTEST_F() local 71 rsAnimationTimingCurve.CreateInterpolatingSpring(velocity, mass, stiffness, damping); in HWTEST_F() 72 ASSERT_EQ(velocity, -1.0f); in HWTEST_F()
|
/foundation/graphic/graphic_2d/rosen/test/render/render/unittest/animat/ |
H A D | rs_animat_rate_decider_test.cpp | 74 PropertyValue velocity; in HWTEST_F() local 78 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 82 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 86 velocity = std::make_shared<RSRenderAnimatableProperty<float>>( in HWTEST_F() 89 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 93 velocity = std::make_shared<RSRenderAnimatableProperty<float>>( in HWTEST_F() 96 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 151 rateDecider_->MakeDecision([](const RSPropertyUnit unit, float velocity) -> int32_t { return 90; }); in HWTEST_F() 166 auto frameRateGetFunc = [this](const RSPropertyUnit unit, float velocity) -> int32_t{ in HWTEST_F() 186 auto frameRateGetFunc = [this](const RSPropertyUnit unit, float velocity) in HWTEST_F() [all...] |
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/animation/ |
H A D | rs_animation_rate_decider_test.cpp | 86 PropertyValue velocity; in HWTEST_F() local 90 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 94 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 98 velocity = std::make_shared<RSRenderAnimatableProperty<float>>( in HWTEST_F() 101 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 105 velocity = std::make_shared<RSRenderAnimatableProperty<float>>( in HWTEST_F() 108 rsAnimationRateDecider.AddDecisionElement(id, velocity, range); in HWTEST_F() 138 rateDecider_->MakeDecision([](const RSPropertyUnit unit, float velocity) -> int32_t { return 90; }); in HWTEST_F() 164 auto frameRateGetFunc = [this](const RSPropertyUnit unit, float velocity) -> int32_t{ in HWTEST_F() 200 auto frameRateGetFunc = [this](const RSPropertyUnit unit, float velocity) in HWTEST_F() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components/scroll/ |
H A D | scroll_spring_effect.cpp | 28 scrollable_->SetScrollOverCallBack([weakEffect = AceType::WeakClaim(this)](double velocity) { in RegisterSpringCallback() 31 effect->ProcessScrollOver(velocity); in RegisterSpringCallback() 37 void ScrollSpringEffect::ProcessScrollOver(double velocity) in ProcessScrollOver() argument 50 position, velocity, ExtentPair(minExtent, maxExtent), ExtentPair(initMinExtent, initMaxExtent)); in ProcessScrollOver()
|
H A D | scroll_fade_controller.cpp | 89 void ScrollFadeController::ProcessAbsorb(double velocity) in ProcessAbsorb() argument 91 if (velocity < 0.0 || state_ == OverScrollState::PULL) { in ProcessAbsorb() 95 velocity = std::clamp(velocity, MIN_VELOCITY, MAX_VELOCITY); in ProcessAbsorb() 97 opacityCeil_ = std::clamp(velocity * VELOCITY_FACTOR, opacityFloor_, MAX_OPACITY); in ProcessAbsorb() 99 scaleSizeCeil_ = std::min(SCALE_SIZE_BASE + SCALE_VELOCITY_FACTOR * velocity * velocity, MAX_SCALE_SIZE); in ProcessAbsorb() 101 controller_->SetDuration(std::round(DURATION_BASE + velocity * DURATION_VELOCITY_FACTOR)); in ProcessAbsorb()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/scroll/effect/ |
H A D | scroll_fade_controller.cpp | 89 void ScrollFadeController::ProcessAbsorb(double velocity) in ProcessAbsorb() argument 91 if (velocity < 0.0 || state_ == OverScrollState::PULL) { in ProcessAbsorb() 95 velocity = std::clamp(velocity, MIN_VELOCITY, MAX_VELOCITY); in ProcessAbsorb() 97 opacityCeil_ = std::clamp(velocity * VELOCITY_FACTOR, opacityFloor_, MAX_OPACITY); in ProcessAbsorb() 99 scaleSizeCeil_ = std::min(SCALE_SIZE_BASE + SCALE_VELOCITY_FACTOR * velocity * velocity, MAX_SCALE_SIZE); in ProcessAbsorb() 101 controller_->SetDuration(std::round(DURATION_BASE + velocity * DURATION_VELOCITY_FACTOR)); in ProcessAbsorb()
|
/foundation/graphic/graphic_3d/lume/Lume_3D/api/3d/shaders/common/ |
H A D | 3d_dm_target_packing_common.h | 120 vec2 GetPackVelocity(in vec2 velocity) in GetPackVelocity() argument 122 return velocity; in GetPackVelocity() 125 vec4 GetPackVelocityAndNormal(in vec2 velocity, in vec3 normal) in GetPackVelocityAndNormal() argument 127 return vec4(velocity, NormalOctEncode(normal)); in GetPackVelocityAndNormal() 170 vec2 GetUnpackVelocity(in vec2 velocity) in GetUnpackVelocity() argument 172 return velocity; in GetUnpackVelocity() 175 void GetUnpackVelocityAndNormal(in vec4 packed, out vec2 velocity, out vec3 normal) in GetUnpackVelocityAndNormal() argument 177 velocity = packed.xy; in GetUnpackVelocityAndNormal()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/animation/ |
H A D | rs_animation_rate_decider.cpp | 42 void RSAnimationRateDecider::AddDecisionElement(PropertyId id, const PropertyValue& velocity, FrameRateRange range) in AddDecisionElement() argument 47 if (!velocity && !range.IsValid() && range.componentScene_ == ComponentScene::UNKNOWN_SCENE) { in AddDecisionElement() 51 if (velocity != nullptr) { in AddDecisionElement() 52 data = velocity->Clone(); in AddDecisionElement() 131 float velocity = 0.0f; in ProcessVector2f() local 139 velocity = sqrt(velocityX * velocityX + velocityY * velocityY); in ProcessVector2f() 142 velocity = property->ToFloat(); in ProcessVector2f() 144 return func(property->GetPropertyUnit(), velocity); in ProcessVector2f()
|
H A D | rs_render_spring_animation.cpp | 178 auto velocity = springValueEstimator_->GetPropertyVelocity(prevMappedTime_); in OnAnimate() local 179 if ((velocity * FRAME_TIME_INTERVAL)->IsNearEqual(zeroValue, zeroThreshold_)) { in OnAnimate() 197 // stop running the previous animation and inherit velocity from it in OnAttach() 315 // if animation is never started, return start value and initial velocity in GetSpringStatus() 326 auto velocity = springValueEstimator_->GetPropertyVelocity(prevMappedTime_); in GetSpringStatus() local 328 // return current position and velocity in GetSpringStatus() 329 return { springValueEstimator_->GetAnimationProperty(), endValue_, velocity }; in GetSpringStatus() 344 auto [lastValue, endValue, velocity] = from->GetSpringStatus(); in InheritSpringStatus() 359 initialVelocity_ = velocity; in InheritSpringStatus() 363 springValueEstimator_->SetInitialVelocity(velocity); in InheritSpringStatus() 382 SetInitialVelocity(const std::shared_ptr<RSRenderPropertyBase>& velocity) SetInitialVelocity() argument [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/scroll/ |
H A D | scroll_spring_effect.cpp | 24 scrollable_->SetScrollOverCallBack([weakEffect = AceType::WeakClaim(this)](double velocity) { in RegisterSpringCallback() 27 effect->ProcessScrollOver(velocity); in RegisterSpringCallback() 47 void ScrollSpringEffect::ProcessScrollOver(double velocity) in ProcessScrollOver() argument 65 position, velocity, ExtentPair(minExtent, maxExtent), ExtentPair(initMinExtent, initMaxExtent)); in ProcessScrollOver()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/scrollable/ |
H A D | nestable_scroll_container.h | 39 * @param velocity current velocity on the main axis. 43 float offset, int32_t source, NestedState state = NestedState::GESTURE, float velocity = 0.f) = 0; 46 * @brief Handle drag end velocity, triggering a scroll animation or a bounce animation on overScroll. 48 * @param velocity drag end velocity. 50 * @return true if velocity is consumed 52 virtual bool HandleScrollVelocity(float velocity, const RefPtr<NestableScrollContainer>& child = nullptr) = 0; 59 * @param velocity current velocity o [all...] |
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/fuzztest/rsanimationratedecider_fuzzer/ |
H A D | rsanimationratedecider_fuzzer.cpp | 71 PropertyValue velocity;
in DoSomethingInterestingWithMyAPI() local 77 rsAnimationRateDecider.AddDecisionElement(id, velocity, range);
in DoSomethingInterestingWithMyAPI() 78 rsAnimationRateDecider.MakeDecision([](const RSPropertyUnit unit, float velocity) -> int32_t { return 0; });
in DoSomethingInterestingWithMyAPI() 80 auto frameRateGetFunc = [](const RSPropertyUnit unit, float velocity) -> int32_t { return 0; };
in DoSomethingInterestingWithMyAPI()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_client/core/animation/ |
H A D | rs_animation_timing_curve.cpp | 83 float velocity, float mass, float stiffness, float damping) in CreateSpringCurve() 89 return RSAnimationTimingCurve(std::make_shared<RSSpringInterpolator>(response, dampingRatio, velocity)); in CreateSpringCurve() 93 return RSAnimationTimingCurve(std::make_shared<RSSpringInterpolator>(response, dampingRatio, velocity)); in CreateSpringCurve() 97 float mass, float stiffness, float damping, float velocity, float minimumAmplitudeRatio) in CreateInterpolatingSpring() 104 response, dampingRatio, velocity, CurveType::INTERPOLATING_SPRING, minimumAmplitudeRatio); in CreateInterpolatingSpring() 109 response, dampingRatio, velocity, CurveType::INTERPOLATING_SPRING, minimumAmplitudeRatio); in CreateInterpolatingSpring() 82 CreateSpringCurve( float velocity, float mass, float stiffness, float damping) CreateSpringCurve() argument 96 CreateInterpolatingSpring( float mass, float stiffness, float damping, float velocity, float minimumAmplitudeRatio) CreateInterpolatingSpring() argument
|