hyperspace-sdk-ts 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/client.d.ts +2 -2
- package/dist/client.js +4 -4
- package/dist/proto/hyperspace_pb.js +861 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,6 +109,31 @@ const results = await client.searchText("How to use HyperspaceDB?", 10, "coll",
|
|
|
109
109
|
});
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
+
### Geometric Filters (New in v3.0)
|
|
113
|
+
|
|
114
|
+
HyperspaceDB v3.0 introduces advanced spatial filters that run on the engine level:
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
// 1. Proximity Search (Ball)
|
|
118
|
+
const ballFilter = {
|
|
119
|
+
inBall: { center: [0.1, 0.2, 0.3], radius: 0.5 }
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// 2. Workspace Constraints (Box)
|
|
123
|
+
const boxFilter = {
|
|
124
|
+
inBox: { minBounds: [-1, -1, -1], maxBounds: [1, 1, 1] }
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// 3. Field of View / Angular Search (Cone)
|
|
128
|
+
const coneFilter = {
|
|
129
|
+
inCone: { axes: [1.0, 0.0, 0.0], apertures: [0.5], cen: 0.01 }
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const results = await client.search([0.1, 0.2, 0.3], 10, "coll", {
|
|
133
|
+
filters: [ballFilter, boxFilter]
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
112
137
|
### `searchBatch(vectors, topK, collection?)`
|
|
113
138
|
|
|
114
139
|
Run multiple searches in one gRPC request to reduce RPC overhead.
|
package/dist/client.d.ts
CHANGED
|
@@ -71,12 +71,12 @@ export declare class HyperspaceClient {
|
|
|
71
71
|
deleteCollection(name: string): Promise<boolean>;
|
|
72
72
|
listCollections(): Promise<string[]>;
|
|
73
73
|
delete(id: number, collection?: string): Promise<boolean>;
|
|
74
|
-
insert(
|
|
74
|
+
insert(vector: number[] | Float32Array | Float64Array, id: number, meta?: {
|
|
75
75
|
[key: string]: string;
|
|
76
76
|
}, collection?: string, durability?: DurabilityLevel, typedMetadata?: {
|
|
77
77
|
[key: string]: TypedMetadataValue;
|
|
78
78
|
}): Promise<boolean>;
|
|
79
|
-
insertText(
|
|
79
|
+
insertText(text: string, id: number, meta?: {
|
|
80
80
|
[key: string]: string;
|
|
81
81
|
}, collection?: string, durability?: DurabilityLevel): Promise<boolean>;
|
|
82
82
|
vectorize(text: string, metric?: string): Promise<number[]>;
|
package/dist/client.js
CHANGED
|
@@ -290,11 +290,11 @@ class HyperspaceClient {
|
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
-
insert(
|
|
293
|
+
insert(vector, id, meta, collection = '', durability = hyperspace_pb_1.DurabilityLevel.DEFAULT_LEVEL, typedMetadata) {
|
|
294
294
|
return new Promise((resolve, reject) => {
|
|
295
295
|
const req = new hyperspace_pb_1.InsertRequest();
|
|
296
|
-
req.setId(id);
|
|
297
296
|
req.setVectorList(HyperspaceClient.toVectorList(vector));
|
|
297
|
+
req.setId(id);
|
|
298
298
|
if (meta) {
|
|
299
299
|
const map = req.getMetadataMap();
|
|
300
300
|
for (const k in meta)
|
|
@@ -316,11 +316,11 @@ class HyperspaceClient {
|
|
|
316
316
|
});
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
|
-
insertText(
|
|
319
|
+
insertText(text, id, meta, collection = '', durability = hyperspace_pb_1.DurabilityLevel.DEFAULT_LEVEL) {
|
|
320
320
|
return new Promise((resolve, reject) => {
|
|
321
321
|
const req = new hyperspace_pb_1.InsertTextRequest();
|
|
322
|
-
req.setId(id);
|
|
323
322
|
req.setText(text);
|
|
323
|
+
req.setId(id);
|
|
324
324
|
if (meta) {
|
|
325
325
|
const map = req.getMetadataMap();
|
|
326
326
|
for (const k in meta)
|
|
@@ -54,6 +54,9 @@ goog.exportSymbol('proto.hyperspace.GetNeighborsResponse', null, global);
|
|
|
54
54
|
goog.exportSymbol('proto.hyperspace.GetNodeRequest', null, global);
|
|
55
55
|
goog.exportSymbol('proto.hyperspace.GraphCluster', null, global);
|
|
56
56
|
goog.exportSymbol('proto.hyperspace.GraphNode', null, global);
|
|
57
|
+
goog.exportSymbol('proto.hyperspace.InBall', null, global);
|
|
58
|
+
goog.exportSymbol('proto.hyperspace.InBox', null, global);
|
|
59
|
+
goog.exportSymbol('proto.hyperspace.InCone', null, global);
|
|
57
60
|
goog.exportSymbol('proto.hyperspace.InsertOp', null, global);
|
|
58
61
|
goog.exportSymbol('proto.hyperspace.InsertRequest', null, global);
|
|
59
62
|
goog.exportSymbol('proto.hyperspace.InsertResponse', null, global);
|
|
@@ -722,6 +725,69 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
722
725
|
*/
|
|
723
726
|
proto.hyperspace.Range.displayName = 'proto.hyperspace.Range';
|
|
724
727
|
}
|
|
728
|
+
/**
|
|
729
|
+
* Generated by JsPbCodeGenerator.
|
|
730
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
731
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
732
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
733
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
734
|
+
* valid.
|
|
735
|
+
* @extends {jspb.Message}
|
|
736
|
+
* @constructor
|
|
737
|
+
*/
|
|
738
|
+
proto.hyperspace.InCone = function(opt_data) {
|
|
739
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.hyperspace.InCone.repeatedFields_, null);
|
|
740
|
+
};
|
|
741
|
+
goog.inherits(proto.hyperspace.InCone, jspb.Message);
|
|
742
|
+
if (goog.DEBUG && !COMPILED) {
|
|
743
|
+
/**
|
|
744
|
+
* @public
|
|
745
|
+
* @override
|
|
746
|
+
*/
|
|
747
|
+
proto.hyperspace.InCone.displayName = 'proto.hyperspace.InCone';
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Generated by JsPbCodeGenerator.
|
|
751
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
752
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
753
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
754
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
755
|
+
* valid.
|
|
756
|
+
* @extends {jspb.Message}
|
|
757
|
+
* @constructor
|
|
758
|
+
*/
|
|
759
|
+
proto.hyperspace.InBox = function(opt_data) {
|
|
760
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.hyperspace.InBox.repeatedFields_, null);
|
|
761
|
+
};
|
|
762
|
+
goog.inherits(proto.hyperspace.InBox, jspb.Message);
|
|
763
|
+
if (goog.DEBUG && !COMPILED) {
|
|
764
|
+
/**
|
|
765
|
+
* @public
|
|
766
|
+
* @override
|
|
767
|
+
*/
|
|
768
|
+
proto.hyperspace.InBox.displayName = 'proto.hyperspace.InBox';
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Generated by JsPbCodeGenerator.
|
|
772
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
773
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
774
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
775
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
776
|
+
* valid.
|
|
777
|
+
* @extends {jspb.Message}
|
|
778
|
+
* @constructor
|
|
779
|
+
*/
|
|
780
|
+
proto.hyperspace.InBall = function(opt_data) {
|
|
781
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.hyperspace.InBall.repeatedFields_, null);
|
|
782
|
+
};
|
|
783
|
+
goog.inherits(proto.hyperspace.InBall, jspb.Message);
|
|
784
|
+
if (goog.DEBUG && !COMPILED) {
|
|
785
|
+
/**
|
|
786
|
+
* @public
|
|
787
|
+
* @override
|
|
788
|
+
*/
|
|
789
|
+
proto.hyperspace.InBall.displayName = 'proto.hyperspace.InBall';
|
|
790
|
+
}
|
|
725
791
|
/**
|
|
726
792
|
* Generated by JsPbCodeGenerator.
|
|
727
793
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -7025,7 +7091,7 @@ proto.hyperspace.SearchRequest.prototype.setUseWasserstein = function(value) {
|
|
|
7025
7091
|
* @private {!Array<!Array<number>>}
|
|
7026
7092
|
* @const
|
|
7027
7093
|
*/
|
|
7028
|
-
proto.hyperspace.Filter.oneofGroups_ = [[1,2]];
|
|
7094
|
+
proto.hyperspace.Filter.oneofGroups_ = [[1,2,3,4,5]];
|
|
7029
7095
|
|
|
7030
7096
|
/**
|
|
7031
7097
|
* @enum {number}
|
|
@@ -7033,7 +7099,10 @@ proto.hyperspace.Filter.oneofGroups_ = [[1,2]];
|
|
|
7033
7099
|
proto.hyperspace.Filter.ConditionCase = {
|
|
7034
7100
|
CONDITION_NOT_SET: 0,
|
|
7035
7101
|
MATCH: 1,
|
|
7036
|
-
RANGE: 2
|
|
7102
|
+
RANGE: 2,
|
|
7103
|
+
IN_CONE: 3,
|
|
7104
|
+
IN_BOX: 4,
|
|
7105
|
+
IN_BALL: 5
|
|
7037
7106
|
};
|
|
7038
7107
|
|
|
7039
7108
|
/**
|
|
@@ -7075,7 +7144,10 @@ proto.hyperspace.Filter.prototype.toObject = function(opt_includeInstance) {
|
|
|
7075
7144
|
proto.hyperspace.Filter.toObject = function(includeInstance, msg) {
|
|
7076
7145
|
var f, obj = {
|
|
7077
7146
|
match: (f = msg.getMatch()) && proto.hyperspace.Match.toObject(includeInstance, f),
|
|
7078
|
-
range: (f = msg.getRange()) && proto.hyperspace.Range.toObject(includeInstance, f)
|
|
7147
|
+
range: (f = msg.getRange()) && proto.hyperspace.Range.toObject(includeInstance, f),
|
|
7148
|
+
inCone: (f = msg.getInCone()) && proto.hyperspace.InCone.toObject(includeInstance, f),
|
|
7149
|
+
inBox: (f = msg.getInBox()) && proto.hyperspace.InBox.toObject(includeInstance, f),
|
|
7150
|
+
inBall: (f = msg.getInBall()) && proto.hyperspace.InBall.toObject(includeInstance, f)
|
|
7079
7151
|
};
|
|
7080
7152
|
|
|
7081
7153
|
if (includeInstance) {
|
|
@@ -7122,6 +7194,21 @@ proto.hyperspace.Filter.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
7122
7194
|
reader.readMessage(value,proto.hyperspace.Range.deserializeBinaryFromReader);
|
|
7123
7195
|
msg.setRange(value);
|
|
7124
7196
|
break;
|
|
7197
|
+
case 3:
|
|
7198
|
+
var value = new proto.hyperspace.InCone;
|
|
7199
|
+
reader.readMessage(value,proto.hyperspace.InCone.deserializeBinaryFromReader);
|
|
7200
|
+
msg.setInCone(value);
|
|
7201
|
+
break;
|
|
7202
|
+
case 4:
|
|
7203
|
+
var value = new proto.hyperspace.InBox;
|
|
7204
|
+
reader.readMessage(value,proto.hyperspace.InBox.deserializeBinaryFromReader);
|
|
7205
|
+
msg.setInBox(value);
|
|
7206
|
+
break;
|
|
7207
|
+
case 5:
|
|
7208
|
+
var value = new proto.hyperspace.InBall;
|
|
7209
|
+
reader.readMessage(value,proto.hyperspace.InBall.deserializeBinaryFromReader);
|
|
7210
|
+
msg.setInBall(value);
|
|
7211
|
+
break;
|
|
7125
7212
|
default:
|
|
7126
7213
|
reader.skipField();
|
|
7127
7214
|
break;
|
|
@@ -7167,6 +7254,30 @@ proto.hyperspace.Filter.serializeBinaryToWriter = function(message, writer) {
|
|
|
7167
7254
|
proto.hyperspace.Range.serializeBinaryToWriter
|
|
7168
7255
|
);
|
|
7169
7256
|
}
|
|
7257
|
+
f = message.getInCone();
|
|
7258
|
+
if (f != null) {
|
|
7259
|
+
writer.writeMessage(
|
|
7260
|
+
3,
|
|
7261
|
+
f,
|
|
7262
|
+
proto.hyperspace.InCone.serializeBinaryToWriter
|
|
7263
|
+
);
|
|
7264
|
+
}
|
|
7265
|
+
f = message.getInBox();
|
|
7266
|
+
if (f != null) {
|
|
7267
|
+
writer.writeMessage(
|
|
7268
|
+
4,
|
|
7269
|
+
f,
|
|
7270
|
+
proto.hyperspace.InBox.serializeBinaryToWriter
|
|
7271
|
+
);
|
|
7272
|
+
}
|
|
7273
|
+
f = message.getInBall();
|
|
7274
|
+
if (f != null) {
|
|
7275
|
+
writer.writeMessage(
|
|
7276
|
+
5,
|
|
7277
|
+
f,
|
|
7278
|
+
proto.hyperspace.InBall.serializeBinaryToWriter
|
|
7279
|
+
);
|
|
7280
|
+
}
|
|
7170
7281
|
};
|
|
7171
7282
|
|
|
7172
7283
|
|
|
@@ -7244,6 +7355,117 @@ proto.hyperspace.Filter.prototype.hasRange = function() {
|
|
|
7244
7355
|
};
|
|
7245
7356
|
|
|
7246
7357
|
|
|
7358
|
+
/**
|
|
7359
|
+
* optional InCone in_cone = 3;
|
|
7360
|
+
* @return {?proto.hyperspace.InCone}
|
|
7361
|
+
*/
|
|
7362
|
+
proto.hyperspace.Filter.prototype.getInCone = function() {
|
|
7363
|
+
return /** @type{?proto.hyperspace.InCone} */ (
|
|
7364
|
+
jspb.Message.getWrapperField(this, proto.hyperspace.InCone, 3));
|
|
7365
|
+
};
|
|
7366
|
+
|
|
7367
|
+
|
|
7368
|
+
/**
|
|
7369
|
+
* @param {?proto.hyperspace.InCone|undefined} value
|
|
7370
|
+
* @return {!proto.hyperspace.Filter} returns this
|
|
7371
|
+
*/
|
|
7372
|
+
proto.hyperspace.Filter.prototype.setInCone = function(value) {
|
|
7373
|
+
return jspb.Message.setOneofWrapperField(this, 3, proto.hyperspace.Filter.oneofGroups_[0], value);
|
|
7374
|
+
};
|
|
7375
|
+
|
|
7376
|
+
|
|
7377
|
+
/**
|
|
7378
|
+
* Clears the message field making it undefined.
|
|
7379
|
+
* @return {!proto.hyperspace.Filter} returns this
|
|
7380
|
+
*/
|
|
7381
|
+
proto.hyperspace.Filter.prototype.clearInCone = function() {
|
|
7382
|
+
return this.setInCone(undefined);
|
|
7383
|
+
};
|
|
7384
|
+
|
|
7385
|
+
|
|
7386
|
+
/**
|
|
7387
|
+
* Returns whether this field is set.
|
|
7388
|
+
* @return {boolean}
|
|
7389
|
+
*/
|
|
7390
|
+
proto.hyperspace.Filter.prototype.hasInCone = function() {
|
|
7391
|
+
return jspb.Message.getField(this, 3) != null;
|
|
7392
|
+
};
|
|
7393
|
+
|
|
7394
|
+
|
|
7395
|
+
/**
|
|
7396
|
+
* optional InBox in_box = 4;
|
|
7397
|
+
* @return {?proto.hyperspace.InBox}
|
|
7398
|
+
*/
|
|
7399
|
+
proto.hyperspace.Filter.prototype.getInBox = function() {
|
|
7400
|
+
return /** @type{?proto.hyperspace.InBox} */ (
|
|
7401
|
+
jspb.Message.getWrapperField(this, proto.hyperspace.InBox, 4));
|
|
7402
|
+
};
|
|
7403
|
+
|
|
7404
|
+
|
|
7405
|
+
/**
|
|
7406
|
+
* @param {?proto.hyperspace.InBox|undefined} value
|
|
7407
|
+
* @return {!proto.hyperspace.Filter} returns this
|
|
7408
|
+
*/
|
|
7409
|
+
proto.hyperspace.Filter.prototype.setInBox = function(value) {
|
|
7410
|
+
return jspb.Message.setOneofWrapperField(this, 4, proto.hyperspace.Filter.oneofGroups_[0], value);
|
|
7411
|
+
};
|
|
7412
|
+
|
|
7413
|
+
|
|
7414
|
+
/**
|
|
7415
|
+
* Clears the message field making it undefined.
|
|
7416
|
+
* @return {!proto.hyperspace.Filter} returns this
|
|
7417
|
+
*/
|
|
7418
|
+
proto.hyperspace.Filter.prototype.clearInBox = function() {
|
|
7419
|
+
return this.setInBox(undefined);
|
|
7420
|
+
};
|
|
7421
|
+
|
|
7422
|
+
|
|
7423
|
+
/**
|
|
7424
|
+
* Returns whether this field is set.
|
|
7425
|
+
* @return {boolean}
|
|
7426
|
+
*/
|
|
7427
|
+
proto.hyperspace.Filter.prototype.hasInBox = function() {
|
|
7428
|
+
return jspb.Message.getField(this, 4) != null;
|
|
7429
|
+
};
|
|
7430
|
+
|
|
7431
|
+
|
|
7432
|
+
/**
|
|
7433
|
+
* optional InBall in_ball = 5;
|
|
7434
|
+
* @return {?proto.hyperspace.InBall}
|
|
7435
|
+
*/
|
|
7436
|
+
proto.hyperspace.Filter.prototype.getInBall = function() {
|
|
7437
|
+
return /** @type{?proto.hyperspace.InBall} */ (
|
|
7438
|
+
jspb.Message.getWrapperField(this, proto.hyperspace.InBall, 5));
|
|
7439
|
+
};
|
|
7440
|
+
|
|
7441
|
+
|
|
7442
|
+
/**
|
|
7443
|
+
* @param {?proto.hyperspace.InBall|undefined} value
|
|
7444
|
+
* @return {!proto.hyperspace.Filter} returns this
|
|
7445
|
+
*/
|
|
7446
|
+
proto.hyperspace.Filter.prototype.setInBall = function(value) {
|
|
7447
|
+
return jspb.Message.setOneofWrapperField(this, 5, proto.hyperspace.Filter.oneofGroups_[0], value);
|
|
7448
|
+
};
|
|
7449
|
+
|
|
7450
|
+
|
|
7451
|
+
/**
|
|
7452
|
+
* Clears the message field making it undefined.
|
|
7453
|
+
* @return {!proto.hyperspace.Filter} returns this
|
|
7454
|
+
*/
|
|
7455
|
+
proto.hyperspace.Filter.prototype.clearInBall = function() {
|
|
7456
|
+
return this.setInBall(undefined);
|
|
7457
|
+
};
|
|
7458
|
+
|
|
7459
|
+
|
|
7460
|
+
/**
|
|
7461
|
+
* Returns whether this field is set.
|
|
7462
|
+
* @return {boolean}
|
|
7463
|
+
*/
|
|
7464
|
+
proto.hyperspace.Filter.prototype.hasInBall = function() {
|
|
7465
|
+
return jspb.Message.getField(this, 5) != null;
|
|
7466
|
+
};
|
|
7467
|
+
|
|
7468
|
+
|
|
7247
7469
|
|
|
7248
7470
|
|
|
7249
7471
|
|
|
@@ -7727,6 +7949,642 @@ proto.hyperspace.Range.prototype.hasLteF64 = function() {
|
|
|
7727
7949
|
|
|
7728
7950
|
|
|
7729
7951
|
|
|
7952
|
+
/**
|
|
7953
|
+
* List of repeated fields within this message type.
|
|
7954
|
+
* @private {!Array<number>}
|
|
7955
|
+
* @const
|
|
7956
|
+
*/
|
|
7957
|
+
proto.hyperspace.InCone.repeatedFields_ = [1,2];
|
|
7958
|
+
|
|
7959
|
+
|
|
7960
|
+
|
|
7961
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
7962
|
+
/**
|
|
7963
|
+
* Creates an object representation of this proto.
|
|
7964
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
7965
|
+
* Optional fields that are not set will be set to undefined.
|
|
7966
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
7967
|
+
* For the list of reserved names please see:
|
|
7968
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
7969
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
7970
|
+
* JSPB instance for transitional soy proto support:
|
|
7971
|
+
* http://goto/soy-param-migration
|
|
7972
|
+
* @return {!Object}
|
|
7973
|
+
*/
|
|
7974
|
+
proto.hyperspace.InCone.prototype.toObject = function(opt_includeInstance) {
|
|
7975
|
+
return proto.hyperspace.InCone.toObject(opt_includeInstance, this);
|
|
7976
|
+
};
|
|
7977
|
+
|
|
7978
|
+
|
|
7979
|
+
/**
|
|
7980
|
+
* Static version of the {@see toObject} method.
|
|
7981
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
7982
|
+
* the JSPB instance for transitional soy proto support:
|
|
7983
|
+
* http://goto/soy-param-migration
|
|
7984
|
+
* @param {!proto.hyperspace.InCone} msg The msg instance to transform.
|
|
7985
|
+
* @return {!Object}
|
|
7986
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
7987
|
+
*/
|
|
7988
|
+
proto.hyperspace.InCone.toObject = function(includeInstance, msg) {
|
|
7989
|
+
var f, obj = {
|
|
7990
|
+
axesList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f,
|
|
7991
|
+
aperturesList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f,
|
|
7992
|
+
cen: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0)
|
|
7993
|
+
};
|
|
7994
|
+
|
|
7995
|
+
if (includeInstance) {
|
|
7996
|
+
obj.$jspbMessageInstance = msg;
|
|
7997
|
+
}
|
|
7998
|
+
return obj;
|
|
7999
|
+
};
|
|
8000
|
+
}
|
|
8001
|
+
|
|
8002
|
+
|
|
8003
|
+
/**
|
|
8004
|
+
* Deserializes binary data (in protobuf wire format).
|
|
8005
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
8006
|
+
* @return {!proto.hyperspace.InCone}
|
|
8007
|
+
*/
|
|
8008
|
+
proto.hyperspace.InCone.deserializeBinary = function(bytes) {
|
|
8009
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
8010
|
+
var msg = new proto.hyperspace.InCone;
|
|
8011
|
+
return proto.hyperspace.InCone.deserializeBinaryFromReader(msg, reader);
|
|
8012
|
+
};
|
|
8013
|
+
|
|
8014
|
+
|
|
8015
|
+
/**
|
|
8016
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
8017
|
+
* given reader into the given message object.
|
|
8018
|
+
* @param {!proto.hyperspace.InCone} msg The message object to deserialize into.
|
|
8019
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
8020
|
+
* @return {!proto.hyperspace.InCone}
|
|
8021
|
+
*/
|
|
8022
|
+
proto.hyperspace.InCone.deserializeBinaryFromReader = function(msg, reader) {
|
|
8023
|
+
while (reader.nextField()) {
|
|
8024
|
+
if (reader.isEndGroup()) {
|
|
8025
|
+
break;
|
|
8026
|
+
}
|
|
8027
|
+
var field = reader.getFieldNumber();
|
|
8028
|
+
switch (field) {
|
|
8029
|
+
case 1:
|
|
8030
|
+
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]);
|
|
8031
|
+
for (var i = 0; i < values.length; i++) {
|
|
8032
|
+
msg.addAxes(values[i]);
|
|
8033
|
+
}
|
|
8034
|
+
break;
|
|
8035
|
+
case 2:
|
|
8036
|
+
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]);
|
|
8037
|
+
for (var i = 0; i < values.length; i++) {
|
|
8038
|
+
msg.addApertures(values[i]);
|
|
8039
|
+
}
|
|
8040
|
+
break;
|
|
8041
|
+
case 3:
|
|
8042
|
+
var value = /** @type {number} */ (reader.readDouble());
|
|
8043
|
+
msg.setCen(value);
|
|
8044
|
+
break;
|
|
8045
|
+
default:
|
|
8046
|
+
reader.skipField();
|
|
8047
|
+
break;
|
|
8048
|
+
}
|
|
8049
|
+
}
|
|
8050
|
+
return msg;
|
|
8051
|
+
};
|
|
8052
|
+
|
|
8053
|
+
|
|
8054
|
+
/**
|
|
8055
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
8056
|
+
* @return {!Uint8Array}
|
|
8057
|
+
*/
|
|
8058
|
+
proto.hyperspace.InCone.prototype.serializeBinary = function() {
|
|
8059
|
+
var writer = new jspb.BinaryWriter();
|
|
8060
|
+
proto.hyperspace.InCone.serializeBinaryToWriter(this, writer);
|
|
8061
|
+
return writer.getResultBuffer();
|
|
8062
|
+
};
|
|
8063
|
+
|
|
8064
|
+
|
|
8065
|
+
/**
|
|
8066
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
8067
|
+
* format), writing to the given BinaryWriter.
|
|
8068
|
+
* @param {!proto.hyperspace.InCone} message
|
|
8069
|
+
* @param {!jspb.BinaryWriter} writer
|
|
8070
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8071
|
+
*/
|
|
8072
|
+
proto.hyperspace.InCone.serializeBinaryToWriter = function(message, writer) {
|
|
8073
|
+
var f = undefined;
|
|
8074
|
+
f = message.getAxesList();
|
|
8075
|
+
if (f.length > 0) {
|
|
8076
|
+
writer.writePackedDouble(
|
|
8077
|
+
1,
|
|
8078
|
+
f
|
|
8079
|
+
);
|
|
8080
|
+
}
|
|
8081
|
+
f = message.getAperturesList();
|
|
8082
|
+
if (f.length > 0) {
|
|
8083
|
+
writer.writePackedDouble(
|
|
8084
|
+
2,
|
|
8085
|
+
f
|
|
8086
|
+
);
|
|
8087
|
+
}
|
|
8088
|
+
f = message.getCen();
|
|
8089
|
+
if (f !== 0.0) {
|
|
8090
|
+
writer.writeDouble(
|
|
8091
|
+
3,
|
|
8092
|
+
f
|
|
8093
|
+
);
|
|
8094
|
+
}
|
|
8095
|
+
};
|
|
8096
|
+
|
|
8097
|
+
|
|
8098
|
+
/**
|
|
8099
|
+
* repeated double axes = 1;
|
|
8100
|
+
* @return {!Array<number>}
|
|
8101
|
+
*/
|
|
8102
|
+
proto.hyperspace.InCone.prototype.getAxesList = function() {
|
|
8103
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 1));
|
|
8104
|
+
};
|
|
8105
|
+
|
|
8106
|
+
|
|
8107
|
+
/**
|
|
8108
|
+
* @param {!Array<number>} value
|
|
8109
|
+
* @return {!proto.hyperspace.InCone} returns this
|
|
8110
|
+
*/
|
|
8111
|
+
proto.hyperspace.InCone.prototype.setAxesList = function(value) {
|
|
8112
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
8113
|
+
};
|
|
8114
|
+
|
|
8115
|
+
|
|
8116
|
+
/**
|
|
8117
|
+
* @param {number} value
|
|
8118
|
+
* @param {number=} opt_index
|
|
8119
|
+
* @return {!proto.hyperspace.InCone} returns this
|
|
8120
|
+
*/
|
|
8121
|
+
proto.hyperspace.InCone.prototype.addAxes = function(value, opt_index) {
|
|
8122
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
8123
|
+
};
|
|
8124
|
+
|
|
8125
|
+
|
|
8126
|
+
/**
|
|
8127
|
+
* Clears the list making it empty but non-null.
|
|
8128
|
+
* @return {!proto.hyperspace.InCone} returns this
|
|
8129
|
+
*/
|
|
8130
|
+
proto.hyperspace.InCone.prototype.clearAxesList = function() {
|
|
8131
|
+
return this.setAxesList([]);
|
|
8132
|
+
};
|
|
8133
|
+
|
|
8134
|
+
|
|
8135
|
+
/**
|
|
8136
|
+
* repeated double apertures = 2;
|
|
8137
|
+
* @return {!Array<number>}
|
|
8138
|
+
*/
|
|
8139
|
+
proto.hyperspace.InCone.prototype.getAperturesList = function() {
|
|
8140
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 2));
|
|
8141
|
+
};
|
|
8142
|
+
|
|
8143
|
+
|
|
8144
|
+
/**
|
|
8145
|
+
* @param {!Array<number>} value
|
|
8146
|
+
* @return {!proto.hyperspace.InCone} returns this
|
|
8147
|
+
*/
|
|
8148
|
+
proto.hyperspace.InCone.prototype.setAperturesList = function(value) {
|
|
8149
|
+
return jspb.Message.setField(this, 2, value || []);
|
|
8150
|
+
};
|
|
8151
|
+
|
|
8152
|
+
|
|
8153
|
+
/**
|
|
8154
|
+
* @param {number} value
|
|
8155
|
+
* @param {number=} opt_index
|
|
8156
|
+
* @return {!proto.hyperspace.InCone} returns this
|
|
8157
|
+
*/
|
|
8158
|
+
proto.hyperspace.InCone.prototype.addApertures = function(value, opt_index) {
|
|
8159
|
+
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
|
|
8160
|
+
};
|
|
8161
|
+
|
|
8162
|
+
|
|
8163
|
+
/**
|
|
8164
|
+
* Clears the list making it empty but non-null.
|
|
8165
|
+
* @return {!proto.hyperspace.InCone} returns this
|
|
8166
|
+
*/
|
|
8167
|
+
proto.hyperspace.InCone.prototype.clearAperturesList = function() {
|
|
8168
|
+
return this.setAperturesList([]);
|
|
8169
|
+
};
|
|
8170
|
+
|
|
8171
|
+
|
|
8172
|
+
/**
|
|
8173
|
+
* optional double cen = 3;
|
|
8174
|
+
* @return {number}
|
|
8175
|
+
*/
|
|
8176
|
+
proto.hyperspace.InCone.prototype.getCen = function() {
|
|
8177
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
|
|
8178
|
+
};
|
|
8179
|
+
|
|
8180
|
+
|
|
8181
|
+
/**
|
|
8182
|
+
* @param {number} value
|
|
8183
|
+
* @return {!proto.hyperspace.InCone} returns this
|
|
8184
|
+
*/
|
|
8185
|
+
proto.hyperspace.InCone.prototype.setCen = function(value) {
|
|
8186
|
+
return jspb.Message.setProto3FloatField(this, 3, value);
|
|
8187
|
+
};
|
|
8188
|
+
|
|
8189
|
+
|
|
8190
|
+
|
|
8191
|
+
/**
|
|
8192
|
+
* List of repeated fields within this message type.
|
|
8193
|
+
* @private {!Array<number>}
|
|
8194
|
+
* @const
|
|
8195
|
+
*/
|
|
8196
|
+
proto.hyperspace.InBox.repeatedFields_ = [1,2];
|
|
8197
|
+
|
|
8198
|
+
|
|
8199
|
+
|
|
8200
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
8201
|
+
/**
|
|
8202
|
+
* Creates an object representation of this proto.
|
|
8203
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
8204
|
+
* Optional fields that are not set will be set to undefined.
|
|
8205
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
8206
|
+
* For the list of reserved names please see:
|
|
8207
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
8208
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
8209
|
+
* JSPB instance for transitional soy proto support:
|
|
8210
|
+
* http://goto/soy-param-migration
|
|
8211
|
+
* @return {!Object}
|
|
8212
|
+
*/
|
|
8213
|
+
proto.hyperspace.InBox.prototype.toObject = function(opt_includeInstance) {
|
|
8214
|
+
return proto.hyperspace.InBox.toObject(opt_includeInstance, this);
|
|
8215
|
+
};
|
|
8216
|
+
|
|
8217
|
+
|
|
8218
|
+
/**
|
|
8219
|
+
* Static version of the {@see toObject} method.
|
|
8220
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
8221
|
+
* the JSPB instance for transitional soy proto support:
|
|
8222
|
+
* http://goto/soy-param-migration
|
|
8223
|
+
* @param {!proto.hyperspace.InBox} msg The msg instance to transform.
|
|
8224
|
+
* @return {!Object}
|
|
8225
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8226
|
+
*/
|
|
8227
|
+
proto.hyperspace.InBox.toObject = function(includeInstance, msg) {
|
|
8228
|
+
var f, obj = {
|
|
8229
|
+
minBoundsList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f,
|
|
8230
|
+
maxBoundsList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f
|
|
8231
|
+
};
|
|
8232
|
+
|
|
8233
|
+
if (includeInstance) {
|
|
8234
|
+
obj.$jspbMessageInstance = msg;
|
|
8235
|
+
}
|
|
8236
|
+
return obj;
|
|
8237
|
+
};
|
|
8238
|
+
}
|
|
8239
|
+
|
|
8240
|
+
|
|
8241
|
+
/**
|
|
8242
|
+
* Deserializes binary data (in protobuf wire format).
|
|
8243
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
8244
|
+
* @return {!proto.hyperspace.InBox}
|
|
8245
|
+
*/
|
|
8246
|
+
proto.hyperspace.InBox.deserializeBinary = function(bytes) {
|
|
8247
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
8248
|
+
var msg = new proto.hyperspace.InBox;
|
|
8249
|
+
return proto.hyperspace.InBox.deserializeBinaryFromReader(msg, reader);
|
|
8250
|
+
};
|
|
8251
|
+
|
|
8252
|
+
|
|
8253
|
+
/**
|
|
8254
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
8255
|
+
* given reader into the given message object.
|
|
8256
|
+
* @param {!proto.hyperspace.InBox} msg The message object to deserialize into.
|
|
8257
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
8258
|
+
* @return {!proto.hyperspace.InBox}
|
|
8259
|
+
*/
|
|
8260
|
+
proto.hyperspace.InBox.deserializeBinaryFromReader = function(msg, reader) {
|
|
8261
|
+
while (reader.nextField()) {
|
|
8262
|
+
if (reader.isEndGroup()) {
|
|
8263
|
+
break;
|
|
8264
|
+
}
|
|
8265
|
+
var field = reader.getFieldNumber();
|
|
8266
|
+
switch (field) {
|
|
8267
|
+
case 1:
|
|
8268
|
+
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]);
|
|
8269
|
+
for (var i = 0; i < values.length; i++) {
|
|
8270
|
+
msg.addMinBounds(values[i]);
|
|
8271
|
+
}
|
|
8272
|
+
break;
|
|
8273
|
+
case 2:
|
|
8274
|
+
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]);
|
|
8275
|
+
for (var i = 0; i < values.length; i++) {
|
|
8276
|
+
msg.addMaxBounds(values[i]);
|
|
8277
|
+
}
|
|
8278
|
+
break;
|
|
8279
|
+
default:
|
|
8280
|
+
reader.skipField();
|
|
8281
|
+
break;
|
|
8282
|
+
}
|
|
8283
|
+
}
|
|
8284
|
+
return msg;
|
|
8285
|
+
};
|
|
8286
|
+
|
|
8287
|
+
|
|
8288
|
+
/**
|
|
8289
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
8290
|
+
* @return {!Uint8Array}
|
|
8291
|
+
*/
|
|
8292
|
+
proto.hyperspace.InBox.prototype.serializeBinary = function() {
|
|
8293
|
+
var writer = new jspb.BinaryWriter();
|
|
8294
|
+
proto.hyperspace.InBox.serializeBinaryToWriter(this, writer);
|
|
8295
|
+
return writer.getResultBuffer();
|
|
8296
|
+
};
|
|
8297
|
+
|
|
8298
|
+
|
|
8299
|
+
/**
|
|
8300
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
8301
|
+
* format), writing to the given BinaryWriter.
|
|
8302
|
+
* @param {!proto.hyperspace.InBox} message
|
|
8303
|
+
* @param {!jspb.BinaryWriter} writer
|
|
8304
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8305
|
+
*/
|
|
8306
|
+
proto.hyperspace.InBox.serializeBinaryToWriter = function(message, writer) {
|
|
8307
|
+
var f = undefined;
|
|
8308
|
+
f = message.getMinBoundsList();
|
|
8309
|
+
if (f.length > 0) {
|
|
8310
|
+
writer.writePackedDouble(
|
|
8311
|
+
1,
|
|
8312
|
+
f
|
|
8313
|
+
);
|
|
8314
|
+
}
|
|
8315
|
+
f = message.getMaxBoundsList();
|
|
8316
|
+
if (f.length > 0) {
|
|
8317
|
+
writer.writePackedDouble(
|
|
8318
|
+
2,
|
|
8319
|
+
f
|
|
8320
|
+
);
|
|
8321
|
+
}
|
|
8322
|
+
};
|
|
8323
|
+
|
|
8324
|
+
|
|
8325
|
+
/**
|
|
8326
|
+
* repeated double min_bounds = 1;
|
|
8327
|
+
* @return {!Array<number>}
|
|
8328
|
+
*/
|
|
8329
|
+
proto.hyperspace.InBox.prototype.getMinBoundsList = function() {
|
|
8330
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 1));
|
|
8331
|
+
};
|
|
8332
|
+
|
|
8333
|
+
|
|
8334
|
+
/**
|
|
8335
|
+
* @param {!Array<number>} value
|
|
8336
|
+
* @return {!proto.hyperspace.InBox} returns this
|
|
8337
|
+
*/
|
|
8338
|
+
proto.hyperspace.InBox.prototype.setMinBoundsList = function(value) {
|
|
8339
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
8340
|
+
};
|
|
8341
|
+
|
|
8342
|
+
|
|
8343
|
+
/**
|
|
8344
|
+
* @param {number} value
|
|
8345
|
+
* @param {number=} opt_index
|
|
8346
|
+
* @return {!proto.hyperspace.InBox} returns this
|
|
8347
|
+
*/
|
|
8348
|
+
proto.hyperspace.InBox.prototype.addMinBounds = function(value, opt_index) {
|
|
8349
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
8350
|
+
};
|
|
8351
|
+
|
|
8352
|
+
|
|
8353
|
+
/**
|
|
8354
|
+
* Clears the list making it empty but non-null.
|
|
8355
|
+
* @return {!proto.hyperspace.InBox} returns this
|
|
8356
|
+
*/
|
|
8357
|
+
proto.hyperspace.InBox.prototype.clearMinBoundsList = function() {
|
|
8358
|
+
return this.setMinBoundsList([]);
|
|
8359
|
+
};
|
|
8360
|
+
|
|
8361
|
+
|
|
8362
|
+
/**
|
|
8363
|
+
* repeated double max_bounds = 2;
|
|
8364
|
+
* @return {!Array<number>}
|
|
8365
|
+
*/
|
|
8366
|
+
proto.hyperspace.InBox.prototype.getMaxBoundsList = function() {
|
|
8367
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 2));
|
|
8368
|
+
};
|
|
8369
|
+
|
|
8370
|
+
|
|
8371
|
+
/**
|
|
8372
|
+
* @param {!Array<number>} value
|
|
8373
|
+
* @return {!proto.hyperspace.InBox} returns this
|
|
8374
|
+
*/
|
|
8375
|
+
proto.hyperspace.InBox.prototype.setMaxBoundsList = function(value) {
|
|
8376
|
+
return jspb.Message.setField(this, 2, value || []);
|
|
8377
|
+
};
|
|
8378
|
+
|
|
8379
|
+
|
|
8380
|
+
/**
|
|
8381
|
+
* @param {number} value
|
|
8382
|
+
* @param {number=} opt_index
|
|
8383
|
+
* @return {!proto.hyperspace.InBox} returns this
|
|
8384
|
+
*/
|
|
8385
|
+
proto.hyperspace.InBox.prototype.addMaxBounds = function(value, opt_index) {
|
|
8386
|
+
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
|
|
8387
|
+
};
|
|
8388
|
+
|
|
8389
|
+
|
|
8390
|
+
/**
|
|
8391
|
+
* Clears the list making it empty but non-null.
|
|
8392
|
+
* @return {!proto.hyperspace.InBox} returns this
|
|
8393
|
+
*/
|
|
8394
|
+
proto.hyperspace.InBox.prototype.clearMaxBoundsList = function() {
|
|
8395
|
+
return this.setMaxBoundsList([]);
|
|
8396
|
+
};
|
|
8397
|
+
|
|
8398
|
+
|
|
8399
|
+
|
|
8400
|
+
/**
|
|
8401
|
+
* List of repeated fields within this message type.
|
|
8402
|
+
* @private {!Array<number>}
|
|
8403
|
+
* @const
|
|
8404
|
+
*/
|
|
8405
|
+
proto.hyperspace.InBall.repeatedFields_ = [1];
|
|
8406
|
+
|
|
8407
|
+
|
|
8408
|
+
|
|
8409
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
8410
|
+
/**
|
|
8411
|
+
* Creates an object representation of this proto.
|
|
8412
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
8413
|
+
* Optional fields that are not set will be set to undefined.
|
|
8414
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
8415
|
+
* For the list of reserved names please see:
|
|
8416
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
8417
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
8418
|
+
* JSPB instance for transitional soy proto support:
|
|
8419
|
+
* http://goto/soy-param-migration
|
|
8420
|
+
* @return {!Object}
|
|
8421
|
+
*/
|
|
8422
|
+
proto.hyperspace.InBall.prototype.toObject = function(opt_includeInstance) {
|
|
8423
|
+
return proto.hyperspace.InBall.toObject(opt_includeInstance, this);
|
|
8424
|
+
};
|
|
8425
|
+
|
|
8426
|
+
|
|
8427
|
+
/**
|
|
8428
|
+
* Static version of the {@see toObject} method.
|
|
8429
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
8430
|
+
* the JSPB instance for transitional soy proto support:
|
|
8431
|
+
* http://goto/soy-param-migration
|
|
8432
|
+
* @param {!proto.hyperspace.InBall} msg The msg instance to transform.
|
|
8433
|
+
* @return {!Object}
|
|
8434
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8435
|
+
*/
|
|
8436
|
+
proto.hyperspace.InBall.toObject = function(includeInstance, msg) {
|
|
8437
|
+
var f, obj = {
|
|
8438
|
+
centerList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f,
|
|
8439
|
+
radius: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0)
|
|
8440
|
+
};
|
|
8441
|
+
|
|
8442
|
+
if (includeInstance) {
|
|
8443
|
+
obj.$jspbMessageInstance = msg;
|
|
8444
|
+
}
|
|
8445
|
+
return obj;
|
|
8446
|
+
};
|
|
8447
|
+
}
|
|
8448
|
+
|
|
8449
|
+
|
|
8450
|
+
/**
|
|
8451
|
+
* Deserializes binary data (in protobuf wire format).
|
|
8452
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
8453
|
+
* @return {!proto.hyperspace.InBall}
|
|
8454
|
+
*/
|
|
8455
|
+
proto.hyperspace.InBall.deserializeBinary = function(bytes) {
|
|
8456
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
8457
|
+
var msg = new proto.hyperspace.InBall;
|
|
8458
|
+
return proto.hyperspace.InBall.deserializeBinaryFromReader(msg, reader);
|
|
8459
|
+
};
|
|
8460
|
+
|
|
8461
|
+
|
|
8462
|
+
/**
|
|
8463
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
8464
|
+
* given reader into the given message object.
|
|
8465
|
+
* @param {!proto.hyperspace.InBall} msg The message object to deserialize into.
|
|
8466
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
8467
|
+
* @return {!proto.hyperspace.InBall}
|
|
8468
|
+
*/
|
|
8469
|
+
proto.hyperspace.InBall.deserializeBinaryFromReader = function(msg, reader) {
|
|
8470
|
+
while (reader.nextField()) {
|
|
8471
|
+
if (reader.isEndGroup()) {
|
|
8472
|
+
break;
|
|
8473
|
+
}
|
|
8474
|
+
var field = reader.getFieldNumber();
|
|
8475
|
+
switch (field) {
|
|
8476
|
+
case 1:
|
|
8477
|
+
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]);
|
|
8478
|
+
for (var i = 0; i < values.length; i++) {
|
|
8479
|
+
msg.addCenter(values[i]);
|
|
8480
|
+
}
|
|
8481
|
+
break;
|
|
8482
|
+
case 2:
|
|
8483
|
+
var value = /** @type {number} */ (reader.readDouble());
|
|
8484
|
+
msg.setRadius(value);
|
|
8485
|
+
break;
|
|
8486
|
+
default:
|
|
8487
|
+
reader.skipField();
|
|
8488
|
+
break;
|
|
8489
|
+
}
|
|
8490
|
+
}
|
|
8491
|
+
return msg;
|
|
8492
|
+
};
|
|
8493
|
+
|
|
8494
|
+
|
|
8495
|
+
/**
|
|
8496
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
8497
|
+
* @return {!Uint8Array}
|
|
8498
|
+
*/
|
|
8499
|
+
proto.hyperspace.InBall.prototype.serializeBinary = function() {
|
|
8500
|
+
var writer = new jspb.BinaryWriter();
|
|
8501
|
+
proto.hyperspace.InBall.serializeBinaryToWriter(this, writer);
|
|
8502
|
+
return writer.getResultBuffer();
|
|
8503
|
+
};
|
|
8504
|
+
|
|
8505
|
+
|
|
8506
|
+
/**
|
|
8507
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
8508
|
+
* format), writing to the given BinaryWriter.
|
|
8509
|
+
* @param {!proto.hyperspace.InBall} message
|
|
8510
|
+
* @param {!jspb.BinaryWriter} writer
|
|
8511
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8512
|
+
*/
|
|
8513
|
+
proto.hyperspace.InBall.serializeBinaryToWriter = function(message, writer) {
|
|
8514
|
+
var f = undefined;
|
|
8515
|
+
f = message.getCenterList();
|
|
8516
|
+
if (f.length > 0) {
|
|
8517
|
+
writer.writePackedDouble(
|
|
8518
|
+
1,
|
|
8519
|
+
f
|
|
8520
|
+
);
|
|
8521
|
+
}
|
|
8522
|
+
f = message.getRadius();
|
|
8523
|
+
if (f !== 0.0) {
|
|
8524
|
+
writer.writeDouble(
|
|
8525
|
+
2,
|
|
8526
|
+
f
|
|
8527
|
+
);
|
|
8528
|
+
}
|
|
8529
|
+
};
|
|
8530
|
+
|
|
8531
|
+
|
|
8532
|
+
/**
|
|
8533
|
+
* repeated double center = 1;
|
|
8534
|
+
* @return {!Array<number>}
|
|
8535
|
+
*/
|
|
8536
|
+
proto.hyperspace.InBall.prototype.getCenterList = function() {
|
|
8537
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 1));
|
|
8538
|
+
};
|
|
8539
|
+
|
|
8540
|
+
|
|
8541
|
+
/**
|
|
8542
|
+
* @param {!Array<number>} value
|
|
8543
|
+
* @return {!proto.hyperspace.InBall} returns this
|
|
8544
|
+
*/
|
|
8545
|
+
proto.hyperspace.InBall.prototype.setCenterList = function(value) {
|
|
8546
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
8547
|
+
};
|
|
8548
|
+
|
|
8549
|
+
|
|
8550
|
+
/**
|
|
8551
|
+
* @param {number} value
|
|
8552
|
+
* @param {number=} opt_index
|
|
8553
|
+
* @return {!proto.hyperspace.InBall} returns this
|
|
8554
|
+
*/
|
|
8555
|
+
proto.hyperspace.InBall.prototype.addCenter = function(value, opt_index) {
|
|
8556
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
8557
|
+
};
|
|
8558
|
+
|
|
8559
|
+
|
|
8560
|
+
/**
|
|
8561
|
+
* Clears the list making it empty but non-null.
|
|
8562
|
+
* @return {!proto.hyperspace.InBall} returns this
|
|
8563
|
+
*/
|
|
8564
|
+
proto.hyperspace.InBall.prototype.clearCenterList = function() {
|
|
8565
|
+
return this.setCenterList([]);
|
|
8566
|
+
};
|
|
8567
|
+
|
|
8568
|
+
|
|
8569
|
+
/**
|
|
8570
|
+
* optional double radius = 2;
|
|
8571
|
+
* @return {number}
|
|
8572
|
+
*/
|
|
8573
|
+
proto.hyperspace.InBall.prototype.getRadius = function() {
|
|
8574
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
|
|
8575
|
+
};
|
|
8576
|
+
|
|
8577
|
+
|
|
8578
|
+
/**
|
|
8579
|
+
* @param {number} value
|
|
8580
|
+
* @return {!proto.hyperspace.InBall} returns this
|
|
8581
|
+
*/
|
|
8582
|
+
proto.hyperspace.InBall.prototype.setRadius = function(value) {
|
|
8583
|
+
return jspb.Message.setProto3FloatField(this, 2, value);
|
|
8584
|
+
};
|
|
8585
|
+
|
|
8586
|
+
|
|
8587
|
+
|
|
7730
8588
|
/**
|
|
7731
8589
|
* List of repeated fields within this message type.
|
|
7732
8590
|
* @private {!Array<number>}
|