Kiwano Engine v1.3.x
EaseFunc.h
1// Copyright (c) 2016-2018 Kiwano - Nomango
2//
3// Permission is hereby granted, free of charge, to any person obtaining a copy
4// of this software and associated documentation files (the "Software"), to deal
5// in the Software without restriction, including without limitation the rights
6// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7// copies of the Software, and to permit persons to whom the Software is
8// furnished to do so, subject to the following conditions:
9//
10// The above copyright notice and this permission notice shall be included in
11// all copies or substantial portions of the Software.
12//
13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19// THE SOFTWARE.
20
21#pragma once
22#include <kiwano/core/Common.h>
23
24namespace kiwano
25{
26
29using EaseFunc = Function<float(float)>;
30
34struct Ease
35{
36 static KGE_API EaseFunc Linear;
37 static KGE_API EaseFunc EaseIn;
38 static KGE_API EaseFunc EaseOut;
39 static KGE_API EaseFunc EaseInOut;
40 static KGE_API EaseFunc ExpoIn;
41 static KGE_API EaseFunc ExpoOut;
42 static KGE_API EaseFunc ExpoInOut;
43 static KGE_API EaseFunc ElasticIn;
44 static KGE_API EaseFunc ElasticOut;
45 static KGE_API EaseFunc ElasticInOut;
46 static KGE_API EaseFunc BounceIn;
47 static KGE_API EaseFunc BounceOut;
48 static KGE_API EaseFunc BounceInOut;
49 static KGE_API EaseFunc BackIn;
50 static KGE_API EaseFunc BackOut;
51 static KGE_API EaseFunc BackInOut;
52 static KGE_API EaseFunc QuadIn;
53 static KGE_API EaseFunc QuadOut;
54 static KGE_API EaseFunc QuadInOut;
55 static KGE_API EaseFunc CubicIn;
56 static KGE_API EaseFunc CubicOut;
57 static KGE_API EaseFunc CubicInOut;
58 static KGE_API EaseFunc QuartIn;
59 static KGE_API EaseFunc QuartOut;
60 static KGE_API EaseFunc QuartInOut;
61 static KGE_API EaseFunc QuintIn;
62 static KGE_API EaseFunc QuintOut;
63 static KGE_API EaseFunc QuintInOut;
64 static KGE_API EaseFunc SineIn;
65 static KGE_API EaseFunc SineOut;
66 static KGE_API EaseFunc SineInOut;
67};
68
69} // namespace kiwano
缓动函数枚举
Definition: EaseFunc.h:35
static EaseFunc ElasticOut
自终点赋予弹性
Definition: EaseFunc.h:44
static EaseFunc EaseIn
由慢变快
Definition: EaseFunc.h:37
static EaseFunc BounceIn
自起点赋予反弹力
Definition: EaseFunc.h:46
static EaseFunc Linear
线性
Definition: EaseFunc.h:36
static EaseFunc ElasticInOut
再起点和终点赋予弹性
Definition: EaseFunc.h:45
static EaseFunc BounceOut
自终点赋予反弹力
Definition: EaseFunc.h:47
static EaseFunc EaseInOut
由慢变快, 再由快变慢
Definition: EaseFunc.h:39
static EaseFunc ElasticIn
自起点赋予弹性
Definition: EaseFunc.h:43
static EaseFunc BounceInOut
在起点和终点赋予反弹力
Definition: EaseFunc.h:48
static EaseFunc ExpoOut
由极快变慢
Definition: EaseFunc.h:41
static EaseFunc EaseOut
由快变慢
Definition: EaseFunc.h:38
static EaseFunc ExpoInOut
由慢至极快, 再由极快边慢
Definition: EaseFunc.h:42
static EaseFunc ExpoIn
由慢变极快
Definition: EaseFunc.h:40