-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnap.capnp
More file actions
96 lines (78 loc) · 1.54 KB
/
snap.capnp
File metadata and controls
96 lines (78 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using Cxx = import "/capnp/c++.capnp";
@0xa3ec9eb77ec1fa59;
$Cxx.namespace("cap");
struct Quat {
a @0 : Float32;
b @1 : Float32;
c @2 : Float32;
d @3 : Float32;
}
struct Pos {
x @0 : Float32;
y @1 : Float32;
z @2 : Float32;
}
struct Snap {
objectIds @0 : List(UInt64);
variableIds @1 : List(UInt64);
triggerIds @2 : List(UInt64);
timestamp @3 : UInt64;
reward @4 : Float32;
}
struct Variable {
nameId @0 : UInt32;
val @1 : Float32;
union {
distance @2 : NamePair;
free @3 : Float32;
mark @4 : Float32;
}
}
struct NamePair {
nameId1 @0 : UInt32;
nameId2 @1 : UInt32;
}
struct NameLimit {
nameId @0 : UInt32;
limit @1 : Float32;
}
struct Trigger {
nameId @0 : UInt32;
functionNameId @1 : UInt32;
union {
limit @2 : NameLimit;
click @3 : Void;
inBox @4 : NamePair;
next @5 : Void;
}
}
struct Recording {
objects @0 : List(Object);
variables @1 : List(Variable);
triggers @2 : List(Trigger);
names @3 : List(Text);
snaps @4 : List(Snap);
}
struct Controller {
right @0 : Bool;
clicked @1 : Bool;
pressed @2 : Bool;
}
struct Box {
w @0 : Float32;
h @1 : Float32;
d @2 : Float32;
texture @3 : Text;
}
struct Object {
pos @0 : Pos;
quat @1 : Quat;
nameId @2 : UInt32;
union {
hmd @3 : Void;
controller @4 : Controller;
point @5 : Void;
canvas @6 : Text;
box @7 : Box;
}
}