Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_dice.h
1 #ifndef _BC_DICE_H
2 #define _BC_DICE_H
3 
4 #include <bc_common.h>
5 
9 
11 
12 typedef enum
13 {
16 
19 
22 
25 
28 
31 
34 
36 
38 
39 typedef struct bc_dice_t bc_dice_t;
40 
42 
43 struct bc_dice_t
44 {
45  bc_dice_face_t _face;
46  float _threshold;
47 };
48 
50 
54 
55 void bc_dice_init(bc_dice_t *self, bc_dice_face_t start);
56 
60 
61 void bc_dice_set_threshold(bc_dice_t *self, float threshold);
62 
68 
69 void bc_dice_feed_vectors(bc_dice_t *self, float x_axis, float y_axis, float z_axis);
70 
74 
76 
78 
79 #endif // _BC_DICE_H
Unknown dice face.
Definition: bc_dice.h:15
struct bc_dice_t bc_dice_t
Dice instance.
Definition: bc_dice.h:39
Dice face 5.
Definition: bc_dice.h:30
bc_dice_face_t
Dice faces.
Definition: bc_dice.h:12
bc_dice_face_t bc_dice_get_face(bc_dice_t *self)
Get calculated dice face.
Definition: bc_dice.c:82
Dice face 3.
Definition: bc_dice.h:24
Dice face 1.
Definition: bc_dice.h:18
void bc_dice_init(bc_dice_t *self, bc_dice_face_t start)
Initialize dice.
Definition: bc_dice.c:17
Dice face 6.
Definition: bc_dice.h:33
Dice face 2.
Definition: bc_dice.h:21
void bc_dice_feed_vectors(bc_dice_t *self, float x_axis, float y_axis, float z_axis)
Feed dice with X/Y/Z axis vectors.
Definition: bc_dice.c:31
Dice face 4.
Definition: bc_dice.h:27
void bc_dice_set_threshold(bc_dice_t *self, float threshold)
Set threshold.
Definition: bc_dice.c:26