Skip to content

Commit c1eb100

Browse files
committed
Refactor creation APIs to use in parameters instead of ref
- Changed `ref` to `in` for definition structs in `b2CreateBody`, `b2CreateJoint`, `b2CreateShape`, and related creation functions (e.g., `B2BodyDef`, `B2ShapeDef`, `B2JointDef`). - Updated `B2_CHECK_DEF` validation methods to accept `in` parameters. - Updated all call sites in Samples, Benchmarks, and Tests to remove the `ref` keyword. - This change improves API usability by allowing read-only references and temporary values to be passed without requiring explicit local variables.
1 parent 0cec20b commit c1eb100

16 files changed

Lines changed: 160 additions & 160 deletions

File tree

src/Box2D.NET.Samples/Samples/Car.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void Spawn(B2WorldId worldId, B2Vec2 position, float scale, float hertz,
5555
B2BodyDef bodyDef = b2DefaultBodyDef();
5656
bodyDef.type = B2BodyType.b2_dynamicBody;
5757
bodyDef.position = b2Add(new B2Vec2(0.0f, 1.0f * scale), position);
58-
m_chassisId = b2CreateBody(worldId, ref bodyDef);
58+
m_chassisId = b2CreateBody(worldId, bodyDef);
5959
b2CreatePolygonShape(m_chassisId, ref shapeDef, ref chassis);
6060

6161
shapeDef.density = 2.0f / scale;
@@ -64,12 +64,12 @@ public void Spawn(B2WorldId worldId, B2Vec2 position, float scale, float hertz,
6464

6565
bodyDef.position = b2Add(new B2Vec2(-1.0f * scale, 0.35f * scale), position);
6666
bodyDef.allowFastRotation = true;
67-
m_rearWheelId = b2CreateBody(worldId, ref bodyDef);
67+
m_rearWheelId = b2CreateBody(worldId, bodyDef);
6868
b2CreateCircleShape(m_rearWheelId, ref shapeDef, ref circle);
6969

7070
bodyDef.position = b2Add(new B2Vec2(1.0f * scale, 0.4f * scale), position);
7171
bodyDef.allowFastRotation = true;
72-
m_frontWheelId = b2CreateBody(worldId, ref bodyDef);
72+
m_frontWheelId = b2CreateBody(worldId, bodyDef);
7373
b2CreateCircleShape(m_frontWheelId, ref shapeDef, ref circle);
7474

7575
B2Vec2 axis = new B2Vec2(0.0f, 1.0f);

src/Box2D.NET.Samples/Samples/Donut.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void Create(B2WorldId worldId, B2Vec2 position, float scale, int groupInd
6161
bodyDef.position = new B2Vec2(radius * MathF.Cos(angle) + center.X, radius * MathF.Sin(angle) + center.Y);
6262
bodyDef.rotation = b2MakeRot(angle);
6363

64-
m_bodyIds[i] = b2CreateBody(worldId, ref bodyDef);
64+
m_bodyIds[i] = b2CreateBody(worldId, bodyDef);
6565
b2CreateCapsuleShape(m_bodyIds[i], ref shapeDef, ref capsule);
6666

6767
angle += deltaAngle;

src/Box2D.NET.Samples/Samples/Doohickey.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ public void Spawn(B2WorldId worldId, B2Vec2 position, float scale)
4242
B2Capsule capsule = new B2Capsule(new B2Vec2(-3.5f * scale, 0.0f), new B2Vec2(3.5f * scale, 0.0f), 0.15f * scale);
4343

4444
bodyDef.position = b2MulAdd(position, scale, new B2Vec2(-5.0f, 3.0f));
45-
m_wheelId1 = b2CreateBody(worldId, ref bodyDef);
45+
m_wheelId1 = b2CreateBody(worldId, bodyDef);
4646
b2CreateCircleShape(m_wheelId1, ref shapeDef, ref circle);
4747

4848
bodyDef.position = b2MulAdd(position, scale, new B2Vec2(5.0f, 3.0f));
49-
m_wheelId2 = b2CreateBody(worldId, ref bodyDef);
49+
m_wheelId2 = b2CreateBody(worldId, bodyDef);
5050
b2CreateCircleShape(m_wheelId2, ref shapeDef, ref circle);
5151

5252
bodyDef.position = b2MulAdd(position, scale, new B2Vec2(-1.5f, 3.0f));
53-
m_barId1 = b2CreateBody(worldId, ref bodyDef);
53+
m_barId1 = b2CreateBody(worldId, bodyDef);
5454
b2CreateCapsuleShape(m_barId1, ref shapeDef, ref capsule);
5555

5656
bodyDef.position = b2MulAdd(position, scale, new B2Vec2(1.5f, 3.0f));
57-
m_barId2 = b2CreateBody(worldId, ref bodyDef);
57+
m_barId2 = b2CreateBody(worldId, bodyDef);
5858
b2CreateCapsuleShape(m_barId2, ref shapeDef, ref capsule);
5959

6060
B2RevoluteJointDef revoluteDef = b2DefaultRevoluteJointDef();
@@ -65,15 +65,15 @@ public void Spawn(B2WorldId worldId, B2Vec2 position, float scale)
6565
revoluteDef.@base.localFrameB.p = new B2Vec2(-3.5f * scale, 0.0f);
6666
revoluteDef.enableMotor = true;
6767
revoluteDef.maxMotorTorque = 2.0f * scale;
68-
b2CreateRevoluteJoint(worldId, ref revoluteDef);
68+
b2CreateRevoluteJoint(worldId, revoluteDef);
6969

7070
revoluteDef.@base.bodyIdA = m_wheelId2;
7171
revoluteDef.@base.bodyIdB = m_barId2;
7272
revoluteDef.@base.localFrameA.p = new B2Vec2(0.0f, 0.0f);
7373
revoluteDef.@base.localFrameB.p = new B2Vec2(3.5f * scale, 0.0f);
7474
revoluteDef.enableMotor = true;
7575
revoluteDef.maxMotorTorque = 2.0f * scale;
76-
b2CreateRevoluteJoint(worldId, ref revoluteDef);
76+
b2CreateRevoluteJoint(worldId, revoluteDef);
7777

7878
B2PrismaticJointDef prismaticDef = b2DefaultPrismaticJointDef();
7979
prismaticDef.@base.bodyIdA = m_barId1;

src/Box2D.NET.Samples/Samples/Truck.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void Spawn(B2WorldId worldId, B2Vec2 position, float scale, float hertz,
6666
B2BodyDef bodyDef = b2DefaultBodyDef();
6767
bodyDef.type = B2BodyType.b2_dynamicBody;
6868
bodyDef.position = b2Add(new B2Vec2(0.0f, 1.0f * scale), position);
69-
m_chassisId = b2CreateBody(worldId, ref bodyDef);
69+
m_chassisId = b2CreateBody(worldId, bodyDef);
7070
b2CreatePolygonShape(m_chassisId, ref shapeDef, ref chassis);
7171

7272
B2Polygon box = b2MakeOffsetBox(1.25f * scale, 0.1f * scale, new B2Vec2(-2.05f * scale, -0.275f * scale), b2Rot_identity);
@@ -83,11 +83,11 @@ public void Spawn(B2WorldId worldId, B2Vec2 position, float scale, float hertz,
8383

8484
B2Circle circle = new B2Circle(new B2Vec2(0.0f, 0.0f), 0.4f * scale);
8585
bodyDef.position = b2Add(new B2Vec2(-2.75f * scale, 0.3f * scale), position);
86-
m_rearWheelId = b2CreateBody(worldId, ref bodyDef);
86+
m_rearWheelId = b2CreateBody(worldId, bodyDef);
8787
b2CreateCircleShape(m_rearWheelId, ref shapeDef, ref circle);
8888

8989
bodyDef.position = b2Add(new B2Vec2(0.8f * scale, 0.3f * scale), position);
90-
m_frontWheelId = b2CreateBody(worldId, ref bodyDef);
90+
m_frontWheelId = b2CreateBody(worldId, bodyDef);
9191
b2CreateCircleShape(m_frontWheelId, ref shapeDef, ref circle);
9292

9393
B2Vec2 axis = new B2Vec2(0.0f, 1.0f);

src/Box2D.NET.Samples/Samples/Worlds/WorkbenchWorld.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static B2ShapeId CreateCircle(B2WorldId worldId, B2Vec2 position, float r
3535
bodyDef.type = B2BodyType.b2_dynamicBody;
3636
bodyDef.position = position;
3737
bodyDef.gravityScale = 0.0f;
38-
var bodyIdA = b2CreateBody(worldId, ref bodyDef);
38+
var bodyIdA = b2CreateBody(worldId, bodyDef);
3939

4040
B2ShapeDef shapeDef = b2DefaultShapeDef();
4141
shapeDef.density = 1.0f;

src/Box2D.NET.Shared/Benchmarks.cs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ public static void CreateJointGrid(B2WorldId worldId)
6868

6969
bodyDef.position = new B2Vec2(fk, -fi);
7070

71-
B2BodyId body = b2CreateBody(worldId, ref bodyDef);
71+
B2BodyId body = b2CreateBody(worldId, bodyDef);
7272

73-
b2CreateCircleShape(body, ref shapeDef, ref circle);
73+
b2CreateCircleShape(body, shapeDef, circle);
7474

7575
if (i > 0)
7676
{
7777
jointDef.@base.bodyIdA = bodies[index - 1];
7878
jointDef.@base.bodyIdB = body;
7979
jointDef.@base.localFrameA.p = new B2Vec2(0.0f, -0.5f);
8080
jointDef.@base.localFrameB.p = new B2Vec2(0.0f, 0.5f);
81-
b2CreateRevoluteJoint(worldId, ref jointDef);
81+
b2CreateRevoluteJoint(worldId, jointDef);
8282
}
8383

8484
if (k > 0)
@@ -87,7 +87,7 @@ public static void CreateJointGrid(B2WorldId worldId)
8787
jointDef.@base.bodyIdB = body;
8888
jointDef.@base.localFrameA.p = new B2Vec2(0.5f, 0.0f);
8989
jointDef.@base.localFrameB.p = new B2Vec2(-0.5f, 0.0f);
90-
b2CreateRevoluteJoint(worldId, ref jointDef);
90+
b2CreateRevoluteJoint(worldId, jointDef);
9191
}
9292

9393
bodies[index++] = body;
@@ -104,11 +104,11 @@ public static void CreateLargePyramid(B2WorldId worldId)
104104
{
105105
B2BodyDef bodyDef = b2DefaultBodyDef();
106106
bodyDef.position = new B2Vec2(0.0f, -1.0f);
107-
B2BodyId groundId = b2CreateBody(worldId, ref bodyDef);
107+
B2BodyId groundId = b2CreateBody(worldId, bodyDef);
108108

109109
B2Polygon box = b2MakeBox(100.0f, 1.0f);
110110
B2ShapeDef shapeDef = b2DefaultShapeDef();
111-
b2CreatePolygonShape(groundId, ref shapeDef, ref box);
111+
b2CreatePolygonShape(groundId, shapeDef, box);
112112
}
113113

114114
{
@@ -133,8 +133,8 @@ public static void CreateLargePyramid(B2WorldId worldId)
133133
float x = (i + 1.0f) * shift + 2.0f * (j - i) * shift - a * baseCount;
134134

135135
bodyDef.position = new B2Vec2(x, y);
136-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
137-
b2CreatePolygonShape(bodyId, ref shapeDef, ref box);
136+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
137+
b2CreatePolygonShape(bodyId, shapeDef, box);
138138
}
139139
}
140140
}
@@ -158,8 +158,8 @@ public static void CreateSmallPyramid(B2WorldId worldId, int baseCount, float ex
158158
float x = (i + 1.0f) * extent + 2.0f * (j - i) * extent + centerX - 0.5f;
159159
bodyDef.position = new B2Vec2(x, y);
160160

161-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
162-
b2CreatePolygonShape(bodyId, ref shapeDef, ref box);
161+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
162+
b2CreatePolygonShape(bodyId, shapeDef, box);
163163
}
164164
}
165165
}
@@ -174,7 +174,7 @@ public static void CreateManyPyramids(B2WorldId worldId)
174174
int columnCount = BENCHMARK_DEBUG ? 5 : 20;
175175

176176
B2BodyDef bodyDef = b2DefaultBodyDef();
177-
B2BodyId groundId = b2CreateBody(worldId, ref bodyDef);
177+
B2BodyId groundId = b2CreateBody(worldId, bodyDef);
178178

179179
float groundDeltaY = 2.0f * extent * (baseCount + 1.0f);
180180
float groundWidth = 2.0f * extent * columnCount * (baseCount + 1.0f);
@@ -218,7 +218,7 @@ public static RainData CreateRain(B2WorldId worldId)
218218

219219
{
220220
B2BodyDef bodyDef = b2DefaultBodyDef();
221-
B2BodyId groundId = b2CreateBody(worldId, ref bodyDef);
221+
B2BodyId groundId = b2CreateBody(worldId, bodyDef);
222222

223223
B2ShapeDef shapeDef = b2DefaultShapeDef();
224224
float y = 0.0f;
@@ -231,7 +231,7 @@ public static RainData CreateRain(B2WorldId worldId)
231231
for (int j = 0; j <= rainData.gridCount; ++j)
232232
{
233233
B2Polygon box = b2MakeOffsetBox(0.5f * width, 0.5f * height, new B2Vec2(x, y), b2Rot_identity);
234-
b2CreatePolygonShape(groundId, ref shapeDef, ref box);
234+
b2CreatePolygonShape(groundId, shapeDef, box);
235235

236236
//b2Segment segment = { { x - 0.5f * width, y }, { x + 0.5f * width, y } };
237237
//b2CreateSegmentShape( groundId, &shapeDef, &segment );
@@ -325,7 +325,7 @@ public static SpinnerData CreateSpinner(B2WorldId worldId)
325325

326326
{
327327
B2BodyDef bodyDef = b2DefaultBodyDef();
328-
groundId = b2CreateBody(worldId, ref bodyDef);
328+
groundId = b2CreateBody(worldId, bodyDef);
329329

330330
B2Vec2[] points = new B2Vec2[SPINNER_POINT_COUNT];
331331

@@ -356,12 +356,12 @@ public static SpinnerData CreateSpinner(B2WorldId worldId)
356356
bodyDef.position = new B2Vec2(0.0f, 12.0f);
357357
bodyDef.enableSleep = false;
358358

359-
B2BodyId spinnerId = b2CreateBody(worldId, ref bodyDef);
359+
B2BodyId spinnerId = b2CreateBody(worldId, bodyDef);
360360

361361
B2Polygon box = b2MakeRoundedBox(0.4f, 20.0f, 0.2f);
362362
B2ShapeDef shapeDef = b2DefaultShapeDef();
363363
shapeDef.material.friction = 0.0f;
364-
b2CreatePolygonShape(spinnerId, ref shapeDef, ref box);
364+
b2CreatePolygonShape(spinnerId, shapeDef, box);
365365

366366
float motorSpeed = 5.0f;
367367
//float maxMotorTorque = 100.0f * 40000.0f;
@@ -374,7 +374,7 @@ public static SpinnerData CreateSpinner(B2WorldId worldId)
374374
jointDef.motorSpeed = motorSpeed;
375375
jointDef.maxMotorTorque = maxMotorTorque;
376376

377-
spinnerData.spinnerId = b2CreateRevoluteJoint(worldId, ref jointDef);
377+
spinnerData.spinnerId = b2CreateRevoluteJoint(worldId, jointDef);
378378
}
379379

380380
{
@@ -395,20 +395,20 @@ public static SpinnerData CreateSpinner(B2WorldId worldId)
395395
for (int i = 0; i < bodyCount; ++i)
396396
{
397397
bodyDef.position = new B2Vec2(x, y);
398-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
398+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
399399

400400
int remainder = i % 3;
401401
if (remainder == 0)
402402
{
403-
b2CreateCapsuleShape(bodyId, ref shapeDef, ref capsule);
403+
b2CreateCapsuleShape(bodyId, shapeDef, capsule);
404404
}
405405
else if (remainder == 1)
406406
{
407-
b2CreateCircleShape(bodyId, ref shapeDef, ref circle);
407+
b2CreateCircleShape(bodyId, shapeDef, circle);
408408
}
409409
else if (remainder == 2)
410410
{
411-
b2CreatePolygonShape(bodyId, ref shapeDef, ref square);
411+
b2CreatePolygonShape(bodyId, shapeDef, square);
412412
}
413413

414414
x += 0.5f;
@@ -443,11 +443,11 @@ public static void CreateSmash(B2WorldId worldId, int rows, int columns, List<B2
443443
bodyDef.type = B2BodyType.b2_dynamicBody;
444444
bodyDef.position = new B2Vec2(-20.0f, 0.0f);
445445
bodyDef.linearVelocity = new B2Vec2(40.0f, 0.0f);
446-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
446+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
447447

448448
B2ShapeDef shapeDef = b2DefaultShapeDef();
449449
shapeDef.density = 8.0f;
450-
b2CreatePolygonShape(bodyId, ref shapeDef, ref box);
450+
b2CreatePolygonShape(bodyId, shapeDef, box);
451451
bodyIds.Add(bodyId);
452452
}
453453

@@ -467,8 +467,8 @@ public static void CreateSmash(B2WorldId worldId, int rows, int columns, List<B2
467467
{
468468
bodyDef.position.X = i * d + 30.0f;
469469
bodyDef.position.Y = (j - rows / 2.0f) * d;
470-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
471-
b2CreatePolygonShape(bodyId, ref shapeDef, ref box);
470+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
471+
b2CreatePolygonShape(bodyId, shapeDef, box);
472472
bodyIds.Add(bodyId);
473473
}
474474
}
@@ -480,27 +480,27 @@ public static void CreateTumbler(B2WorldId worldId)
480480
B2BodyId groundId;
481481
{
482482
B2BodyDef bodyDef = b2DefaultBodyDef();
483-
groundId = b2CreateBody(worldId, ref bodyDef);
483+
groundId = b2CreateBody(worldId, bodyDef);
484484
}
485485

486486
{
487487
B2BodyDef bodyDef = b2DefaultBodyDef();
488488
bodyDef.type = B2BodyType.b2_dynamicBody;
489489
bodyDef.position = new B2Vec2(0.0f, 10.0f);
490-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
490+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
491491

492492
B2ShapeDef shapeDef = b2DefaultShapeDef();
493493
shapeDef.density = 50.0f;
494494

495495
B2Polygon polygon;
496496
polygon = b2MakeOffsetBox(0.5f, 10.0f, new B2Vec2(10.0f, 0.0f), b2Rot_identity);
497-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
497+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
498498
polygon = b2MakeOffsetBox(0.5f, 10.0f, new B2Vec2(-10.0f, 0.0f), b2Rot_identity);
499-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
499+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
500500
polygon = b2MakeOffsetBox(10.0f, 0.5f, new B2Vec2(0.0f, 10.0f), b2Rot_identity);
501-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
501+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
502502
polygon = b2MakeOffsetBox(10.0f, 0.5f, new B2Vec2(0.0f, -10.0f), b2Rot_identity);
503-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
503+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
504504

505505
float motorSpeed = 25.0f;
506506

@@ -513,7 +513,7 @@ public static void CreateTumbler(B2WorldId worldId)
513513
jointDef.maxMotorTorque = 1e8f;
514514
jointDef.enableMotor = true;
515515

516-
b2CreateRevoluteJoint(worldId, ref jointDef);
516+
b2CreateRevoluteJoint(worldId, jointDef);
517517
}
518518

519519
int gridCount = BENCHMARK_DEBUG ? 20 : 45;
@@ -531,9 +531,9 @@ public static void CreateTumbler(B2WorldId worldId)
531531
for (int j = 0; j < gridCount; ++j)
532532
{
533533
bodyDef.position = new B2Vec2(x, y);
534-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
534+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
535535

536-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
536+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
537537

538538
x += 0.4f;
539539
}
@@ -550,7 +550,7 @@ public static void CreateWasher(B2WorldId worldId)
550550
B2BodyId groundId;
551551
{
552552
B2BodyDef bodyDef = b2DefaultBodyDef();
553-
groundId = b2CreateBody(worldId, ref bodyDef);
553+
groundId = b2CreateBody(worldId, bodyDef);
554554
}
555555

556556
{
@@ -570,7 +570,7 @@ public static void CreateWasher(B2WorldId worldId)
570570
bodyDef.type = B2BodyType.b2_dynamicBody;
571571
}
572572

573-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
573+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
574574

575575
B2ShapeDef shapeDef = b2DefaultShapeDef();
576576

@@ -607,7 +607,7 @@ public static void CreateWasher(B2WorldId worldId)
607607
B2Hull hull = b2ComputeHull(points, 4);
608608

609609
B2Polygon polygon = b2MakePolygon(ref hull, 0.0f);
610-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
610+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
611611
}
612612

613613
if (i % 9 == 0)
@@ -621,7 +621,7 @@ public static void CreateWasher(B2WorldId worldId)
621621
B2Hull hull = b2ComputeHull(points, 4);
622622

623623
B2Polygon polygon = b2MakePolygon(ref hull, 0.0f);
624-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
624+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
625625
}
626626

627627
u1 = u2;
@@ -638,7 +638,7 @@ public static void CreateWasher(B2WorldId worldId)
638638
jointDef.maxMotorTorque = 1e8f;
639639
jointDef.enableMotor = true;
640640

641-
b2CreateRevoluteJoint(worldId, ref jointDef);
641+
b2CreateRevoluteJoint(worldId, jointDef);
642642
}
643643
}
644644

@@ -659,9 +659,9 @@ public static void CreateWasher(B2WorldId worldId)
659659
for (int j = 0; j < gridCount; ++j)
660660
{
661661
bodyDef.position = new B2Vec2(x, y);
662-
B2BodyId bodyId = b2CreateBody(worldId, ref bodyDef);
662+
B2BodyId bodyId = b2CreateBody(worldId, bodyDef);
663663

664-
b2CreatePolygonShape(bodyId, ref shapeDef, ref polygon);
664+
b2CreatePolygonShape(bodyId, shapeDef, polygon);
665665

666666
x += 2.1f * a;
667667
}

0 commit comments

Comments
 (0)