• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# HapticEvent
2
3
4## 概述
5
6表示振动事件。
7
8参数包含振动时间,强度,频率等等。
9
10**起始版本:** 4.1
11
12**相关模块:**[Vibrator](_vibrator_v12.md)
13
14
15## 汇总
16
17
18### Public 属性
19
20| 名称 | 描述 |
21| -------- | -------- |
22| enum [EVENT_TYPE](_vibrator_v12.md#event_type)[type](#type) | 振动类型。  |
23| int [time](#time) | 时间。  |
24| int [duration](#duration) | 振动延时。  |
25| int [intensity](#intensity) | 振动强度。  |
26| int [frequency](#frequency) | 振动频率。  |
27| int [index](#index) | 马达id。表示振动的是哪个马达。  |
28| int [pointNum](#pointnum) | 振动点数量。  |
29| struct [CurvePoint](_curve_point_v12.md)[] [points](#points) | 振动点数组。  |
30
31
32## 类成员变量说明
33
34
35### duration
36
37```
38int HapticEvent::duration
39```
40**描述**
41振动延时。
42
43
44### frequency
45
46```
47int HapticEvent::frequency
48```
49**描述**
50振动频率。
51
52
53### index
54
55```
56int HapticEvent::index
57```
58**描述**
59马达id。表示振动的是哪个马达。
60
61
62### intensity
63
64```
65int HapticEvent::intensity
66```
67**描述**
68振动强度。
69
70
71### pointNum
72
73```
74int HapticEvent::pointNum
75```
76**描述**
77振动点数量。
78
79
80### points
81
82```
83struct CurvePoint [] HapticEvent::points
84```
85**描述**
86振动点数组。
87
88
89### time
90
91```
92int HapticEvent::time
93```
94**描述**
95时间。
96
97
98### type
99
100```
101enum EVENT_TYPE HapticEvent::type
102```
103**描述**
104振动类型。
105