engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FInertialScrollManager类 参考

A helper class to calculate inertial scrolling. 更多...

#include <InertialScrollManager.h>

Public 成员函数

void AddScrollSample (float Delta, double CurrentTime)
 Adds a scroll velocity sample to help calculate a smooth velocity
 
void ClearScrollVelocity ()
 Instantly end the inertial scroll
 
 FInertialScrollManager (double SampleTimeout=0.1f)
 Constructor 更多...
 
float GetScrollVelocity () const
 Gets the calculated velocity of the scroll.
 
void UpdateScrollVelocity (const float InDeltaTime)
 Updates the current scroll velocity. 更多...
 

详细描述

A helper class to calculate inertial scrolling.

This class combines a percentage of velocity lost per second coupled with a static amount of velocity lost per second in order to achieve a quick decay when the velocity grows small enough, and the percentage of friction lost prevents large velocities from scrolling forever.

构造及析构函数说明

◆ FInertialScrollManager()

FInertialScrollManager::FInertialScrollManager ( double  SampleTimeout = 0.1f)

Constructor

参数
ScrollDeccelerationThe acceleration against the velocity causing it to decay.
SampleTimeoutSamples older than this amount of time will be discarded.

成员函数说明

◆ UpdateScrollVelocity()

void FInertialScrollManager::UpdateScrollVelocity ( const float  InDeltaTime)

Updates the current scroll velocity.

Call every frame.


该类的文档由以下文件生成: