Vuo
2.1.1
node
vuo.leap
VuoLeapFrame.c
Go to the documentation of this file.
1
10
#include "
type.h
"
11
#include "
VuoLeapFrame.h
"
12
14
#ifdef VUO_COMPILER
15
VuoModuleMetadata
({
16
"title"
:
"Leap Frame"
,
17
"description"
:
"Frame of Leap Motion data."
,
18
"keywords"
: [
"gesture"
,
"controller"
,
"motion"
,
"hand"
,
"finger"
],
19
"version"
:
"1.0.0"
,
20
"dependencies"
: [
21
"VuoInteger"
,
22
"VuoLeapHand"
,
23
"VuoLeapPointable"
,
24
"VuoText"
,
25
"VuoList_VuoLeapHand"
,
26
"VuoList_VuoLeapPointable"
27
]
28
});
29
#endif
30
42
VuoLeapFrame
VuoLeapFrame_makeFromJson
(
json_object
* js)
43
{
44
return
(
VuoLeapFrame
){
45
VuoJson_getObjectValue
(
VuoInteger
, js,
"id"
, -1),
46
VuoJson_getObjectValue
(
VuoList_VuoLeapHand
, js,
"hands"
, NULL),
47
VuoJson_getObjectValue
(
VuoList_VuoLeapPointable
, js,
"pointables"
, NULL)
48
};
49
}
50
55
json_object
*
VuoLeapFrame_getJson
(
const
VuoLeapFrame
value)
56
{
57
json_object
*js = json_object_new_object();
58
json_object_object_add(js,
"id"
,
VuoInteger_getJson
(value.id));
59
json_object_object_add(js,
"hands"
,
VuoList_VuoLeapHand_getJson
(value.
hands
));
60
json_object_object_add(js,
"pointables"
,
VuoList_VuoLeapPointable_getJson
(value.pointables));
61
return
js;
62
}
63
68
char
*
VuoLeapFrame_getSummary
(
const
VuoLeapFrame
value)
69
{
70
return
VuoText_format
(
"%lld"
, value.id);
71
}
72
77
VuoLeapFrame
VuoLeapFrame_make
(
VuoInteger
id
,
VuoList_VuoLeapHand
hands,
VuoList_VuoLeapPointable
pointables)
78
{
79
VuoLeapFrame
frame;
80
frame.id = id;
81
frame.pointables = pointables;
82
frame.
hands
= hands;
83
return
frame;
84
}
Generated on Thu Jul 9 2020 21:02:23 for Vuo by
1.8.18