Physics.pbj.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using pbd = global::Google.ProtocolBuffers.Descriptors;
  28. using pb = global::Google.ProtocolBuffers;
  29. namespace Sirikata.Physics.Protocol {
  30. public class CollisionBegin : PBJ.IMessage {
  31. protected _PBJ_Internal.CollisionBegin super;
  32. public _PBJ_Internal.CollisionBegin _PBJSuper{ get { return super;} }
  33. public CollisionBegin() {
  34. super=new _PBJ_Internal.CollisionBegin();
  35. }
  36. public CollisionBegin(_PBJ_Internal.CollisionBegin reference) {
  37. super=reference;
  38. }
  39. public static CollisionBegin defaultInstance= new CollisionBegin (_PBJ_Internal.CollisionBegin.DefaultInstance);
  40. public static CollisionBegin DefaultInstance{
  41. get {return defaultInstance;}
  42. }
  43. public static pbd.MessageDescriptor Descriptor {
  44. get { return _PBJ_Internal.CollisionBegin.Descriptor; } }
  45. public static class Types {
  46. }
  47. public static bool WithinReservedFieldTagRange(int field_tag) {
  48. return false;
  49. }
  50. public static bool WithinExtensionFieldTagRange(int field_tag) {
  51. return false;
  52. }
  53. public const int TimestampFieldTag=2;
  54. public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
  55. public PBJ.Time Timestamp{ get {
  56. if (HasTimestamp) {
  57. return PBJ._PBJ.CastTime(super.Timestamp);
  58. } else {
  59. return PBJ._PBJ.CastTime();
  60. }
  61. }
  62. }
  63. public const int ThisPositionFieldTag=3;
  64. public int ThisPositionCount { get { return super.ThisPositionCount/3;} }
  65. public bool HasThisPosition(int index) { return true; }
  66. public PBJ.Vector3d GetThisPosition(int index) {
  67. if (HasThisPosition(index)) {
  68. return PBJ._PBJ.CastVector3d(super.GetThisPosition(index*3+0),super.GetThisPosition(index*3+1),super.GetThisPosition(index*3+2));
  69. } else {
  70. return PBJ._PBJ.CastVector3d();
  71. }
  72. }
  73. public const int OtherPositionFieldTag=4;
  74. public int OtherPositionCount { get { return super.OtherPositionCount/3;} }
  75. public bool HasOtherPosition(int index) { return true; }
  76. public PBJ.Vector3d GetOtherPosition(int index) {
  77. if (HasOtherPosition(index)) {
  78. return PBJ._PBJ.CastVector3d(super.GetOtherPosition(index*3+0),super.GetOtherPosition(index*3+1),super.GetOtherPosition(index*3+2));
  79. } else {
  80. return PBJ._PBJ.CastVector3d();
  81. }
  82. }
  83. public const int ThisNormalFieldTag=5;
  84. public int ThisNormalCount { get { return super.ThisNormalCount/2;} }
  85. public bool HasThisNormal(int index) { return true; }
  86. public PBJ.Vector3f GetThisNormal(int index) {
  87. if (HasThisNormal(index)) {
  88. return PBJ._PBJ.CastNormal(super.GetThisNormal(index*2+0),super.GetThisNormal(index*2+1));
  89. } else {
  90. return PBJ._PBJ.CastNormal();
  91. }
  92. }
  93. public const int ImpulseFieldTag=6;
  94. public int ImpulseCount { get { return super.ImpulseCount;} }
  95. public bool HasImpulse(int index) {return PBJ._PBJ.ValidateFloat(super.GetImpulse(index));}
  96. public float Impulse(int index) {
  97. return (float)PBJ._PBJ.CastFloat(super.GetImpulse(index));
  98. }
  99. public const int OtherObjectReferenceFieldTag=7;
  100. public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
  101. public PBJ.UUID OtherObjectReference{ get {
  102. if (HasOtherObjectReference) {
  103. return PBJ._PBJ.CastUuid(super.OtherObjectReference);
  104. } else {
  105. return PBJ._PBJ.CastUuid();
  106. }
  107. }
  108. }
  109. public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
  110. public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
  111. public static Builder CreateBuilder() { return new Builder(); }
  112. public static Builder CreateBuilder(CollisionBegin prototype) {
  113. return (Builder)new Builder().MergeFrom(prototype);
  114. }
  115. public static CollisionBegin ParseFrom(pb::ByteString data) {
  116. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
  117. }
  118. public static CollisionBegin ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
  119. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
  120. }
  121. public static CollisionBegin ParseFrom(byte[] data) {
  122. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
  123. }
  124. public static CollisionBegin ParseFrom(byte[] data, pb::ExtensionRegistry er) {
  125. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
  126. }
  127. public static CollisionBegin ParseFrom(global::System.IO.Stream data) {
  128. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
  129. }
  130. public static CollisionBegin ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
  131. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
  132. }
  133. public static CollisionBegin ParseFrom(pb::CodedInputStream data) {
  134. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
  135. }
  136. public static CollisionBegin ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
  137. return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
  138. }
  139. protected override bool _HasAllPBJFields{ get {
  140. return true
  141. ;
  142. } }
  143. public bool IsInitialized { get {
  144. return super.IsInitialized&&_HasAllPBJFields;
  145. } }
  146. public class Builder : global::PBJ.IMessage.IBuilder{
  147. protected override bool _HasAllPBJFields{ get {
  148. return true
  149. ;
  150. } }
  151. public bool IsInitialized { get {
  152. return super.IsInitialized&&_HasAllPBJFields;
  153. } }
  154. protected _PBJ_Internal.CollisionBegin.Builder super;
  155. public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
  156. public _PBJ_Internal.CollisionBegin.Builder _PBJSuper{ get { return super;} }
  157. public Builder() {super = new _PBJ_Internal.CollisionBegin.Builder();}
  158. public Builder(_PBJ_Internal.CollisionBegin.Builder other) {
  159. super=other;
  160. }
  161. public Builder Clone() {return new Builder(super.Clone());}
  162. public Builder MergeFrom(CollisionBegin prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
  163. public Builder Clear() {super.Clear();return this;}
  164. public CollisionBegin BuildPartial() {return new CollisionBegin(super.BuildPartial());}
  165. public CollisionBegin Build() {if (_HasAllPBJFields) return new CollisionBegin(super.Build());return null;}
  166. public pbd::MessageDescriptor DescriptorForType {
  167. get { return CollisionBegin.Descriptor; } }
  168. public Builder ClearTimestamp() { super.ClearTimestamp();return this;}
  169. public const int TimestampFieldTag=2;
  170. public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
  171. public PBJ.Time Timestamp{ get {
  172. if (HasTimestamp) {
  173. return PBJ._PBJ.CastTime(super.Timestamp);
  174. } else {
  175. return PBJ._PBJ.CastTime();
  176. }
  177. }
  178. set {
  179. super.Timestamp=(PBJ._PBJ.Construct(value));
  180. }
  181. }
  182. public Builder ClearThisPosition() { super.ClearThisPosition();return this;}
  183. public const int ThisPositionFieldTag=3;
  184. public int ThisPositionCount { get { return super.ThisPositionCount/3;} }
  185. public bool HasThisPosition(int index) { return true; }
  186. public PBJ.Vector3d GetThisPosition(int index) {
  187. if (HasThisPosition(index)) {
  188. return PBJ._PBJ.CastVector3d(super.GetThisPosition(index*3+0),super.GetThisPosition(index*3+1),super.GetThisPosition(index*3+2));
  189. } else {
  190. return PBJ._PBJ.CastVector3d();
  191. }
  192. }
  193. public Builder AddThisPosition(PBJ.Vector3d value) {
  194. double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
  195. super.AddThisPosition(_PBJtempArray[0]);
  196. super.AddThisPosition(_PBJtempArray[1]);
  197. super.AddThisPosition(_PBJtempArray[2]);
  198. return this;
  199. }
  200. public Builder SetThisPosition(int index,PBJ.Vector3d value) {
  201. double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
  202. super.SetThisPosition(index*3+0,_PBJtempArray[0]);
  203. super.SetThisPosition(index*3+1,_PBJtempArray[1]);
  204. super.SetThisPosition(index*3+2,_PBJtempArray[2]);
  205. return this;
  206. }
  207. public Builder ClearOtherPosition() { super.ClearOtherPosition();return this;}
  208. public const int OtherPositionFieldTag=4;
  209. public int OtherPositionCount { get { return super.OtherPositionCount/3;} }
  210. public bool HasOtherPosition(int index) { return true; }
  211. public PBJ.Vector3d GetOtherPosition(int index) {
  212. if (HasOtherPosition(index)) {
  213. return PBJ._PBJ.CastVector3d(super.GetOtherPosition(index*3+0),super.GetOtherPosition(index*3+1),super.GetOtherPosition(index*3+2));
  214. } else {
  215. return PBJ._PBJ.CastVector3d();
  216. }
  217. }
  218. public Builder AddOtherPosition(PBJ.Vector3d value) {
  219. double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
  220. super.AddOtherPosition(_PBJtempArray[0]);
  221. super.AddOtherPosition(_PBJtempArray[1]);
  222. super.AddOtherPosition(_PBJtempArray[2]);
  223. return this;
  224. }
  225. public Builder SetOtherPosition(int index,PBJ.Vector3d value) {
  226. double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
  227. super.SetOtherPosition(index*3+0,_PBJtempArray[0]);
  228. super.SetOtherPosition(index*3+1,_PBJtempArray[1]);
  229. super.SetOtherPosition(index*3+2,_PBJtempArray[2]);
  230. return this;
  231. }
  232. public Builder ClearThisNormal() { super.ClearThisNormal();return this;}
  233. public const int ThisNormalFieldTag=5;
  234. public int ThisNormalCount { get { return super.ThisNormalCount/2;} }
  235. public bool HasThisNormal(int index) { return true; }
  236. public PBJ.Vector3f GetThisNormal(int index) {
  237. if (HasThisNormal(index)) {
  238. return PBJ._PBJ.CastNormal(super.GetThisNormal(index*2+0),super.GetThisNormal(index*2+1));
  239. } else {
  240. return PBJ._PBJ.CastNormal();
  241. }
  242. }
  243. public Builder AddThisNormal(PBJ.Vector3f value) {
  244. float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value);
  245. super.AddThisNormal(_PBJtempArray[0]);
  246. super.AddThisNormal(_PBJtempArray[1]);
  247. return this;
  248. }
  249. public Builder SetThisNormal(int index,PBJ.Vector3f value) {
  250. float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value);
  251. super.SetThisNormal(index*2+0,_PBJtempArray[0]);
  252. super.SetThisNormal(index*2+1,_PBJtempArray[1]);
  253. return this;
  254. }
  255. public Builder ClearImpulse() { super.ClearImpulse();return this;}
  256. public Builder SetImpulse(int index, float value) {
  257. super.SetImpulse(index,PBJ._PBJ.Construct(value));
  258. return this;
  259. }
  260. public const int ImpulseFieldTag=6;
  261. public int ImpulseCount { get { return super.ImpulseCount;} }
  262. public bool HasImpulse(int index) {return PBJ._PBJ.ValidateFloat(super.GetImpulse(index));}
  263. public float Impulse(int index) {
  264. return (float)PBJ._PBJ.CastFloat(super.GetImpulse(index));
  265. }
  266. public Builder AddImpulse(float value) {
  267. super.AddImpulse(PBJ._PBJ.Construct(value));
  268. return this;
  269. }
  270. public Builder ClearOtherObjectReference() { super.ClearOtherObjectReference();return this;}
  271. public const int OtherObjectReferenceFieldTag=7;
  272. public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
  273. public PBJ.UUID OtherObjectReference{ get {
  274. if (HasOtherObjectReference) {
  275. return PBJ._PBJ.CastUuid(super.OtherObjectReference);
  276. } else {
  277. return PBJ._PBJ.CastUuid();
  278. }
  279. }
  280. set {
  281. super.OtherObjectReference=(PBJ._PBJ.Construct(value));
  282. }
  283. }
  284. }
  285. }
  286. }
  287. namespace Sirikata.Physics.Protocol {
  288. public class CollisionEnd : PBJ.IMessage {
  289. protected _PBJ_Internal.CollisionEnd super;
  290. public _PBJ_Internal.CollisionEnd _PBJSuper{ get { return super;} }
  291. public CollisionEnd() {
  292. super=new _PBJ_Internal.CollisionEnd();
  293. }
  294. public CollisionEnd(_PBJ_Internal.CollisionEnd reference) {
  295. super=reference;
  296. }
  297. public static CollisionEnd defaultInstance= new CollisionEnd (_PBJ_Internal.CollisionEnd.DefaultInstance);
  298. public static CollisionEnd DefaultInstance{
  299. get {return defaultInstance;}
  300. }
  301. public static pbd.MessageDescriptor Descriptor {
  302. get { return _PBJ_Internal.CollisionEnd.Descriptor; } }
  303. public static class Types {
  304. }
  305. public static bool WithinReservedFieldTagRange(int field_tag) {
  306. return false;
  307. }
  308. public static bool WithinExtensionFieldTagRange(int field_tag) {
  309. return false;
  310. }
  311. public const int TimestampFieldTag=2;
  312. public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
  313. public PBJ.Time Timestamp{ get {
  314. if (HasTimestamp) {
  315. return PBJ._PBJ.CastTime(super.Timestamp);
  316. } else {
  317. return PBJ._PBJ.CastTime();
  318. }
  319. }
  320. }
  321. public const int OtherObjectReferenceFieldTag=6;
  322. public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
  323. public PBJ.UUID OtherObjectReference{ get {
  324. if (HasOtherObjectReference) {
  325. return PBJ._PBJ.CastUuid(super.OtherObjectReference);
  326. } else {
  327. return PBJ._PBJ.CastUuid();
  328. }
  329. }
  330. }
  331. public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
  332. public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
  333. public static Builder CreateBuilder() { return new Builder(); }
  334. public static Builder CreateBuilder(CollisionEnd prototype) {
  335. return (Builder)new Builder().MergeFrom(prototype);
  336. }
  337. public static CollisionEnd ParseFrom(pb::ByteString data) {
  338. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
  339. }
  340. public static CollisionEnd ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
  341. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
  342. }
  343. public static CollisionEnd ParseFrom(byte[] data) {
  344. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
  345. }
  346. public static CollisionEnd ParseFrom(byte[] data, pb::ExtensionRegistry er) {
  347. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
  348. }
  349. public static CollisionEnd ParseFrom(global::System.IO.Stream data) {
  350. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
  351. }
  352. public static CollisionEnd ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
  353. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
  354. }
  355. public static CollisionEnd ParseFrom(pb::CodedInputStream data) {
  356. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
  357. }
  358. public static CollisionEnd ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
  359. return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
  360. }
  361. protected override bool _HasAllPBJFields{ get {
  362. return true
  363. ;
  364. } }
  365. public bool IsInitialized { get {
  366. return super.IsInitialized&&_HasAllPBJFields;
  367. } }
  368. public class Builder : global::PBJ.IMessage.IBuilder{
  369. protected override bool _HasAllPBJFields{ get {
  370. return true
  371. ;
  372. } }
  373. public bool IsInitialized { get {
  374. return super.IsInitialized&&_HasAllPBJFields;
  375. } }
  376. protected _PBJ_Internal.CollisionEnd.Builder super;
  377. public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
  378. public _PBJ_Internal.CollisionEnd.Builder _PBJSuper{ get { return super;} }
  379. public Builder() {super = new _PBJ_Internal.CollisionEnd.Builder();}
  380. public Builder(_PBJ_Internal.CollisionEnd.Builder other) {
  381. super=other;
  382. }
  383. public Builder Clone() {return new Builder(super.Clone());}
  384. public Builder MergeFrom(CollisionEnd prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
  385. public Builder Clear() {super.Clear();return this;}
  386. public CollisionEnd BuildPartial() {return new CollisionEnd(super.BuildPartial());}
  387. public CollisionEnd Build() {if (_HasAllPBJFields) return new CollisionEnd(super.Build());return null;}
  388. public pbd::MessageDescriptor DescriptorForType {
  389. get { return CollisionEnd.Descriptor; } }
  390. public Builder ClearTimestamp() { super.ClearTimestamp();return this;}
  391. public const int TimestampFieldTag=2;
  392. public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
  393. public PBJ.Time Timestamp{ get {
  394. if (HasTimestamp) {
  395. return PBJ._PBJ.CastTime(super.Timestamp);
  396. } else {
  397. return PBJ._PBJ.CastTime();
  398. }
  399. }
  400. set {
  401. super.Timestamp=(PBJ._PBJ.Construct(value));
  402. }
  403. }
  404. public Builder ClearOtherObjectReference() { super.ClearOtherObjectReference();return this;}
  405. public const int OtherObjectReferenceFieldTag=6;
  406. public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
  407. public PBJ.UUID OtherObjectReference{ get {
  408. if (HasOtherObjectReference) {
  409. return PBJ._PBJ.CastUuid(super.OtherObjectReference);
  410. } else {
  411. return PBJ._PBJ.CastUuid();
  412. }
  413. }
  414. set {
  415. super.OtherObjectReference=(PBJ._PBJ.Construct(value));
  416. }
  417. }
  418. }
  419. }
  420. }