File Coverage

lib/SDL2/HapticRamp.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package SDL2::HapticRamp {
2 2     2   16 use SDL2::Utils;
  2         5  
  2         21  
3             has
4              
5             # Header
6             type => 'uint16',
7             direction => 'opaque', # SDL_HapticDirection
8              
9             # Replay
10             length => 'uint32',
11             delay => 'uint16',
12              
13             # Trigger
14             button => 'uint16',
15             interval => 'uint16',
16              
17             # Ramp
18             start => 'sint16',
19             end => 'sint16',
20             attack_length => 'uint16',
21             attack_level => 'uint16',
22             fade_length => 'uint16',
23             fade_level => 'uint16';
24              
25             =encoding utf-8
26              
27             =head1 NAME
28              
29             SDL2::HapticRamp - A structure containing a template for a Ramp effect
30              
31             =head1 SYNOPSIS
32              
33             use SDL2 qw[:all];
34             # TODO: I need to whip up a quick example
35              
36             =head1 DESCRIPTION
37              
38             A SDL2::HapticRamp is exclusively for the C effect.
39              
40             The ramp effect starts at start strength and ends at end strength. It augments
41             in linear fashion. If you use attack and fade with a ramp the effects get
42             added to the ramp effect making the effect become quadratic instead of linear.
43              
44             =head1 Fields
45              
46             =over
47              
48             =item C - C
49              
50             =item C - Direction of the effect - Not used ATM
51              
52             =item C - Duration of the effect
53              
54             =item C - Delay before starting the effect
55              
56             =item C
57              
58             =item C - How soon it can be triggered again after button
59              
60             =item C - Beginning strength level
61              
62             =item C - Ending strength level
63              
64             =item C - Duration of the attack
65              
66             =item C - Level at the start of the attack
67              
68             =item C - Duration of the fade
69              
70             =item C - Level at the end of the fade
71              
72             =back
73              
74             =head1 AUTHOR
75              
76             Sanko Robinson Esanko@cpan.orgE
77              
78             =begin stopwords
79              
80              
81             =end stopwords
82              
83             =cut
84              
85             };
86             1;