-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProx.pbj
162 lines (139 loc) · 5.94 KB
/
Prox.pbj
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/* CBR
* Prox.pbj
*
* Copyright (c) 2009, Ewen Cheslack-Postava
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Sirikata nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
"pbj-0.0.3"
import "TimedMotionVector.pbj";
import "TimedMotionQuaternion.pbj";
import "AggregateBoundingInfo.pbj";
package Sirikata.Protocol.Prox;
// Query Request
message QueryRequest {
optional float query_angle = 1; // deprecated
optional int32 query_max_count = 2; // deprecated
optional bytes query_parameters = 3;
}
// Query Results
/// Indicates basic properties of a replicated index (tree). These
/// properties are included with updates that include the root node,
/// ensuring they are made available at/before the first time they
/// are needed, but not included in every update and do not require
/// a separate type of message to notify the client of their creation.
message IndexProperties {
// Unique integer identifier for this tree. This is only unique to
// the node generating the tree. This doesn't indicate any properties,
// it's just used to ensure we can uniquely identify a tree (e.g. in
// case we're rebuilding and replicating both trees, which would then
// have all identical properties otherwise).
optional uint32 id = 1;
// An optional opaque identifier. In simple replication this isn't
// necessary, but when replicating multiple trees, this allows you
// to figure out how to connect the trees together without
// requiring the tree names/connections to follow a particular
// naming scheme. For example, space servers may replicate trees to
// each other, and when replicating those down to the OH, this could
// be set to the server IDs of the space servers they are replicated
// from so those trees can be connected with a top-level pinto tree.
optional string index_id = 2;
// Static vs. dynamic (and possibly other classifications?). If
// not specified, you need to assume dynamic, but other values
// allow for optimizations.
enum DynamicClassification {
Static = 1;
Dynamic = 2;
}
optional DynamicClassification dynamic_classification = 3;
}
message ObjectAddition {
required uuid object = 1;
required Sirikata.Protocol.TimedMotionVector location = 2;
required Sirikata.Protocol.TimedMotionQuaternion orientation = 3;
// This is the old version of bounds where we just used a bounding
// sphere. It is removed, but maintained in comments to avoid a conflicting
// field #
// optional boundingsphere3f bounds = 4;
// This is the version you should now use, which encodes offset,
// bounds of center points, and maximum object size.
optional Sirikata.Protocol.AggregateBoundingInfo aggregate_bounds = 10;
required uint64 seqno = 5;
optional string mesh = 6;
optional bytes physics = 7;
// When used between servers, prox additions will include the
// query_data. When an addition is provided as a result, they can be omitted
optional bytes query_data = 11;
// The following are only used by certain types of query types and are used
// in providing the structure of the query data structure as part of the
// results.
// The parent object. Do not specify if you don't perform or expose
// aggregates, or if this object is the root node.
optional uuid parent = 8;
// Object type. Either normal object or aggregate (internal imposter)
enum ObjectType {
Object = 1;
Aggregate = 2;
}
optional ObjectType type = 9;
}
// Indicates an object or node, and everything under it, was moved
// from on parent to another
message NodeReparent {
optional uuid object = 1;
optional uint64 seqno = 2;
optional uuid old_parent = 3;
optional uuid new_parent = 4;
// Note duplication with ObjectAddition for compatibility
enum ObjectType {
Object = 1;
Aggregate = 2;
}
optional ObjectType type = 5;
}
message ObjectRemoval {
enum RemovalType {
Transient = 1;
Permanent = 2;
}
required uuid object = 1;
required uint64 seqno = 2;
optional RemovalType type = 3;
}
// "Atomic" update to proximity results
message ProximityUpdate {
repeated ObjectAddition addition = 1;
repeated NodeReparent reparent = 4;
repeated ObjectRemoval removal = 2;
// Included only if an update includes an addition of the root
// node. Specifies the properties of this index.
optional IndexProperties index_properties = 3;
}
message ProximityResults {
required time t = 1;
repeated ProximityUpdate update = 2;
}