@@ -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