Physics.cs 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. using pb = global::Google.ProtocolBuffers;
  3. using pbc = global::Google.ProtocolBuffers.Collections;
  4. using pbd = global::Google.ProtocolBuffers.Descriptors;
  5. using scg = global::System.Collections.Generic;
  6. namespace Sirikata.Physics.Protocol._PBJ_Internal {
  7. public static partial class Physics {
  8. #region Extension registration
  9. public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
  10. }
  11. #endregion
  12. #region Static variables
  13. internal static pbd::MessageDescriptor internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor;
  14. internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.Builder> internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__FieldAccessorTable;
  15. internal static pbd::MessageDescriptor internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor;
  16. internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.Builder> internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__FieldAccessorTable;
  17. #endregion
  18. #region Descriptor
  19. public static pbd::FileDescriptor Descriptor {
  20. get { return descriptor; }
  21. }
  22. private static pbd::FileDescriptor descriptor;
  23. static Physics() {
  24. byte[] descriptorData = global::System.Convert.FromBase64String(
  25. "Cg1QaHlzaWNzLnByb3RvEidTaXJpa2F0YS5QaHlzaWNzLlByb3RvY29sLl9Q" +
  26. "QkpfSW50ZXJuYWwiqAEKDkNvbGxpc2lvbkJlZ2luEhEKCXRpbWVzdGFtcBgC" +
  27. "IAEoBhIZCg10aGlzX3Bvc2l0aW9uGAMgAygBQgIQARIaCg5vdGhlcl9wb3Np" +
  28. "dGlvbhgEIAMoAUICEAESFwoLdGhpc19ub3JtYWwYBSADKAJCAhABEhMKB2lt" +
  29. "cHVsc2UYBiADKAJCAhABEh4KFm90aGVyX29iamVjdF9yZWZlcmVuY2UYByAB" +
  30. "KAwiQQoMQ29sbGlzaW9uRW5kEhEKCXRpbWVzdGFtcBgCIAEoBhIeChZvdGhl" +
  31. "cl9vYmplY3RfcmVmZXJlbmNlGAYgASgM");
  32. pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
  33. descriptor = root;
  34. internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor = Descriptor.MessageTypes[0];
  35. internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__FieldAccessorTable =
  36. new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.Builder>(internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor,
  37. new string[] { "Timestamp", "ThisPosition", "OtherPosition", "ThisNormal", "Impulse", "OtherObjectReference", });
  38. internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor = Descriptor.MessageTypes[1];
  39. internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__FieldAccessorTable =
  40. new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.Builder>(internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor,
  41. new string[] { "Timestamp", "OtherObjectReference", });
  42. return null;
  43. };
  44. pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
  45. new pbd::FileDescriptor[] {
  46. }, assigner);
  47. }
  48. #endregion
  49. }
  50. #region Messages
  51. public sealed partial class CollisionBegin : pb::GeneratedMessage<CollisionBegin, CollisionBegin.Builder> {
  52. private static readonly CollisionBegin defaultInstance = new Builder().BuildPartial();
  53. public static CollisionBegin DefaultInstance {
  54. get { return defaultInstance; }
  55. }
  56. public override CollisionBegin DefaultInstanceForType {
  57. get { return defaultInstance; }
  58. }
  59. protected override CollisionBegin ThisMessage {
  60. get { return this; }
  61. }
  62. public static pbd::MessageDescriptor Descriptor {
  63. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor; }
  64. }
  65. protected override pb::FieldAccess.FieldAccessorTable<CollisionBegin, CollisionBegin.Builder> InternalFieldAccessors {
  66. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__FieldAccessorTable; }
  67. }
  68. public const int TimestampFieldNumber = 2;
  69. private bool hasTimestamp;
  70. private ulong timestamp_ = 0;
  71. public bool HasTimestamp {
  72. get { return hasTimestamp; }
  73. }
  74. [global::System.CLSCompliant(false)]
  75. public ulong Timestamp {
  76. get { return timestamp_; }
  77. }
  78. public const int ThisPositionFieldNumber = 3;
  79. private int thisPositionMemoizedSerializedSize;
  80. private pbc::PopsicleList<double> thisPosition_ = new pbc::PopsicleList<double>();
  81. public scg::IList<double> ThisPositionList {
  82. get { return pbc::Lists.AsReadOnly(thisPosition_); }
  83. }
  84. public int ThisPositionCount {
  85. get { return thisPosition_.Count; }
  86. }
  87. public double GetThisPosition(int index) {
  88. return thisPosition_[index];
  89. }
  90. public const int OtherPositionFieldNumber = 4;
  91. private int otherPositionMemoizedSerializedSize;
  92. private pbc::PopsicleList<double> otherPosition_ = new pbc::PopsicleList<double>();
  93. public scg::IList<double> OtherPositionList {
  94. get { return pbc::Lists.AsReadOnly(otherPosition_); }
  95. }
  96. public int OtherPositionCount {
  97. get { return otherPosition_.Count; }
  98. }
  99. public double GetOtherPosition(int index) {
  100. return otherPosition_[index];
  101. }
  102. public const int ThisNormalFieldNumber = 5;
  103. private int thisNormalMemoizedSerializedSize;
  104. private pbc::PopsicleList<float> thisNormal_ = new pbc::PopsicleList<float>();
  105. public scg::IList<float> ThisNormalList {
  106. get { return pbc::Lists.AsReadOnly(thisNormal_); }
  107. }
  108. public int ThisNormalCount {
  109. get { return thisNormal_.Count; }
  110. }
  111. public float GetThisNormal(int index) {
  112. return thisNormal_[index];
  113. }
  114. public const int ImpulseFieldNumber = 6;
  115. private int impulseMemoizedSerializedSize;
  116. private pbc::PopsicleList<float> impulse_ = new pbc::PopsicleList<float>();
  117. public scg::IList<float> ImpulseList {
  118. get { return pbc::Lists.AsReadOnly(impulse_); }
  119. }
  120. public int ImpulseCount {
  121. get { return impulse_.Count; }
  122. }
  123. public float GetImpulse(int index) {
  124. return impulse_[index];
  125. }
  126. public const int OtherObjectReferenceFieldNumber = 7;
  127. private bool hasOtherObjectReference;
  128. private pb::ByteString otherObjectReference_ = pb::ByteString.Empty;
  129. public bool HasOtherObjectReference {
  130. get { return hasOtherObjectReference; }
  131. }
  132. public pb::ByteString OtherObjectReference {
  133. get { return otherObjectReference_; }
  134. }
  135. public override bool IsInitialized {
  136. get {
  137. return true;
  138. }
  139. }
  140. public override void WriteTo(pb::CodedOutputStream output) {
  141. if (HasTimestamp) {
  142. output.WriteFixed64(2, Timestamp);
  143. }
  144. if (thisPosition_.Count > 0) {
  145. output.WriteRawVarint32(26);
  146. output.WriteRawVarint32((uint) thisPositionMemoizedSerializedSize);
  147. foreach (double element in thisPosition_) {
  148. output.WriteDoubleNoTag(element);
  149. }
  150. }
  151. if (otherPosition_.Count > 0) {
  152. output.WriteRawVarint32(34);
  153. output.WriteRawVarint32((uint) otherPositionMemoizedSerializedSize);
  154. foreach (double element in otherPosition_) {
  155. output.WriteDoubleNoTag(element);
  156. }
  157. }
  158. if (thisNormal_.Count > 0) {
  159. output.WriteRawVarint32(42);
  160. output.WriteRawVarint32((uint) thisNormalMemoizedSerializedSize);
  161. foreach (float element in thisNormal_) {
  162. output.WriteFloatNoTag(element);
  163. }
  164. }
  165. if (impulse_.Count > 0) {
  166. output.WriteRawVarint32(50);
  167. output.WriteRawVarint32((uint) impulseMemoizedSerializedSize);
  168. foreach (float element in impulse_) {
  169. output.WriteFloatNoTag(element);
  170. }
  171. }
  172. if (HasOtherObjectReference) {
  173. output.WriteBytes(7, OtherObjectReference);
  174. }
  175. UnknownFields.WriteTo(output);
  176. }
  177. private int memoizedSerializedSize = -1;
  178. public override int SerializedSize {
  179. get {
  180. int size = memoizedSerializedSize;
  181. if (size != -1) return size;
  182. size = 0;
  183. if (HasTimestamp) {
  184. size += pb::CodedOutputStream.ComputeFixed64Size(2, Timestamp);
  185. }
  186. {
  187. int dataSize = 0;
  188. dataSize = 8 * thisPosition_.Count;
  189. size += dataSize;
  190. if (thisPosition_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
  191. thisPositionMemoizedSerializedSize = dataSize;
  192. }
  193. {
  194. int dataSize = 0;
  195. dataSize = 8 * otherPosition_.Count;
  196. size += dataSize;
  197. if (otherPosition_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
  198. otherPositionMemoizedSerializedSize = dataSize;
  199. }
  200. {
  201. int dataSize = 0;
  202. dataSize = 4 * thisNormal_.Count;
  203. size += dataSize;
  204. if (thisNormal_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
  205. thisNormalMemoizedSerializedSize = dataSize;
  206. }
  207. {
  208. int dataSize = 0;
  209. dataSize = 4 * impulse_.Count;
  210. size += dataSize;
  211. if (impulse_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
  212. impulseMemoizedSerializedSize = dataSize;
  213. }
  214. if (HasOtherObjectReference) {
  215. size += pb::CodedOutputStream.ComputeBytesSize(7, OtherObjectReference);
  216. }
  217. size += UnknownFields.SerializedSize;
  218. memoizedSerializedSize = size;
  219. return size;
  220. }
  221. }
  222. public static CollisionBegin ParseFrom(pb::ByteString data) {
  223. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  224. }
  225. public static CollisionBegin ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
  226. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  227. }
  228. public static CollisionBegin ParseFrom(byte[] data) {
  229. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  230. }
  231. public static CollisionBegin ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
  232. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  233. }
  234. public static CollisionBegin ParseFrom(global::System.IO.Stream input) {
  235. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  236. }
  237. public static CollisionBegin ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  238. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  239. }
  240. public static CollisionBegin ParseDelimitedFrom(global::System.IO.Stream input) {
  241. return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
  242. }
  243. public static CollisionBegin ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  244. return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
  245. }
  246. public static CollisionBegin ParseFrom(pb::CodedInputStream input) {
  247. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  248. }
  249. public static CollisionBegin ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  250. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  251. }
  252. public static Builder CreateBuilder() { return new Builder(); }
  253. public override Builder ToBuilder() { return CreateBuilder(this); }
  254. public override Builder CreateBuilderForType() { return new Builder(); }
  255. public static Builder CreateBuilder(CollisionBegin prototype) {
  256. return (Builder) new Builder().MergeFrom(prototype);
  257. }
  258. public sealed partial class Builder : pb::GeneratedBuilder<CollisionBegin, Builder> {
  259. protected override Builder ThisBuilder {
  260. get { return this; }
  261. }
  262. public Builder() {}
  263. CollisionBegin result = new CollisionBegin();
  264. protected override CollisionBegin MessageBeingBuilt {
  265. get { return result; }
  266. }
  267. public override Builder Clear() {
  268. result = new CollisionBegin();
  269. return this;
  270. }
  271. public override Builder Clone() {
  272. return new Builder().MergeFrom(result);
  273. }
  274. public override pbd::MessageDescriptor DescriptorForType {
  275. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.Descriptor; }
  276. }
  277. public override CollisionBegin DefaultInstanceForType {
  278. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.DefaultInstance; }
  279. }
  280. public override CollisionBegin BuildPartial() {
  281. if (result == null) {
  282. throw new global::System.InvalidOperationException("build() has already been called on this Builder");
  283. }
  284. result.thisPosition_.MakeReadOnly();
  285. result.otherPosition_.MakeReadOnly();
  286. result.thisNormal_.MakeReadOnly();
  287. result.impulse_.MakeReadOnly();
  288. CollisionBegin returnMe = result;
  289. result = null;
  290. return returnMe;
  291. }
  292. public override Builder MergeFrom(pb::IMessage other) {
  293. if (other is CollisionBegin) {
  294. return MergeFrom((CollisionBegin) other);
  295. } else {
  296. base.MergeFrom(other);
  297. return this;
  298. }
  299. }
  300. public override Builder MergeFrom(CollisionBegin other) {
  301. if (other == global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.DefaultInstance) return this;
  302. if (other.HasTimestamp) {
  303. Timestamp = other.Timestamp;
  304. }
  305. if (other.thisPosition_.Count != 0) {
  306. base.AddRange(other.thisPosition_, result.thisPosition_);
  307. }
  308. if (other.otherPosition_.Count != 0) {
  309. base.AddRange(other.otherPosition_, result.otherPosition_);
  310. }
  311. if (other.thisNormal_.Count != 0) {
  312. base.AddRange(other.thisNormal_, result.thisNormal_);
  313. }
  314. if (other.impulse_.Count != 0) {
  315. base.AddRange(other.impulse_, result.impulse_);
  316. }
  317. if (other.HasOtherObjectReference) {
  318. OtherObjectReference = other.OtherObjectReference;
  319. }
  320. this.MergeUnknownFields(other.UnknownFields);
  321. return this;
  322. }
  323. public override Builder MergeFrom(pb::CodedInputStream input) {
  324. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  325. }
  326. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  327. pb::UnknownFieldSet.Builder unknownFields = null;
  328. while (true) {
  329. uint tag = input.ReadTag();
  330. switch (tag) {
  331. case 0: {
  332. if (unknownFields != null) {
  333. this.UnknownFields = unknownFields.Build();
  334. }
  335. return this;
  336. }
  337. default: {
  338. if (pb::WireFormat.IsEndGroupTag(tag)) {
  339. if (unknownFields != null) {
  340. this.UnknownFields = unknownFields.Build();
  341. }
  342. return this;
  343. }
  344. if (unknownFields == null) {
  345. unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  346. }
  347. ParseUnknownField(input, unknownFields, extensionRegistry, tag);
  348. break;
  349. }
  350. case 17: {
  351. Timestamp = input.ReadFixed64();
  352. break;
  353. }
  354. case 26: {
  355. int length = input.ReadInt32();
  356. int limit = input.PushLimit(length);
  357. while (!input.ReachedLimit) {
  358. AddThisPosition(input.ReadDouble());
  359. }
  360. input.PopLimit(limit);
  361. break;
  362. }
  363. case 34: {
  364. int length = input.ReadInt32();
  365. int limit = input.PushLimit(length);
  366. while (!input.ReachedLimit) {
  367. AddOtherPosition(input.ReadDouble());
  368. }
  369. input.PopLimit(limit);
  370. break;
  371. }
  372. case 42: {
  373. int length = input.ReadInt32();
  374. int limit = input.PushLimit(length);
  375. while (!input.ReachedLimit) {
  376. AddThisNormal(input.ReadFloat());
  377. }
  378. input.PopLimit(limit);
  379. break;
  380. }
  381. case 50: {
  382. int length = input.ReadInt32();
  383. int limit = input.PushLimit(length);
  384. while (!input.ReachedLimit) {
  385. AddImpulse(input.ReadFloat());
  386. }
  387. input.PopLimit(limit);
  388. break;
  389. }
  390. case 58: {
  391. OtherObjectReference = input.ReadBytes();
  392. break;
  393. }
  394. }
  395. }
  396. }
  397. public bool HasTimestamp {
  398. get { return result.HasTimestamp; }
  399. }
  400. [global::System.CLSCompliant(false)]
  401. public ulong Timestamp {
  402. get { return result.Timestamp; }
  403. set { SetTimestamp(value); }
  404. }
  405. [global::System.CLSCompliant(false)]
  406. public Builder SetTimestamp(ulong value) {
  407. result.hasTimestamp = true;
  408. result.timestamp_ = value;
  409. return this;
  410. }
  411. public Builder ClearTimestamp() {
  412. result.hasTimestamp = false;
  413. result.timestamp_ = 0;
  414. return this;
  415. }
  416. public pbc::IPopsicleList<double> ThisPositionList {
  417. get { return result.thisPosition_; }
  418. }
  419. public int ThisPositionCount {
  420. get { return result.ThisPositionCount; }
  421. }
  422. public double GetThisPosition(int index) {
  423. return result.GetThisPosition(index);
  424. }
  425. public Builder SetThisPosition(int index, double value) {
  426. result.thisPosition_[index] = value;
  427. return this;
  428. }
  429. public Builder AddThisPosition(double value) {
  430. result.thisPosition_.Add(value);
  431. return this;
  432. }
  433. public Builder AddRangeThisPosition(scg::IEnumerable<double> values) {
  434. base.AddRange(values, result.thisPosition_);
  435. return this;
  436. }
  437. public Builder ClearThisPosition() {
  438. result.thisPosition_.Clear();
  439. return this;
  440. }
  441. public pbc::IPopsicleList<double> OtherPositionList {
  442. get { return result.otherPosition_; }
  443. }
  444. public int OtherPositionCount {
  445. get { return result.OtherPositionCount; }
  446. }
  447. public double GetOtherPosition(int index) {
  448. return result.GetOtherPosition(index);
  449. }
  450. public Builder SetOtherPosition(int index, double value) {
  451. result.otherPosition_[index] = value;
  452. return this;
  453. }
  454. public Builder AddOtherPosition(double value) {
  455. result.otherPosition_.Add(value);
  456. return this;
  457. }
  458. public Builder AddRangeOtherPosition(scg::IEnumerable<double> values) {
  459. base.AddRange(values, result.otherPosition_);
  460. return this;
  461. }
  462. public Builder ClearOtherPosition() {
  463. result.otherPosition_.Clear();
  464. return this;
  465. }
  466. public pbc::IPopsicleList<float> ThisNormalList {
  467. get { return result.thisNormal_; }
  468. }
  469. public int ThisNormalCount {
  470. get { return result.ThisNormalCount; }
  471. }
  472. public float GetThisNormal(int index) {
  473. return result.GetThisNormal(index);
  474. }
  475. public Builder SetThisNormal(int index, float value) {
  476. result.thisNormal_[index] = value;
  477. return this;
  478. }
  479. public Builder AddThisNormal(float value) {
  480. result.thisNormal_.Add(value);
  481. return this;
  482. }
  483. public Builder AddRangeThisNormal(scg::IEnumerable<float> values) {
  484. base.AddRange(values, result.thisNormal_);
  485. return this;
  486. }
  487. public Builder ClearThisNormal() {
  488. result.thisNormal_.Clear();
  489. return this;
  490. }
  491. public pbc::IPopsicleList<float> ImpulseList {
  492. get { return result.impulse_; }
  493. }
  494. public int ImpulseCount {
  495. get { return result.ImpulseCount; }
  496. }
  497. public float GetImpulse(int index) {
  498. return result.GetImpulse(index);
  499. }
  500. public Builder SetImpulse(int index, float value) {
  501. result.impulse_[index] = value;
  502. return this;
  503. }
  504. public Builder AddImpulse(float value) {
  505. result.impulse_.Add(value);
  506. return this;
  507. }
  508. public Builder AddRangeImpulse(scg::IEnumerable<float> values) {
  509. base.AddRange(values, result.impulse_);
  510. return this;
  511. }
  512. public Builder ClearImpulse() {
  513. result.impulse_.Clear();
  514. return this;
  515. }
  516. public bool HasOtherObjectReference {
  517. get { return result.HasOtherObjectReference; }
  518. }
  519. public pb::ByteString OtherObjectReference {
  520. get { return result.OtherObjectReference; }
  521. set { SetOtherObjectReference(value); }
  522. }
  523. public Builder SetOtherObjectReference(pb::ByteString value) {
  524. pb::ThrowHelper.ThrowIfNull(value, "value");
  525. result.hasOtherObjectReference = true;
  526. result.otherObjectReference_ = value;
  527. return this;
  528. }
  529. public Builder ClearOtherObjectReference() {
  530. result.hasOtherObjectReference = false;
  531. result.otherObjectReference_ = pb::ByteString.Empty;
  532. return this;
  533. }
  534. }
  535. static CollisionBegin() {
  536. object.ReferenceEquals(global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.Descriptor, null);
  537. }
  538. }
  539. public sealed partial class CollisionEnd : pb::GeneratedMessage<CollisionEnd, CollisionEnd.Builder> {
  540. private static readonly CollisionEnd defaultInstance = new Builder().BuildPartial();
  541. public static CollisionEnd DefaultInstance {
  542. get { return defaultInstance; }
  543. }
  544. public override CollisionEnd DefaultInstanceForType {
  545. get { return defaultInstance; }
  546. }
  547. protected override CollisionEnd ThisMessage {
  548. get { return this; }
  549. }
  550. public static pbd::MessageDescriptor Descriptor {
  551. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor; }
  552. }
  553. protected override pb::FieldAccess.FieldAccessorTable<CollisionEnd, CollisionEnd.Builder> InternalFieldAccessors {
  554. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__FieldAccessorTable; }
  555. }
  556. public const int TimestampFieldNumber = 2;
  557. private bool hasTimestamp;
  558. private ulong timestamp_ = 0;
  559. public bool HasTimestamp {
  560. get { return hasTimestamp; }
  561. }
  562. [global::System.CLSCompliant(false)]
  563. public ulong Timestamp {
  564. get { return timestamp_; }
  565. }
  566. public const int OtherObjectReferenceFieldNumber = 6;
  567. private bool hasOtherObjectReference;
  568. private pb::ByteString otherObjectReference_ = pb::ByteString.Empty;
  569. public bool HasOtherObjectReference {
  570. get { return hasOtherObjectReference; }
  571. }
  572. public pb::ByteString OtherObjectReference {
  573. get { return otherObjectReference_; }
  574. }
  575. public override bool IsInitialized {
  576. get {
  577. return true;
  578. }
  579. }
  580. public override void WriteTo(pb::CodedOutputStream output) {
  581. if (HasTimestamp) {
  582. output.WriteFixed64(2, Timestamp);
  583. }
  584. if (HasOtherObjectReference) {
  585. output.WriteBytes(6, OtherObjectReference);
  586. }
  587. UnknownFields.WriteTo(output);
  588. }
  589. private int memoizedSerializedSize = -1;
  590. public override int SerializedSize {
  591. get {
  592. int size = memoizedSerializedSize;
  593. if (size != -1) return size;
  594. size = 0;
  595. if (HasTimestamp) {
  596. size += pb::CodedOutputStream.ComputeFixed64Size(2, Timestamp);
  597. }
  598. if (HasOtherObjectReference) {
  599. size += pb::CodedOutputStream.ComputeBytesSize(6, OtherObjectReference);
  600. }
  601. size += UnknownFields.SerializedSize;
  602. memoizedSerializedSize = size;
  603. return size;
  604. }
  605. }
  606. public static CollisionEnd ParseFrom(pb::ByteString data) {
  607. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  608. }
  609. public static CollisionEnd ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
  610. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  611. }
  612. public static CollisionEnd ParseFrom(byte[] data) {
  613. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  614. }
  615. public static CollisionEnd ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
  616. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  617. }
  618. public static CollisionEnd ParseFrom(global::System.IO.Stream input) {
  619. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  620. }
  621. public static CollisionEnd ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  622. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  623. }
  624. public static CollisionEnd ParseDelimitedFrom(global::System.IO.Stream input) {
  625. return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
  626. }
  627. public static CollisionEnd ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  628. return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
  629. }
  630. public static CollisionEnd ParseFrom(pb::CodedInputStream input) {
  631. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  632. }
  633. public static CollisionEnd ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  634. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  635. }
  636. public static Builder CreateBuilder() { return new Builder(); }
  637. public override Builder ToBuilder() { return CreateBuilder(this); }
  638. public override Builder CreateBuilderForType() { return new Builder(); }
  639. public static Builder CreateBuilder(CollisionEnd prototype) {
  640. return (Builder) new Builder().MergeFrom(prototype);
  641. }
  642. public sealed partial class Builder : pb::GeneratedBuilder<CollisionEnd, Builder> {
  643. protected override Builder ThisBuilder {
  644. get { return this; }
  645. }
  646. public Builder() {}
  647. CollisionEnd result = new CollisionEnd();
  648. protected override CollisionEnd MessageBeingBuilt {
  649. get { return result; }
  650. }
  651. public override Builder Clear() {
  652. result = new CollisionEnd();
  653. return this;
  654. }
  655. public override Builder Clone() {
  656. return new Builder().MergeFrom(result);
  657. }
  658. public override pbd::MessageDescriptor DescriptorForType {
  659. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.Descriptor; }
  660. }
  661. public override CollisionEnd DefaultInstanceForType {
  662. get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.DefaultInstance; }
  663. }
  664. public override CollisionEnd BuildPartial() {
  665. if (result == null) {
  666. throw new global::System.InvalidOperationException("build() has already been called on this Builder");
  667. }
  668. CollisionEnd returnMe = result;
  669. result = null;
  670. return returnMe;
  671. }
  672. public override Builder MergeFrom(pb::IMessage other) {
  673. if (other is CollisionEnd) {
  674. return MergeFrom((CollisionEnd) other);
  675. } else {
  676. base.MergeFrom(other);
  677. return this;
  678. }
  679. }
  680. public override Builder MergeFrom(CollisionEnd other) {
  681. if (other == global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.DefaultInstance) return this;
  682. if (other.HasTimestamp) {
  683. Timestamp = other.Timestamp;
  684. }
  685. if (other.HasOtherObjectReference) {
  686. OtherObjectReference = other.OtherObjectReference;
  687. }
  688. this.MergeUnknownFields(other.UnknownFields);
  689. return this;
  690. }
  691. public override Builder MergeFrom(pb::CodedInputStream input) {
  692. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  693. }
  694. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  695. pb::UnknownFieldSet.Builder unknownFields = null;
  696. while (true) {
  697. uint tag = input.ReadTag();
  698. switch (tag) {
  699. case 0: {
  700. if (unknownFields != null) {
  701. this.UnknownFields = unknownFields.Build();
  702. }
  703. return this;
  704. }
  705. default: {
  706. if (pb::WireFormat.IsEndGroupTag(tag)) {
  707. if (unknownFields != null) {
  708. this.UnknownFields = unknownFields.Build();
  709. }
  710. return this;
  711. }
  712. if (unknownFields == null) {
  713. unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  714. }
  715. ParseUnknownField(input, unknownFields, extensionRegistry, tag);
  716. break;
  717. }
  718. case 17: {
  719. Timestamp = input.ReadFixed64();
  720. break;
  721. }
  722. case 50: {
  723. OtherObjectReference = input.ReadBytes();
  724. break;
  725. }
  726. }
  727. }
  728. }
  729. public bool HasTimestamp {
  730. get { return result.HasTimestamp; }
  731. }
  732. [global::System.CLSCompliant(false)]
  733. public ulong Timestamp {
  734. get { return result.Timestamp; }
  735. set { SetTimestamp(value); }
  736. }
  737. [global::System.CLSCompliant(false)]
  738. public Builder SetTimestamp(ulong value) {
  739. result.hasTimestamp = true;
  740. result.timestamp_ = value;
  741. return this;
  742. }
  743. public Builder ClearTimestamp() {
  744. result.hasTimestamp = false;
  745. result.timestamp_ = 0;
  746. return this;
  747. }
  748. public bool HasOtherObjectReference {
  749. get { return result.HasOtherObjectReference; }
  750. }
  751. public pb::ByteString OtherObjectReference {
  752. get { return result.OtherObjectReference; }
  753. set { SetOtherObjectReference(value); }
  754. }
  755. public Builder SetOtherObjectReference(pb::ByteString value) {
  756. pb::ThrowHelper.ThrowIfNull(value, "value");
  757. result.hasOtherObjectReference = true;
  758. result.otherObjectReference_ = value;
  759. return this;
  760. }
  761. public Builder ClearOtherObjectReference() {
  762. result.hasOtherObjectReference = false;
  763. result.otherObjectReference_ = pb::ByteString.Empty;
  764. return this;
  765. }
  766. }
  767. static CollisionEnd() {
  768. object.ReferenceEquals(global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.Descriptor, null);
  769. }
  770. }
  771. #endregion
  772. }