PageRenderTime 73ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 1ms

/jbox2d-serialization/src/generated/org/box2d/proto/Box2D.java

http://jbox2d.googlecode.com/
Java | 1976 lines | 1757 code | 171 blank | 48 comment | 259 complexity | 3f126acab01eb02d55c3a1f27f552101 MD5 | raw file
Possible License(s): BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: src/main/resources/proto/box2d.proto
  3. package org.box2d.proto;
  4. public final class Box2D {
  5. private Box2D() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public enum PbBodyType
  10. implements com.google.protobuf.ProtocolMessageEnum {
  11. STATIC(0, 0),
  12. DYNAMIC(1, 1),
  13. KINEMATIC(2, 2),
  14. ;
  15. public static final int STATIC_VALUE = 0;
  16. public static final int DYNAMIC_VALUE = 1;
  17. public static final int KINEMATIC_VALUE = 2;
  18. public final int getNumber() { return value; }
  19. public static PbBodyType valueOf(int value) {
  20. switch (value) {
  21. case 0: return STATIC;
  22. case 1: return DYNAMIC;
  23. case 2: return KINEMATIC;
  24. default: return null;
  25. }
  26. }
  27. public static com.google.protobuf.Internal.EnumLiteMap<PbBodyType>
  28. internalGetValueMap() {
  29. return internalValueMap;
  30. }
  31. private static com.google.protobuf.Internal.EnumLiteMap<PbBodyType>
  32. internalValueMap =
  33. new com.google.protobuf.Internal.EnumLiteMap<PbBodyType>() {
  34. public PbBodyType findValueByNumber(int number) {
  35. return PbBodyType.valueOf(number);
  36. }
  37. };
  38. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  39. getValueDescriptor() {
  40. return getDescriptor().getValues().get(index);
  41. }
  42. public final com.google.protobuf.Descriptors.EnumDescriptor
  43. getDescriptorForType() {
  44. return getDescriptor();
  45. }
  46. public static final com.google.protobuf.Descriptors.EnumDescriptor
  47. getDescriptor() {
  48. return org.box2d.proto.Box2D.getDescriptor().getEnumTypes().get(0);
  49. }
  50. private static final PbBodyType[] VALUES = {
  51. STATIC, DYNAMIC, KINEMATIC,
  52. };
  53. public static PbBodyType valueOf(
  54. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  55. if (desc.getType() != getDescriptor()) {
  56. throw new java.lang.IllegalArgumentException(
  57. "EnumValueDescriptor is not for this type.");
  58. }
  59. return VALUES[desc.getIndex()];
  60. }
  61. private final int index;
  62. private final int value;
  63. private PbBodyType(int index, int value) {
  64. this.index = index;
  65. this.value = value;
  66. }
  67. // @@protoc_insertion_point(enum_scope:box2d.PbBodyType)
  68. }
  69. public enum PbShapeType
  70. implements com.google.protobuf.ProtocolMessageEnum {
  71. CIRCLE(0, 1),
  72. POLYGON(1, 2),
  73. EDGE(2, 3),
  74. LOOP(3, 4),
  75. ;
  76. public static final int CIRCLE_VALUE = 1;
  77. public static final int POLYGON_VALUE = 2;
  78. public static final int EDGE_VALUE = 3;
  79. public static final int LOOP_VALUE = 4;
  80. public final int getNumber() { return value; }
  81. public static PbShapeType valueOf(int value) {
  82. switch (value) {
  83. case 1: return CIRCLE;
  84. case 2: return POLYGON;
  85. case 3: return EDGE;
  86. case 4: return LOOP;
  87. default: return null;
  88. }
  89. }
  90. public static com.google.protobuf.Internal.EnumLiteMap<PbShapeType>
  91. internalGetValueMap() {
  92. return internalValueMap;
  93. }
  94. private static com.google.protobuf.Internal.EnumLiteMap<PbShapeType>
  95. internalValueMap =
  96. new com.google.protobuf.Internal.EnumLiteMap<PbShapeType>() {
  97. public PbShapeType findValueByNumber(int number) {
  98. return PbShapeType.valueOf(number);
  99. }
  100. };
  101. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  102. getValueDescriptor() {
  103. return getDescriptor().getValues().get(index);
  104. }
  105. public final com.google.protobuf.Descriptors.EnumDescriptor
  106. getDescriptorForType() {
  107. return getDescriptor();
  108. }
  109. public static final com.google.protobuf.Descriptors.EnumDescriptor
  110. getDescriptor() {
  111. return org.box2d.proto.Box2D.getDescriptor().getEnumTypes().get(1);
  112. }
  113. private static final PbShapeType[] VALUES = {
  114. CIRCLE, POLYGON, EDGE, LOOP,
  115. };
  116. public static PbShapeType valueOf(
  117. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  118. if (desc.getType() != getDescriptor()) {
  119. throw new java.lang.IllegalArgumentException(
  120. "EnumValueDescriptor is not for this type.");
  121. }
  122. return VALUES[desc.getIndex()];
  123. }
  124. private final int index;
  125. private final int value;
  126. private PbShapeType(int index, int value) {
  127. this.index = index;
  128. this.value = value;
  129. }
  130. // @@protoc_insertion_point(enum_scope:box2d.PbShapeType)
  131. }
  132. public enum PbJointType
  133. implements com.google.protobuf.ProtocolMessageEnum {
  134. DISTANCE(0, 1),
  135. REVOLUTE(1, 2),
  136. PRISMATIC(2, 3),
  137. PULLEY(3, 4),
  138. MOUSE(4, 5),
  139. GEAR(5, 6),
  140. WHEEL(6, 7),
  141. WELD(7, 8),
  142. FRICTION(8, 9),
  143. ROPE(9, 10),
  144. CONSTANT_VOLUME(10, 11),
  145. LINE(11, 12),
  146. ;
  147. public static final int DISTANCE_VALUE = 1;
  148. public static final int REVOLUTE_VALUE = 2;
  149. public static final int PRISMATIC_VALUE = 3;
  150. public static final int PULLEY_VALUE = 4;
  151. public static final int MOUSE_VALUE = 5;
  152. public static final int GEAR_VALUE = 6;
  153. public static final int WHEEL_VALUE = 7;
  154. public static final int WELD_VALUE = 8;
  155. public static final int FRICTION_VALUE = 9;
  156. public static final int ROPE_VALUE = 10;
  157. public static final int CONSTANT_VOLUME_VALUE = 11;
  158. public static final int LINE_VALUE = 12;
  159. public final int getNumber() { return value; }
  160. public static PbJointType valueOf(int value) {
  161. switch (value) {
  162. case 1: return DISTANCE;
  163. case 2: return REVOLUTE;
  164. case 3: return PRISMATIC;
  165. case 4: return PULLEY;
  166. case 5: return MOUSE;
  167. case 6: return GEAR;
  168. case 7: return WHEEL;
  169. case 8: return WELD;
  170. case 9: return FRICTION;
  171. case 10: return ROPE;
  172. case 11: return CONSTANT_VOLUME;
  173. case 12: return LINE;
  174. default: return null;
  175. }
  176. }
  177. public static com.google.protobuf.Internal.EnumLiteMap<PbJointType>
  178. internalGetValueMap() {
  179. return internalValueMap;
  180. }
  181. private static com.google.protobuf.Internal.EnumLiteMap<PbJointType>
  182. internalValueMap =
  183. new com.google.protobuf.Internal.EnumLiteMap<PbJointType>() {
  184. public PbJointType findValueByNumber(int number) {
  185. return PbJointType.valueOf(number);
  186. }
  187. };
  188. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  189. getValueDescriptor() {
  190. return getDescriptor().getValues().get(index);
  191. }
  192. public final com.google.protobuf.Descriptors.EnumDescriptor
  193. getDescriptorForType() {
  194. return getDescriptor();
  195. }
  196. public static final com.google.protobuf.Descriptors.EnumDescriptor
  197. getDescriptor() {
  198. return org.box2d.proto.Box2D.getDescriptor().getEnumTypes().get(2);
  199. }
  200. private static final PbJointType[] VALUES = {
  201. DISTANCE, REVOLUTE, PRISMATIC, PULLEY, MOUSE, GEAR, WHEEL, WELD, FRICTION, ROPE, CONSTANT_VOLUME, LINE,
  202. };
  203. public static PbJointType valueOf(
  204. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  205. if (desc.getType() != getDescriptor()) {
  206. throw new java.lang.IllegalArgumentException(
  207. "EnumValueDescriptor is not for this type.");
  208. }
  209. return VALUES[desc.getIndex()];
  210. }
  211. private final int index;
  212. private final int value;
  213. private PbJointType(int index, int value) {
  214. this.index = index;
  215. this.value = value;
  216. }
  217. // @@protoc_insertion_point(enum_scope:box2d.PbJointType)
  218. }
  219. public interface PbVec2OrBuilder
  220. extends com.google.protobuf.MessageOrBuilder {
  221. // required float x = 1;
  222. boolean hasX();
  223. float getX();
  224. // required float y = 2;
  225. boolean hasY();
  226. float getY();
  227. }
  228. public static final class PbVec2 extends
  229. com.google.protobuf.GeneratedMessage
  230. implements PbVec2OrBuilder {
  231. // Use PbVec2.newBuilder() to construct.
  232. private PbVec2(Builder builder) {
  233. super(builder);
  234. }
  235. private PbVec2(boolean noInit) {}
  236. private static final PbVec2 defaultInstance;
  237. public static PbVec2 getDefaultInstance() {
  238. return defaultInstance;
  239. }
  240. public PbVec2 getDefaultInstanceForType() {
  241. return defaultInstance;
  242. }
  243. public static final com.google.protobuf.Descriptors.Descriptor
  244. getDescriptor() {
  245. return org.box2d.proto.Box2D.internal_static_box2d_PbVec2_descriptor;
  246. }
  247. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  248. internalGetFieldAccessorTable() {
  249. return org.box2d.proto.Box2D.internal_static_box2d_PbVec2_fieldAccessorTable;
  250. }
  251. private int bitField0_;
  252. // required float x = 1;
  253. public static final int X_FIELD_NUMBER = 1;
  254. private float x_;
  255. public boolean hasX() {
  256. return ((bitField0_ & 0x00000001) == 0x00000001);
  257. }
  258. public float getX() {
  259. return x_;
  260. }
  261. // required float y = 2;
  262. public static final int Y_FIELD_NUMBER = 2;
  263. private float y_;
  264. public boolean hasY() {
  265. return ((bitField0_ & 0x00000002) == 0x00000002);
  266. }
  267. public float getY() {
  268. return y_;
  269. }
  270. private void initFields() {
  271. x_ = 0F;
  272. y_ = 0F;
  273. }
  274. private byte memoizedIsInitialized = -1;
  275. public final boolean isInitialized() {
  276. byte isInitialized = memoizedIsInitialized;
  277. if (isInitialized != -1) return isInitialized == 1;
  278. if (!hasX()) {
  279. memoizedIsInitialized = 0;
  280. return false;
  281. }
  282. if (!hasY()) {
  283. memoizedIsInitialized = 0;
  284. return false;
  285. }
  286. memoizedIsInitialized = 1;
  287. return true;
  288. }
  289. public void writeTo(com.google.protobuf.CodedOutputStream output)
  290. throws java.io.IOException {
  291. getSerializedSize();
  292. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  293. output.writeFloat(1, x_);
  294. }
  295. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  296. output.writeFloat(2, y_);
  297. }
  298. getUnknownFields().writeTo(output);
  299. }
  300. private int memoizedSerializedSize = -1;
  301. public int getSerializedSize() {
  302. int size = memoizedSerializedSize;
  303. if (size != -1) return size;
  304. size = 0;
  305. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  306. size += com.google.protobuf.CodedOutputStream
  307. .computeFloatSize(1, x_);
  308. }
  309. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  310. size += com.google.protobuf.CodedOutputStream
  311. .computeFloatSize(2, y_);
  312. }
  313. size += getUnknownFields().getSerializedSize();
  314. memoizedSerializedSize = size;
  315. return size;
  316. }
  317. private static final long serialVersionUID = 0L;
  318. @java.lang.Override
  319. protected java.lang.Object writeReplace()
  320. throws java.io.ObjectStreamException {
  321. return super.writeReplace();
  322. }
  323. public static org.box2d.proto.Box2D.PbVec2 parseFrom(
  324. com.google.protobuf.ByteString data)
  325. throws com.google.protobuf.InvalidProtocolBufferException {
  326. return newBuilder().mergeFrom(data).buildParsed();
  327. }
  328. public static org.box2d.proto.Box2D.PbVec2 parseFrom(
  329. com.google.protobuf.ByteString data,
  330. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  331. throws com.google.protobuf.InvalidProtocolBufferException {
  332. return newBuilder().mergeFrom(data, extensionRegistry)
  333. .buildParsed();
  334. }
  335. public static org.box2d.proto.Box2D.PbVec2 parseFrom(byte[] data)
  336. throws com.google.protobuf.InvalidProtocolBufferException {
  337. return newBuilder().mergeFrom(data).buildParsed();
  338. }
  339. public static org.box2d.proto.Box2D.PbVec2 parseFrom(
  340. byte[] data,
  341. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  342. throws com.google.protobuf.InvalidProtocolBufferException {
  343. return newBuilder().mergeFrom(data, extensionRegistry)
  344. .buildParsed();
  345. }
  346. public static org.box2d.proto.Box2D.PbVec2 parseFrom(java.io.InputStream input)
  347. throws java.io.IOException {
  348. return newBuilder().mergeFrom(input).buildParsed();
  349. }
  350. public static org.box2d.proto.Box2D.PbVec2 parseFrom(
  351. java.io.InputStream input,
  352. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  353. throws java.io.IOException {
  354. return newBuilder().mergeFrom(input, extensionRegistry)
  355. .buildParsed();
  356. }
  357. public static org.box2d.proto.Box2D.PbVec2 parseDelimitedFrom(java.io.InputStream input)
  358. throws java.io.IOException {
  359. Builder builder = newBuilder();
  360. if (builder.mergeDelimitedFrom(input)) {
  361. return builder.buildParsed();
  362. } else {
  363. return null;
  364. }
  365. }
  366. public static org.box2d.proto.Box2D.PbVec2 parseDelimitedFrom(
  367. java.io.InputStream input,
  368. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  369. throws java.io.IOException {
  370. Builder builder = newBuilder();
  371. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  372. return builder.buildParsed();
  373. } else {
  374. return null;
  375. }
  376. }
  377. public static org.box2d.proto.Box2D.PbVec2 parseFrom(
  378. com.google.protobuf.CodedInputStream input)
  379. throws java.io.IOException {
  380. return newBuilder().mergeFrom(input).buildParsed();
  381. }
  382. public static org.box2d.proto.Box2D.PbVec2 parseFrom(
  383. com.google.protobuf.CodedInputStream input,
  384. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  385. throws java.io.IOException {
  386. return newBuilder().mergeFrom(input, extensionRegistry)
  387. .buildParsed();
  388. }
  389. public static Builder newBuilder() { return Builder.create(); }
  390. public Builder newBuilderForType() { return newBuilder(); }
  391. public static Builder newBuilder(org.box2d.proto.Box2D.PbVec2 prototype) {
  392. return newBuilder().mergeFrom(prototype);
  393. }
  394. public Builder toBuilder() { return newBuilder(this); }
  395. @java.lang.Override
  396. protected Builder newBuilderForType(
  397. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  398. Builder builder = new Builder(parent);
  399. return builder;
  400. }
  401. public static final class Builder extends
  402. com.google.protobuf.GeneratedMessage.Builder<Builder>
  403. implements org.box2d.proto.Box2D.PbVec2OrBuilder {
  404. public static final com.google.protobuf.Descriptors.Descriptor
  405. getDescriptor() {
  406. return org.box2d.proto.Box2D.internal_static_box2d_PbVec2_descriptor;
  407. }
  408. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  409. internalGetFieldAccessorTable() {
  410. return org.box2d.proto.Box2D.internal_static_box2d_PbVec2_fieldAccessorTable;
  411. }
  412. // Construct using org.box2d.proto.Box2D.PbVec2.newBuilder()
  413. private Builder() {
  414. maybeForceBuilderInitialization();
  415. }
  416. private Builder(BuilderParent parent) {
  417. super(parent);
  418. maybeForceBuilderInitialization();
  419. }
  420. private void maybeForceBuilderInitialization() {
  421. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  422. }
  423. }
  424. private static Builder create() {
  425. return new Builder();
  426. }
  427. public Builder clear() {
  428. super.clear();
  429. x_ = 0F;
  430. bitField0_ = (bitField0_ & ~0x00000001);
  431. y_ = 0F;
  432. bitField0_ = (bitField0_ & ~0x00000002);
  433. return this;
  434. }
  435. public Builder clone() {
  436. return create().mergeFrom(buildPartial());
  437. }
  438. public com.google.protobuf.Descriptors.Descriptor
  439. getDescriptorForType() {
  440. return org.box2d.proto.Box2D.PbVec2.getDescriptor();
  441. }
  442. public org.box2d.proto.Box2D.PbVec2 getDefaultInstanceForType() {
  443. return org.box2d.proto.Box2D.PbVec2.getDefaultInstance();
  444. }
  445. public org.box2d.proto.Box2D.PbVec2 build() {
  446. org.box2d.proto.Box2D.PbVec2 result = buildPartial();
  447. if (!result.isInitialized()) {
  448. throw newUninitializedMessageException(result);
  449. }
  450. return result;
  451. }
  452. private org.box2d.proto.Box2D.PbVec2 buildParsed()
  453. throws com.google.protobuf.InvalidProtocolBufferException {
  454. org.box2d.proto.Box2D.PbVec2 result = buildPartial();
  455. if (!result.isInitialized()) {
  456. throw newUninitializedMessageException(
  457. result).asInvalidProtocolBufferException();
  458. }
  459. return result;
  460. }
  461. public org.box2d.proto.Box2D.PbVec2 buildPartial() {
  462. org.box2d.proto.Box2D.PbVec2 result = new org.box2d.proto.Box2D.PbVec2(this);
  463. int from_bitField0_ = bitField0_;
  464. int to_bitField0_ = 0;
  465. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  466. to_bitField0_ |= 0x00000001;
  467. }
  468. result.x_ = x_;
  469. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  470. to_bitField0_ |= 0x00000002;
  471. }
  472. result.y_ = y_;
  473. result.bitField0_ = to_bitField0_;
  474. onBuilt();
  475. return result;
  476. }
  477. public Builder mergeFrom(com.google.protobuf.Message other) {
  478. if (other instanceof org.box2d.proto.Box2D.PbVec2) {
  479. return mergeFrom((org.box2d.proto.Box2D.PbVec2)other);
  480. } else {
  481. super.mergeFrom(other);
  482. return this;
  483. }
  484. }
  485. public Builder mergeFrom(org.box2d.proto.Box2D.PbVec2 other) {
  486. if (other == org.box2d.proto.Box2D.PbVec2.getDefaultInstance()) return this;
  487. if (other.hasX()) {
  488. setX(other.getX());
  489. }
  490. if (other.hasY()) {
  491. setY(other.getY());
  492. }
  493. this.mergeUnknownFields(other.getUnknownFields());
  494. return this;
  495. }
  496. public final boolean isInitialized() {
  497. if (!hasX()) {
  498. return false;
  499. }
  500. if (!hasY()) {
  501. return false;
  502. }
  503. return true;
  504. }
  505. public Builder mergeFrom(
  506. com.google.protobuf.CodedInputStream input,
  507. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  508. throws java.io.IOException {
  509. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  510. com.google.protobuf.UnknownFieldSet.newBuilder(
  511. this.getUnknownFields());
  512. while (true) {
  513. int tag = input.readTag();
  514. switch (tag) {
  515. case 0:
  516. this.setUnknownFields(unknownFields.build());
  517. onChanged();
  518. return this;
  519. default: {
  520. if (!parseUnknownField(input, unknownFields,
  521. extensionRegistry, tag)) {
  522. this.setUnknownFields(unknownFields.build());
  523. onChanged();
  524. return this;
  525. }
  526. break;
  527. }
  528. case 13: {
  529. bitField0_ |= 0x00000001;
  530. x_ = input.readFloat();
  531. break;
  532. }
  533. case 21: {
  534. bitField0_ |= 0x00000002;
  535. y_ = input.readFloat();
  536. break;
  537. }
  538. }
  539. }
  540. }
  541. private int bitField0_;
  542. // required float x = 1;
  543. private float x_ ;
  544. public boolean hasX() {
  545. return ((bitField0_ & 0x00000001) == 0x00000001);
  546. }
  547. public float getX() {
  548. return x_;
  549. }
  550. public Builder setX(float value) {
  551. bitField0_ |= 0x00000001;
  552. x_ = value;
  553. onChanged();
  554. return this;
  555. }
  556. public Builder clearX() {
  557. bitField0_ = (bitField0_ & ~0x00000001);
  558. x_ = 0F;
  559. onChanged();
  560. return this;
  561. }
  562. // required float y = 2;
  563. private float y_ ;
  564. public boolean hasY() {
  565. return ((bitField0_ & 0x00000002) == 0x00000002);
  566. }
  567. public float getY() {
  568. return y_;
  569. }
  570. public Builder setY(float value) {
  571. bitField0_ |= 0x00000002;
  572. y_ = value;
  573. onChanged();
  574. return this;
  575. }
  576. public Builder clearY() {
  577. bitField0_ = (bitField0_ & ~0x00000002);
  578. y_ = 0F;
  579. onChanged();
  580. return this;
  581. }
  582. // @@protoc_insertion_point(builder_scope:box2d.PbVec2)
  583. }
  584. static {
  585. defaultInstance = new PbVec2(true);
  586. defaultInstance.initFields();
  587. }
  588. // @@protoc_insertion_point(class_scope:box2d.PbVec2)
  589. }
  590. public interface PbFilterOrBuilder
  591. extends com.google.protobuf.MessageOrBuilder {
  592. // optional int32 category_bits = 1;
  593. boolean hasCategoryBits();
  594. int getCategoryBits();
  595. // optional int32 mask_bits = 2;
  596. boolean hasMaskBits();
  597. int getMaskBits();
  598. // optional int32 group_index = 3;
  599. boolean hasGroupIndex();
  600. int getGroupIndex();
  601. }
  602. public static final class PbFilter extends
  603. com.google.protobuf.GeneratedMessage
  604. implements PbFilterOrBuilder {
  605. // Use PbFilter.newBuilder() to construct.
  606. private PbFilter(Builder builder) {
  607. super(builder);
  608. }
  609. private PbFilter(boolean noInit) {}
  610. private static final PbFilter defaultInstance;
  611. public static PbFilter getDefaultInstance() {
  612. return defaultInstance;
  613. }
  614. public PbFilter getDefaultInstanceForType() {
  615. return defaultInstance;
  616. }
  617. public static final com.google.protobuf.Descriptors.Descriptor
  618. getDescriptor() {
  619. return org.box2d.proto.Box2D.internal_static_box2d_PbFilter_descriptor;
  620. }
  621. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  622. internalGetFieldAccessorTable() {
  623. return org.box2d.proto.Box2D.internal_static_box2d_PbFilter_fieldAccessorTable;
  624. }
  625. private int bitField0_;
  626. // optional int32 category_bits = 1;
  627. public static final int CATEGORY_BITS_FIELD_NUMBER = 1;
  628. private int categoryBits_;
  629. public boolean hasCategoryBits() {
  630. return ((bitField0_ & 0x00000001) == 0x00000001);
  631. }
  632. public int getCategoryBits() {
  633. return categoryBits_;
  634. }
  635. // optional int32 mask_bits = 2;
  636. public static final int MASK_BITS_FIELD_NUMBER = 2;
  637. private int maskBits_;
  638. public boolean hasMaskBits() {
  639. return ((bitField0_ & 0x00000002) == 0x00000002);
  640. }
  641. public int getMaskBits() {
  642. return maskBits_;
  643. }
  644. // optional int32 group_index = 3;
  645. public static final int GROUP_INDEX_FIELD_NUMBER = 3;
  646. private int groupIndex_;
  647. public boolean hasGroupIndex() {
  648. return ((bitField0_ & 0x00000004) == 0x00000004);
  649. }
  650. public int getGroupIndex() {
  651. return groupIndex_;
  652. }
  653. private void initFields() {
  654. categoryBits_ = 0;
  655. maskBits_ = 0;
  656. groupIndex_ = 0;
  657. }
  658. private byte memoizedIsInitialized = -1;
  659. public final boolean isInitialized() {
  660. byte isInitialized = memoizedIsInitialized;
  661. if (isInitialized != -1) return isInitialized == 1;
  662. memoizedIsInitialized = 1;
  663. return true;
  664. }
  665. public void writeTo(com.google.protobuf.CodedOutputStream output)
  666. throws java.io.IOException {
  667. getSerializedSize();
  668. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  669. output.writeInt32(1, categoryBits_);
  670. }
  671. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  672. output.writeInt32(2, maskBits_);
  673. }
  674. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  675. output.writeInt32(3, groupIndex_);
  676. }
  677. getUnknownFields().writeTo(output);
  678. }
  679. private int memoizedSerializedSize = -1;
  680. public int getSerializedSize() {
  681. int size = memoizedSerializedSize;
  682. if (size != -1) return size;
  683. size = 0;
  684. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  685. size += com.google.protobuf.CodedOutputStream
  686. .computeInt32Size(1, categoryBits_);
  687. }
  688. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  689. size += com.google.protobuf.CodedOutputStream
  690. .computeInt32Size(2, maskBits_);
  691. }
  692. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  693. size += com.google.protobuf.CodedOutputStream
  694. .computeInt32Size(3, groupIndex_);
  695. }
  696. size += getUnknownFields().getSerializedSize();
  697. memoizedSerializedSize = size;
  698. return size;
  699. }
  700. private static final long serialVersionUID = 0L;
  701. @java.lang.Override
  702. protected java.lang.Object writeReplace()
  703. throws java.io.ObjectStreamException {
  704. return super.writeReplace();
  705. }
  706. public static org.box2d.proto.Box2D.PbFilter parseFrom(
  707. com.google.protobuf.ByteString data)
  708. throws com.google.protobuf.InvalidProtocolBufferException {
  709. return newBuilder().mergeFrom(data).buildParsed();
  710. }
  711. public static org.box2d.proto.Box2D.PbFilter parseFrom(
  712. com.google.protobuf.ByteString data,
  713. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  714. throws com.google.protobuf.InvalidProtocolBufferException {
  715. return newBuilder().mergeFrom(data, extensionRegistry)
  716. .buildParsed();
  717. }
  718. public static org.box2d.proto.Box2D.PbFilter parseFrom(byte[] data)
  719. throws com.google.protobuf.InvalidProtocolBufferException {
  720. return newBuilder().mergeFrom(data).buildParsed();
  721. }
  722. public static org.box2d.proto.Box2D.PbFilter parseFrom(
  723. byte[] data,
  724. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  725. throws com.google.protobuf.InvalidProtocolBufferException {
  726. return newBuilder().mergeFrom(data, extensionRegistry)
  727. .buildParsed();
  728. }
  729. public static org.box2d.proto.Box2D.PbFilter parseFrom(java.io.InputStream input)
  730. throws java.io.IOException {
  731. return newBuilder().mergeFrom(input).buildParsed();
  732. }
  733. public static org.box2d.proto.Box2D.PbFilter parseFrom(
  734. java.io.InputStream input,
  735. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  736. throws java.io.IOException {
  737. return newBuilder().mergeFrom(input, extensionRegistry)
  738. .buildParsed();
  739. }
  740. public static org.box2d.proto.Box2D.PbFilter parseDelimitedFrom(java.io.InputStream input)
  741. throws java.io.IOException {
  742. Builder builder = newBuilder();
  743. if (builder.mergeDelimitedFrom(input)) {
  744. return builder.buildParsed();
  745. } else {
  746. return null;
  747. }
  748. }
  749. public static org.box2d.proto.Box2D.PbFilter parseDelimitedFrom(
  750. java.io.InputStream input,
  751. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  752. throws java.io.IOException {
  753. Builder builder = newBuilder();
  754. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  755. return builder.buildParsed();
  756. } else {
  757. return null;
  758. }
  759. }
  760. public static org.box2d.proto.Box2D.PbFilter parseFrom(
  761. com.google.protobuf.CodedInputStream input)
  762. throws java.io.IOException {
  763. return newBuilder().mergeFrom(input).buildParsed();
  764. }
  765. public static org.box2d.proto.Box2D.PbFilter parseFrom(
  766. com.google.protobuf.CodedInputStream input,
  767. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  768. throws java.io.IOException {
  769. return newBuilder().mergeFrom(input, extensionRegistry)
  770. .buildParsed();
  771. }
  772. public static Builder newBuilder() { return Builder.create(); }
  773. public Builder newBuilderForType() { return newBuilder(); }
  774. public static Builder newBuilder(org.box2d.proto.Box2D.PbFilter prototype) {
  775. return newBuilder().mergeFrom(prototype);
  776. }
  777. public Builder toBuilder() { return newBuilder(this); }
  778. @java.lang.Override
  779. protected Builder newBuilderForType(
  780. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  781. Builder builder = new Builder(parent);
  782. return builder;
  783. }
  784. public static final class Builder extends
  785. com.google.protobuf.GeneratedMessage.Builder<Builder>
  786. implements org.box2d.proto.Box2D.PbFilterOrBuilder {
  787. public static final com.google.protobuf.Descriptors.Descriptor
  788. getDescriptor() {
  789. return org.box2d.proto.Box2D.internal_static_box2d_PbFilter_descriptor;
  790. }
  791. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  792. internalGetFieldAccessorTable() {
  793. return org.box2d.proto.Box2D.internal_static_box2d_PbFilter_fieldAccessorTable;
  794. }
  795. // Construct using org.box2d.proto.Box2D.PbFilter.newBuilder()
  796. private Builder() {
  797. maybeForceBuilderInitialization();
  798. }
  799. private Builder(BuilderParent parent) {
  800. super(parent);
  801. maybeForceBuilderInitialization();
  802. }
  803. private void maybeForceBuilderInitialization() {
  804. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  805. }
  806. }
  807. private static Builder create() {
  808. return new Builder();
  809. }
  810. public Builder clear() {
  811. super.clear();
  812. categoryBits_ = 0;
  813. bitField0_ = (bitField0_ & ~0x00000001);
  814. maskBits_ = 0;
  815. bitField0_ = (bitField0_ & ~0x00000002);
  816. groupIndex_ = 0;
  817. bitField0_ = (bitField0_ & ~0x00000004);
  818. return this;
  819. }
  820. public Builder clone() {
  821. return create().mergeFrom(buildPartial());
  822. }
  823. public com.google.protobuf.Descriptors.Descriptor
  824. getDescriptorForType() {
  825. return org.box2d.proto.Box2D.PbFilter.getDescriptor();
  826. }
  827. public org.box2d.proto.Box2D.PbFilter getDefaultInstanceForType() {
  828. return org.box2d.proto.Box2D.PbFilter.getDefaultInstance();
  829. }
  830. public org.box2d.proto.Box2D.PbFilter build() {
  831. org.box2d.proto.Box2D.PbFilter result = buildPartial();
  832. if (!result.isInitialized()) {
  833. throw newUninitializedMessageException(result);
  834. }
  835. return result;
  836. }
  837. private org.box2d.proto.Box2D.PbFilter buildParsed()
  838. throws com.google.protobuf.InvalidProtocolBufferException {
  839. org.box2d.proto.Box2D.PbFilter result = buildPartial();
  840. if (!result.isInitialized()) {
  841. throw newUninitializedMessageException(
  842. result).asInvalidProtocolBufferException();
  843. }
  844. return result;
  845. }
  846. public org.box2d.proto.Box2D.PbFilter buildPartial() {
  847. org.box2d.proto.Box2D.PbFilter result = new org.box2d.proto.Box2D.PbFilter(this);
  848. int from_bitField0_ = bitField0_;
  849. int to_bitField0_ = 0;
  850. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  851. to_bitField0_ |= 0x00000001;
  852. }
  853. result.categoryBits_ = categoryBits_;
  854. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  855. to_bitField0_ |= 0x00000002;
  856. }
  857. result.maskBits_ = maskBits_;
  858. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  859. to_bitField0_ |= 0x00000004;
  860. }
  861. result.groupIndex_ = groupIndex_;
  862. result.bitField0_ = to_bitField0_;
  863. onBuilt();
  864. return result;
  865. }
  866. public Builder mergeFrom(com.google.protobuf.Message other) {
  867. if (other instanceof org.box2d.proto.Box2D.PbFilter) {
  868. return mergeFrom((org.box2d.proto.Box2D.PbFilter)other);
  869. } else {
  870. super.mergeFrom(other);
  871. return this;
  872. }
  873. }
  874. public Builder mergeFrom(org.box2d.proto.Box2D.PbFilter other) {
  875. if (other == org.box2d.proto.Box2D.PbFilter.getDefaultInstance()) return this;
  876. if (other.hasCategoryBits()) {
  877. setCategoryBits(other.getCategoryBits());
  878. }
  879. if (other.hasMaskBits()) {
  880. setMaskBits(other.getMaskBits());
  881. }
  882. if (other.hasGroupIndex()) {
  883. setGroupIndex(other.getGroupIndex());
  884. }
  885. this.mergeUnknownFields(other.getUnknownFields());
  886. return this;
  887. }
  888. public final boolean isInitialized() {
  889. return true;
  890. }
  891. public Builder mergeFrom(
  892. com.google.protobuf.CodedInputStream input,
  893. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  894. throws java.io.IOException {
  895. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  896. com.google.protobuf.UnknownFieldSet.newBuilder(
  897. this.getUnknownFields());
  898. while (true) {
  899. int tag = input.readTag();
  900. switch (tag) {
  901. case 0:
  902. this.setUnknownFields(unknownFields.build());
  903. onChanged();
  904. return this;
  905. default: {
  906. if (!parseUnknownField(input, unknownFields,
  907. extensionRegistry, tag)) {
  908. this.setUnknownFields(unknownFields.build());
  909. onChanged();
  910. return this;
  911. }
  912. break;
  913. }
  914. case 8: {
  915. bitField0_ |= 0x00000001;
  916. categoryBits_ = input.readInt32();
  917. break;
  918. }
  919. case 16: {
  920. bitField0_ |= 0x00000002;
  921. maskBits_ = input.readInt32();
  922. break;
  923. }
  924. case 24: {
  925. bitField0_ |= 0x00000004;
  926. groupIndex_ = input.readInt32();
  927. break;
  928. }
  929. }
  930. }
  931. }
  932. private int bitField0_;
  933. // optional int32 category_bits = 1;
  934. private int categoryBits_ ;
  935. public boolean hasCategoryBits() {
  936. return ((bitField0_ & 0x00000001) == 0x00000001);
  937. }
  938. public int getCategoryBits() {
  939. return categoryBits_;
  940. }
  941. public Builder setCategoryBits(int value) {
  942. bitField0_ |= 0x00000001;
  943. categoryBits_ = value;
  944. onChanged();
  945. return this;
  946. }
  947. public Builder clearCategoryBits() {
  948. bitField0_ = (bitField0_ & ~0x00000001);
  949. categoryBits_ = 0;
  950. onChanged();
  951. return this;
  952. }
  953. // optional int32 mask_bits = 2;
  954. private int maskBits_ ;
  955. public boolean hasMaskBits() {
  956. return ((bitField0_ & 0x00000002) == 0x00000002);
  957. }
  958. public int getMaskBits() {
  959. return maskBits_;
  960. }
  961. public Builder setMaskBits(int value) {
  962. bitField0_ |= 0x00000002;
  963. maskBits_ = value;
  964. onChanged();
  965. return this;
  966. }
  967. public Builder clearMaskBits() {
  968. bitField0_ = (bitField0_ & ~0x00000002);
  969. maskBits_ = 0;
  970. onChanged();
  971. return this;
  972. }
  973. // optional int32 group_index = 3;
  974. private int groupIndex_ ;
  975. public boolean hasGroupIndex() {
  976. return ((bitField0_ & 0x00000004) == 0x00000004);
  977. }
  978. public int getGroupIndex() {
  979. return groupIndex_;
  980. }
  981. public Builder setGroupIndex(int value) {
  982. bitField0_ |= 0x00000004;
  983. groupIndex_ = value;
  984. onChanged();
  985. return this;
  986. }
  987. public Builder clearGroupIndex() {
  988. bitField0_ = (bitField0_ & ~0x00000004);
  989. groupIndex_ = 0;
  990. onChanged();
  991. return this;
  992. }
  993. // @@protoc_insertion_point(builder_scope:box2d.PbFilter)
  994. }
  995. static {
  996. defaultInstance = new PbFilter(true);
  997. defaultInstance.initFields();
  998. }
  999. // @@protoc_insertion_point(class_scope:box2d.PbFilter)
  1000. }
  1001. public interface PbShapeOrBuilder
  1002. extends com.google.protobuf.MessageOrBuilder {
  1003. // optional int64 tag = 1;
  1004. boolean hasTag();
  1005. long getTag();
  1006. // required .box2d.PbShapeType type = 2;
  1007. boolean hasType();
  1008. org.box2d.proto.Box2D.PbShapeType getType();
  1009. // optional .box2d.PbVec2 center = 10;
  1010. boolean hasCenter();
  1011. org.box2d.proto.Box2D.PbVec2 getCenter();
  1012. org.box2d.proto.Box2D.PbVec2OrBuilder getCenterOrBuilder();
  1013. // optional float radius = 11;
  1014. boolean hasRadius();
  1015. float getRadius();
  1016. // repeated .box2d.PbVec2 points = 20;
  1017. java.util.List<org.box2d.proto.Box2D.PbVec2>
  1018. getPointsList();
  1019. org.box2d.proto.Box2D.PbVec2 getPoints(int index);
  1020. int getPointsCount();
  1021. java.util.List<? extends org.box2d.proto.Box2D.PbVec2OrBuilder>
  1022. getPointsOrBuilderList();
  1023. org.box2d.proto.Box2D.PbVec2OrBuilder getPointsOrBuilder(
  1024. int index);
  1025. // repeated .box2d.PbVec2 normals = 21;
  1026. java.util.List<org.box2d.proto.Box2D.PbVec2>
  1027. getNormalsList();
  1028. org.box2d.proto.Box2D.PbVec2 getNormals(int index);
  1029. int getNormalsCount();
  1030. java.util.List<? extends org.box2d.proto.Box2D.PbVec2OrBuilder>
  1031. getNormalsOrBuilderList();
  1032. org.box2d.proto.Box2D.PbVec2OrBuilder getNormalsOrBuilder(
  1033. int index);
  1034. // optional .box2d.PbVec2 centroid = 22;
  1035. boolean hasCentroid();
  1036. org.box2d.proto.Box2D.PbVec2 getCentroid();
  1037. org.box2d.proto.Box2D.PbVec2OrBuilder getCentroidOrBuilder();
  1038. }
  1039. public static final class PbShape extends
  1040. com.google.protobuf.GeneratedMessage
  1041. implements PbShapeOrBuilder {
  1042. // Use PbShape.newBuilder() to construct.
  1043. private PbShape(Builder builder) {
  1044. super(builder);
  1045. }
  1046. private PbShape(boolean noInit) {}
  1047. private static final PbShape defaultInstance;
  1048. public static PbShape getDefaultInstance() {
  1049. return defaultInstance;
  1050. }
  1051. public PbShape getDefaultInstanceForType() {
  1052. return defaultInstance;
  1053. }
  1054. public static final com.google.protobuf.Descriptors.Descriptor
  1055. getDescriptor() {
  1056. return org.box2d.proto.Box2D.internal_static_box2d_PbShape_descriptor;
  1057. }
  1058. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1059. internalGetFieldAccessorTable() {
  1060. return org.box2d.proto.Box2D.internal_static_box2d_PbShape_fieldAccessorTable;
  1061. }
  1062. private int bitField0_;
  1063. // optional int64 tag = 1;
  1064. public static final int TAG_FIELD_NUMBER = 1;
  1065. private long tag_;
  1066. public boolean hasTag() {
  1067. return ((bitField0_ & 0x00000001) == 0x00000001);
  1068. }
  1069. public long getTag() {
  1070. return tag_;
  1071. }
  1072. // required .box2d.PbShapeType type = 2;
  1073. public static final int TYPE_FIELD_NUMBER = 2;
  1074. private org.box2d.proto.Box2D.PbShapeType type_;
  1075. public boolean hasType() {
  1076. return ((bitField0_ & 0x00000002) == 0x00000002);
  1077. }
  1078. public org.box2d.proto.Box2D.PbShapeType getType() {
  1079. return type_;
  1080. }
  1081. // optional .box2d.PbVec2 center = 10;
  1082. public static final int CENTER_FIELD_NUMBER = 10;
  1083. private org.box2d.proto.Box2D.PbVec2 center_;
  1084. public boolean hasCenter() {
  1085. return ((bitField0_ & 0x00000004) == 0x00000004);
  1086. }
  1087. public org.box2d.proto.Box2D.PbVec2 getCenter() {
  1088. return center_;
  1089. }
  1090. public org.box2d.proto.Box2D.PbVec2OrBuilder getCenterOrBuilder() {
  1091. return center_;
  1092. }
  1093. // optional float radius = 11;
  1094. public static final int RADIUS_FIELD_NUMBER = 11;
  1095. private float radius_;
  1096. public boolean hasRadius() {
  1097. return ((bitField0_ & 0x00000008) == 0x00000008);
  1098. }
  1099. public float getRadius() {
  1100. return radius_;
  1101. }
  1102. // repeated .box2d.PbVec2 points = 20;
  1103. public static final int POINTS_FIELD_NUMBER = 20;
  1104. private java.util.List<org.box2d.proto.Box2D.PbVec2> points_;
  1105. public java.util.List<org.box2d.proto.Box2D.PbVec2> getPointsList() {
  1106. return points_;
  1107. }
  1108. public java.util.List<? extends org.box2d.proto.Box2D.PbVec2OrBuilder>
  1109. getPointsOrBuilderList() {
  1110. return points_;
  1111. }
  1112. public int getPointsCount() {
  1113. return points_.size();
  1114. }
  1115. public org.box2d.proto.Box2D.PbVec2 getPoints(int index) {
  1116. return points_.get(index);
  1117. }
  1118. public org.box2d.proto.Box2D.PbVec2OrBuilder getPointsOrBuilder(
  1119. int index) {
  1120. return points_.get(index);
  1121. }
  1122. // repeated .box2d.PbVec2 normals = 21;
  1123. public static final int NORMALS_FIELD_NUMBER = 21;
  1124. private java.util.List<org.box2d.proto.Box2D.PbVec2> normals_;
  1125. public java.util.List<org.box2d.proto.Box2D.PbVec2> getNormalsList() {
  1126. return normals_;
  1127. }
  1128. public java.util.List<? extends org.box2d.proto.Box2D.PbVec2OrBuilder>
  1129. getNormalsOrBuilderList() {
  1130. return normals_;
  1131. }
  1132. public int getNormalsCount() {
  1133. return normals_.size();
  1134. }
  1135. public org.box2d.proto.Box2D.PbVec2 getNormals(int index) {
  1136. return normals_.get(index);
  1137. }
  1138. public org.box2d.proto.Box2D.PbVec2OrBuilder getNormalsOrBuilder(
  1139. int index) {
  1140. return normals_.get(index);
  1141. }
  1142. // optional .box2d.PbVec2 centroid = 22;
  1143. public static final int CENTROID_FIELD_NUMBER = 22;
  1144. private org.box2d.proto.Box2D.PbVec2 centroid_;
  1145. public boolean hasCentroid() {
  1146. return ((bitField0_ & 0x00000010) == 0x00000010);
  1147. }
  1148. public org.box2d.proto.Box2D.PbVec2 getCentroid() {
  1149. return centroid_;
  1150. }
  1151. public org.box2d.proto.Box2D.PbVec2OrBuilder getCentroidOrBuilder() {
  1152. return centroid_;
  1153. }
  1154. private void initFields() {
  1155. tag_ = 0L;
  1156. type_ = org.box2d.proto.Box2D.PbShapeType.CIRCLE;
  1157. center_ = org.box2d.proto.Box2D.PbVec2.getDefaultInstance();
  1158. radius_ = 0F;
  1159. points_ = java.util.Collections.emptyList();
  1160. normals_ = java.util.Collections.emptyList();
  1161. centroid_ = org.box2d.proto.Box2D.PbVec2.getDefaultInstance();
  1162. }
  1163. private byte memoizedIsInitialized = -1;
  1164. public final boolean isInitialized() {
  1165. byte isInitialized = memoizedIsInitialized;
  1166. if (isInitialized != -1) return isInitialized == 1;
  1167. if (!hasType()) {
  1168. memoizedIsInitialized = 0;
  1169. return false;
  1170. }
  1171. if (hasCenter()) {
  1172. if (!getCenter().isInitialized()) {
  1173. memoizedIsInitialized = 0;
  1174. return false;
  1175. }
  1176. }
  1177. for (int i = 0; i < getPointsCount(); i++) {
  1178. if (!getPoints(i).isInitialized()) {
  1179. memoizedIsInitialized = 0;
  1180. return false;
  1181. }
  1182. }
  1183. for (int i = 0; i < getNormalsCount(); i++) {
  1184. if (!getNormals(i).isInitialized()) {
  1185. memoizedIsInitialized = 0;
  1186. return false;
  1187. }
  1188. }
  1189. if (hasCentroid()) {
  1190. if (!getCentroid().isInitialized()) {
  1191. memoizedIsInitialized = 0;
  1192. return false;
  1193. }
  1194. }
  1195. memoizedIsInitialized = 1;
  1196. return true;
  1197. }
  1198. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1199. throws java.io.IOException {
  1200. getSerializedSize();
  1201. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  1202. output.writeInt64(1, tag_);
  1203. }
  1204. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  1205. output.writeEnum(2, type_.getNumber());
  1206. }
  1207. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  1208. output.writeMessage(10, center_);
  1209. }
  1210. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  1211. output.writeFloat(11, radius_);
  1212. }
  1213. for (int i = 0; i < points_.size(); i++) {
  1214. output.writeMessage(20, points_.get(i));
  1215. }
  1216. for (int i = 0; i < normals_.size(); i++) {
  1217. output.writeMessage(21, normals_.get(i));
  1218. }
  1219. if (((bitField0_ & 0x00000010) == 0x00000010)) {
  1220. output.writeMessage(22, centroid_);
  1221. }
  1222. getUnknownFields().writeTo(output);
  1223. }
  1224. private int memoizedSerializedSize = -1;
  1225. public int getSerializedSize() {
  1226. int size = memoizedSerializedSize;
  1227. if (size != -1) return size;
  1228. size = 0;
  1229. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  1230. size += com.google.protobuf.CodedOutputStream
  1231. .computeInt64Size(1, tag_);
  1232. }
  1233. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  1234. size += com.google.protobuf.CodedOutputStream
  1235. .computeEnumSize(2, type_.getNumber());
  1236. }
  1237. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  1238. size += com.google.protobuf.CodedOutputStream
  1239. .computeMessageSize(10, center_);
  1240. }
  1241. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  1242. size += com.google.protobuf.CodedOutputStream
  1243. .computeFloatSize(11, radius_);
  1244. }
  1245. for (int i = 0; i < points_.size(); i++) {
  1246. size += com.google.protobuf.CodedOutputStream
  1247. .computeMessageSize(20, points_.get(i));
  1248. }
  1249. for (int i = 0; i < normals_.size(); i++) {
  1250. size += com.google.protobuf.CodedOutputStream
  1251. .computeMessageSize(21, normals_.get(i));
  1252. }
  1253. if (((bitField0_ & 0x00000010) == 0x00000010)) {
  1254. size += com.google.protobuf.CodedOutputStream
  1255. .computeMessageSize(22, centroid_);
  1256. }
  1257. size += getUnknownFields().getSerializedSize();
  1258. memoizedSerializedSize = size;
  1259. return size;
  1260. }
  1261. private static final long serialVersionUID = 0L;
  1262. @java.lang.Override
  1263. protected java.lang.Object writeReplace()
  1264. throws java.io.ObjectStreamException {
  1265. return super.writeReplace();
  1266. }
  1267. public static org.box2d.proto.Box2D.PbShape parseFrom(
  1268. com.google.protobuf.ByteString data)
  1269. throws com.google.protobuf.InvalidProtocolBufferException {
  1270. return newBuilder().mergeFrom(data).buildParsed();
  1271. }
  1272. public static org.box2d.proto.Box2D.PbShape parseFrom(
  1273. com.google.protobuf.ByteString data,
  1274. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1275. throws com.google.protobuf.InvalidProtocolBufferException {
  1276. return newBuilder().mergeFrom(data, extensionRegistry)
  1277. .buildParsed();
  1278. }
  1279. public static org.box2d.proto.Box2D.PbShape parseFrom(byte[] data)
  1280. throws com.google.protobuf.InvalidProtocolBufferException {
  1281. return newBuilder().mergeFrom(data).buildParsed();
  1282. }
  1283. public static org.box2d.proto.Box2D.PbShape parseFrom(
  1284. byte[] data,
  1285. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1286. throws com.google.protobuf.InvalidProtocolBufferException {
  1287. return newBuilder().mergeFrom(data, extensionRegistry)
  1288. .buildParsed();
  1289. }
  1290. public static org.box2d.proto.Box2D.PbShape parseFrom(java.io.InputStream input)
  1291. throws java.io.IOException {
  1292. return newBuilder().mergeFrom(input).buildParsed();
  1293. }
  1294. public static org.box2d.proto.Box2D.PbShape parseFrom(
  1295. java.io.InputStream input,
  1296. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1297. throws java.io.IOException {
  1298. return newBuilder().mergeFrom(input, extensionRegistry)
  1299. .buildParsed();
  1300. }
  1301. public static org.box2d.proto.Box2D.PbShape parseDelimitedFrom(java.io.InputStream input)
  1302. throws java.io.IOException {
  1303. Builder builder = newBuilder();
  1304. if (builder.mergeDelimitedFrom(input)) {
  1305. return builder.buildParsed();
  1306. } else {
  1307. return null;
  1308. }
  1309. }
  1310. public static org.box2d.proto.Box2D.PbShape parseDelimitedFrom(
  1311. java.io.InputStream input,
  1312. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1313. throws java.io.IOException {
  1314. Builder builder = newBuilder();
  1315. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1316. return builder.buildParsed();
  1317. } else {
  1318. return null;
  1319. }
  1320. }
  1321. public static org.box2d.proto.Box2D.PbShape parseFrom(
  1322. com.google.protobuf.CodedInputStream input)
  1323. throws java.io.IOException {
  1324. return newBuilder().mergeFrom(input).buildParsed();
  1325. }
  1326. public static org.box2d.proto.Box2D.PbShape parseFrom(
  1327. com.google.protobuf.CodedInputStream input,
  1328. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1329. throws java.io.IOException {
  1330. return newBuilder().mergeFrom(input, extensionRegistry)
  1331. .buildParsed();
  1332. }
  1333. public static Builder newBuilder() { return Builder.create(); }
  1334. public Builder newBuilderForType() { return newBuilder(); }
  1335. public static Builder newBuilder(org.box2d.proto.Box2D.PbShape prototype) {
  1336. return newBuilder().mergeFrom(prototype);
  1337. }
  1338. public Builder toBuilder() { return newBuilder(this); }
  1339. @java.lang.Override
  1340. protected Builder newBuilderForType(
  1341. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  1342. Builder builder = new Builder(parent);
  1343. return builder;
  1344. }
  1345. public static final class Builder extends
  1346. com.google.protobuf.GeneratedMessage.Builder<Builder>
  1347. implements org.box2d.proto.Box2D.PbShapeOrBuilder {
  1348. public static final com.google.protobuf.Descriptors.Descriptor
  1349. getDescriptor() {
  1350. return org.box2d.proto.Box2D.internal_static_box2d_PbShape_descriptor;
  1351. }
  1352. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1353. internalGetFieldAccessorTable() {
  1354. return org.box2d.proto.Box2D.internal_static_box2d_PbShape_fieldAccessorTable;
  1355. }
  1356. // Construct using org.box2d.proto.Box2D.PbShape.newBuilder()
  1357. private Builder() {
  1358. maybeForceBuilderInitialization();
  1359. }
  1360. private Builder(BuilderParent parent) {
  1361. super(parent);
  1362. maybeForceBuilderInitialization();
  1363. }
  1364. private void maybeForceBuilderInitialization() {
  1365. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  1366. getCenterFieldBuilder();
  1367. getPointsFieldBuilder();
  1368. getNormalsFieldBuilder();
  1369. getCentroidFieldBuilder();
  1370. }
  1371. }
  1372. priva

Large files files are truncated, but you can click here to view the full file