box2d-bindings 0.1.2-x86_64-darwin → 0.1.4-x86_64-darwin
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +13 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/lib/box2d_base.rb +2 -1
- data/lib/box2d_collision.rb +18 -9
- data/lib/box2d_id.rb +25 -0
- data/lib/box2d_id_inline.rb +1 -8
- data/lib/box2d_main.rb +56 -39
- data/lib/box2d_math_functions.rb +4 -3
- data/lib/box2d_math_inline_functions.rb +3 -1
- data/lib/box2d_types.rb +286 -314
- data/lib/libbox2d.x86_64.dylib +0 -0
- metadata +3 -3
data/lib/box2d_types.rb
CHANGED
|
@@ -10,7 +10,6 @@ module Box2D
|
|
|
10
10
|
extend FFI::Library
|
|
11
11
|
# Define/Macro
|
|
12
12
|
|
|
13
|
-
DEFAULT_CATEGORY_BITS = 0x0001
|
|
14
13
|
|
|
15
14
|
# Enum
|
|
16
15
|
|
|
@@ -27,11 +26,10 @@ module Box2D
|
|
|
27
26
|
JointType_distanceJoint = 0
|
|
28
27
|
JointType_filterJoint = 1
|
|
29
28
|
JointType_motorJoint = 2
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
JointType_wheelJoint = 7
|
|
29
|
+
JointType_prismaticJoint = 3
|
|
30
|
+
JointType_revoluteJoint = 4
|
|
31
|
+
JointType_weldJoint = 5
|
|
32
|
+
JointType_wheelJoint = 6
|
|
35
33
|
HexColor_colorAliceBlue = 15792383
|
|
36
34
|
HexColor_colorAntiqueWhite = 16444375
|
|
37
35
|
HexColor_colorAqua = 65535
|
|
@@ -241,14 +239,13 @@ module Box2D
|
|
|
241
239
|
:hitEventThreshold, :float,
|
|
242
240
|
:contactHertz, :float,
|
|
243
241
|
:contactDampingRatio, :float,
|
|
244
|
-
:
|
|
245
|
-
:jointHertz, :float,
|
|
246
|
-
:jointDampingRatio, :float,
|
|
242
|
+
:contactSpeed, :float,
|
|
247
243
|
:maximumLinearSpeed, :float,
|
|
248
244
|
:frictionCallback, :pointer,
|
|
249
245
|
:restitutionCallback, :pointer,
|
|
250
246
|
:enableSleep, :bool,
|
|
251
247
|
:enableContinuous, :bool,
|
|
248
|
+
:enableContactSoftening, :bool,
|
|
252
249
|
:workerCount, :int,
|
|
253
250
|
:enqueueTask, :pointer,
|
|
254
251
|
:finishTask, :pointer,
|
|
@@ -266,12 +263,8 @@ module Box2D
|
|
|
266
263
|
def contactHertz=(v) self[:contactHertz] = v end
|
|
267
264
|
def contactDampingRatio = self[:contactDampingRatio]
|
|
268
265
|
def contactDampingRatio=(v) self[:contactDampingRatio] = v end
|
|
269
|
-
def
|
|
270
|
-
def
|
|
271
|
-
def jointHertz = self[:jointHertz]
|
|
272
|
-
def jointHertz=(v) self[:jointHertz] = v end
|
|
273
|
-
def jointDampingRatio = self[:jointDampingRatio]
|
|
274
|
-
def jointDampingRatio=(v) self[:jointDampingRatio] = v end
|
|
266
|
+
def contactSpeed = self[:contactSpeed]
|
|
267
|
+
def contactSpeed=(v) self[:contactSpeed] = v end
|
|
275
268
|
def maximumLinearSpeed = self[:maximumLinearSpeed]
|
|
276
269
|
def maximumLinearSpeed=(v) self[:maximumLinearSpeed] = v end
|
|
277
270
|
def frictionCallback = self[:frictionCallback]
|
|
@@ -282,6 +275,8 @@ module Box2D
|
|
|
282
275
|
def enableSleep=(v) self[:enableSleep] = v end
|
|
283
276
|
def enableContinuous = self[:enableContinuous]
|
|
284
277
|
def enableContinuous=(v) self[:enableContinuous] = v end
|
|
278
|
+
def enableContactSoftening = self[:enableContactSoftening]
|
|
279
|
+
def enableContactSoftening=(v) self[:enableContactSoftening] = v end
|
|
285
280
|
def workerCount = self[:workerCount]
|
|
286
281
|
def workerCount=(v) self[:workerCount] = v end
|
|
287
282
|
def enqueueTask = self[:enqueueTask]
|
|
@@ -294,21 +289,20 @@ module Box2D
|
|
|
294
289
|
def userData=(v) self[:userData] = v end
|
|
295
290
|
def internalValue = self[:internalValue]
|
|
296
291
|
def internalValue=(v) self[:internalValue] = v end
|
|
297
|
-
def self.create_as(_gravity_, _restitutionThreshold_, _hitEventThreshold_, _contactHertz_, _contactDampingRatio_,
|
|
292
|
+
def self.create_as(_gravity_, _restitutionThreshold_, _hitEventThreshold_, _contactHertz_, _contactDampingRatio_, _contactSpeed_, _maximumLinearSpeed_, _frictionCallback_, _restitutionCallback_, _enableSleep_, _enableContinuous_, _enableContactSoftening_, _workerCount_, _enqueueTask_, _finishTask_, _userTaskContext_, _userData_, _internalValue_)
|
|
298
293
|
instance = WorldDef.new
|
|
299
294
|
instance[:gravity] = _gravity_
|
|
300
295
|
instance[:restitutionThreshold] = _restitutionThreshold_
|
|
301
296
|
instance[:hitEventThreshold] = _hitEventThreshold_
|
|
302
297
|
instance[:contactHertz] = _contactHertz_
|
|
303
298
|
instance[:contactDampingRatio] = _contactDampingRatio_
|
|
304
|
-
instance[:
|
|
305
|
-
instance[:jointHertz] = _jointHertz_
|
|
306
|
-
instance[:jointDampingRatio] = _jointDampingRatio_
|
|
299
|
+
instance[:contactSpeed] = _contactSpeed_
|
|
307
300
|
instance[:maximumLinearSpeed] = _maximumLinearSpeed_
|
|
308
301
|
instance[:frictionCallback] = _frictionCallback_
|
|
309
302
|
instance[:restitutionCallback] = _restitutionCallback_
|
|
310
303
|
instance[:enableSleep] = _enableSleep_
|
|
311
304
|
instance[:enableContinuous] = _enableContinuous_
|
|
305
|
+
instance[:enableContactSoftening] = _enableContactSoftening_
|
|
312
306
|
instance[:workerCount] = _workerCount_
|
|
313
307
|
instance[:enqueueTask] = _enqueueTask_
|
|
314
308
|
instance[:finishTask] = _finishTask_
|
|
@@ -319,6 +313,27 @@ module Box2D
|
|
|
319
313
|
end
|
|
320
314
|
end
|
|
321
315
|
|
|
316
|
+
class MotionLocks < FFI::Struct
|
|
317
|
+
layout(
|
|
318
|
+
:linearX, :bool,
|
|
319
|
+
:linearY, :bool,
|
|
320
|
+
:angularZ, :bool,
|
|
321
|
+
)
|
|
322
|
+
def linearX = self[:linearX]
|
|
323
|
+
def linearX=(v) self[:linearX] = v end
|
|
324
|
+
def linearY = self[:linearY]
|
|
325
|
+
def linearY=(v) self[:linearY] = v end
|
|
326
|
+
def angularZ = self[:angularZ]
|
|
327
|
+
def angularZ=(v) self[:angularZ] = v end
|
|
328
|
+
def self.create_as(_linearX_, _linearY_, _angularZ_)
|
|
329
|
+
instance = MotionLocks.new
|
|
330
|
+
instance[:linearX] = _linearX_
|
|
331
|
+
instance[:linearY] = _linearY_
|
|
332
|
+
instance[:angularZ] = _angularZ_
|
|
333
|
+
instance
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
|
|
322
337
|
class BodyDef < FFI::Struct
|
|
323
338
|
layout(
|
|
324
339
|
:type, :int,
|
|
@@ -332,9 +347,9 @@ module Box2D
|
|
|
332
347
|
:sleepThreshold, :float,
|
|
333
348
|
:name, :pointer,
|
|
334
349
|
:userData, :pointer,
|
|
350
|
+
:motionLocks, MotionLocks,
|
|
335
351
|
:enableSleep, :bool,
|
|
336
352
|
:isAwake, :bool,
|
|
337
|
-
:fixedRotation, :bool,
|
|
338
353
|
:isBullet, :bool,
|
|
339
354
|
:isEnabled, :bool,
|
|
340
355
|
:allowFastRotation, :bool,
|
|
@@ -362,12 +377,12 @@ module Box2D
|
|
|
362
377
|
def name=(v) self[:name] = v end
|
|
363
378
|
def userData = self[:userData]
|
|
364
379
|
def userData=(v) self[:userData] = v end
|
|
380
|
+
def motionLocks = self[:motionLocks]
|
|
381
|
+
def motionLocks=(v) self[:motionLocks] = v end
|
|
365
382
|
def enableSleep = self[:enableSleep]
|
|
366
383
|
def enableSleep=(v) self[:enableSleep] = v end
|
|
367
384
|
def isAwake = self[:isAwake]
|
|
368
385
|
def isAwake=(v) self[:isAwake] = v end
|
|
369
|
-
def fixedRotation = self[:fixedRotation]
|
|
370
|
-
def fixedRotation=(v) self[:fixedRotation] = v end
|
|
371
386
|
def isBullet = self[:isBullet]
|
|
372
387
|
def isBullet=(v) self[:isBullet] = v end
|
|
373
388
|
def isEnabled = self[:isEnabled]
|
|
@@ -376,7 +391,7 @@ module Box2D
|
|
|
376
391
|
def allowFastRotation=(v) self[:allowFastRotation] = v end
|
|
377
392
|
def internalValue = self[:internalValue]
|
|
378
393
|
def internalValue=(v) self[:internalValue] = v end
|
|
379
|
-
def self.create_as(_type_, _position_, _rotation_, _linearVelocity_, _angularVelocity_, _linearDamping_, _angularDamping_, _gravityScale_, _sleepThreshold_, _name_, _userData_, _enableSleep_, _isAwake_,
|
|
394
|
+
def self.create_as(_type_, _position_, _rotation_, _linearVelocity_, _angularVelocity_, _linearDamping_, _angularDamping_, _gravityScale_, _sleepThreshold_, _name_, _userData_, _motionLocks_, _enableSleep_, _isAwake_, _isBullet_, _isEnabled_, _allowFastRotation_, _internalValue_)
|
|
380
395
|
instance = BodyDef.new
|
|
381
396
|
instance[:type] = _type_
|
|
382
397
|
instance[:position] = _position_
|
|
@@ -389,9 +404,9 @@ module Box2D
|
|
|
389
404
|
instance[:sleepThreshold] = _sleepThreshold_
|
|
390
405
|
instance[:name] = _name_
|
|
391
406
|
instance[:userData] = _userData_
|
|
407
|
+
instance[:motionLocks] = _motionLocks_
|
|
392
408
|
instance[:enableSleep] = _enableSleep_
|
|
393
409
|
instance[:isAwake] = _isAwake_
|
|
394
|
-
instance[:fixedRotation] = _fixedRotation_
|
|
395
410
|
instance[:isBullet] = _isBullet_
|
|
396
411
|
instance[:isEnabled] = _isEnabled_
|
|
397
412
|
instance[:allowFastRotation] = _allowFastRotation_
|
|
@@ -444,7 +459,7 @@ module Box2D
|
|
|
444
459
|
:restitution, :float,
|
|
445
460
|
:rollingResistance, :float,
|
|
446
461
|
:tangentSpeed, :float,
|
|
447
|
-
:userMaterialId, :
|
|
462
|
+
:userMaterialId, :ulong_long,
|
|
448
463
|
:customColor, :uint,
|
|
449
464
|
)
|
|
450
465
|
def friction = self[:friction]
|
|
@@ -477,6 +492,7 @@ module Box2D
|
|
|
477
492
|
:material, SurfaceMaterial,
|
|
478
493
|
:density, :float,
|
|
479
494
|
:filter, Filter,
|
|
495
|
+
:enableCustomFiltering, :bool,
|
|
480
496
|
:isSensor, :bool,
|
|
481
497
|
:enableSensorEvents, :bool,
|
|
482
498
|
:enableContactEvents, :bool,
|
|
@@ -494,6 +510,8 @@ module Box2D
|
|
|
494
510
|
def density=(v) self[:density] = v end
|
|
495
511
|
def filter = self[:filter]
|
|
496
512
|
def filter=(v) self[:filter] = v end
|
|
513
|
+
def enableCustomFiltering = self[:enableCustomFiltering]
|
|
514
|
+
def enableCustomFiltering=(v) self[:enableCustomFiltering] = v end
|
|
497
515
|
def isSensor = self[:isSensor]
|
|
498
516
|
def isSensor=(v) self[:isSensor] = v end
|
|
499
517
|
def enableSensorEvents = self[:enableSensorEvents]
|
|
@@ -510,12 +528,13 @@ module Box2D
|
|
|
510
528
|
def updateBodyMass=(v) self[:updateBodyMass] = v end
|
|
511
529
|
def internalValue = self[:internalValue]
|
|
512
530
|
def internalValue=(v) self[:internalValue] = v end
|
|
513
|
-
def self.create_as(_userData_, _material_, _density_, _filter_, _isSensor_, _enableSensorEvents_, _enableContactEvents_, _enableHitEvents_, _enablePreSolveEvents_, _invokeContactCreation_, _updateBodyMass_, _internalValue_)
|
|
531
|
+
def self.create_as(_userData_, _material_, _density_, _filter_, _enableCustomFiltering_, _isSensor_, _enableSensorEvents_, _enableContactEvents_, _enableHitEvents_, _enablePreSolveEvents_, _invokeContactCreation_, _updateBodyMass_, _internalValue_)
|
|
514
532
|
instance = ShapeDef.new
|
|
515
533
|
instance[:userData] = _userData_
|
|
516
534
|
instance[:material] = _material_
|
|
517
535
|
instance[:density] = _density_
|
|
518
536
|
instance[:filter] = _filter_
|
|
537
|
+
instance[:enableCustomFiltering] = _enableCustomFiltering_
|
|
519
538
|
instance[:isSensor] = _isSensor_
|
|
520
539
|
instance[:enableSensorEvents] = _enableSensorEvents_
|
|
521
540
|
instance[:enableContactEvents] = _enableContactEvents_
|
|
@@ -579,7 +598,6 @@ module Box2D
|
|
|
579
598
|
:pairs, :float,
|
|
580
599
|
:collide, :float,
|
|
581
600
|
:solve, :float,
|
|
582
|
-
:mergeIslands, :float,
|
|
583
601
|
:prepareStages, :float,
|
|
584
602
|
:solveConstraints, :float,
|
|
585
603
|
:prepareConstraints, :float,
|
|
@@ -592,6 +610,8 @@ module Box2D
|
|
|
592
610
|
:storeImpulses, :float,
|
|
593
611
|
:splitIslands, :float,
|
|
594
612
|
:transforms, :float,
|
|
613
|
+
:sensorHits, :float,
|
|
614
|
+
:jointEvents, :float,
|
|
595
615
|
:hitEvents, :float,
|
|
596
616
|
:refit, :float,
|
|
597
617
|
:bullets, :float,
|
|
@@ -606,8 +626,6 @@ module Box2D
|
|
|
606
626
|
def collide=(v) self[:collide] = v end
|
|
607
627
|
def solve = self[:solve]
|
|
608
628
|
def solve=(v) self[:solve] = v end
|
|
609
|
-
def mergeIslands = self[:mergeIslands]
|
|
610
|
-
def mergeIslands=(v) self[:mergeIslands] = v end
|
|
611
629
|
def prepareStages = self[:prepareStages]
|
|
612
630
|
def prepareStages=(v) self[:prepareStages] = v end
|
|
613
631
|
def solveConstraints = self[:solveConstraints]
|
|
@@ -632,6 +650,10 @@ module Box2D
|
|
|
632
650
|
def splitIslands=(v) self[:splitIslands] = v end
|
|
633
651
|
def transforms = self[:transforms]
|
|
634
652
|
def transforms=(v) self[:transforms] = v end
|
|
653
|
+
def sensorHits = self[:sensorHits]
|
|
654
|
+
def sensorHits=(v) self[:sensorHits] = v end
|
|
655
|
+
def jointEvents = self[:jointEvents]
|
|
656
|
+
def jointEvents=(v) self[:jointEvents] = v end
|
|
635
657
|
def hitEvents = self[:hitEvents]
|
|
636
658
|
def hitEvents=(v) self[:hitEvents] = v end
|
|
637
659
|
def refit = self[:refit]
|
|
@@ -642,13 +664,12 @@ module Box2D
|
|
|
642
664
|
def sleepIslands=(v) self[:sleepIslands] = v end
|
|
643
665
|
def sensors = self[:sensors]
|
|
644
666
|
def sensors=(v) self[:sensors] = v end
|
|
645
|
-
def self.create_as(_step_, _pairs_, _collide_, _solve_,
|
|
667
|
+
def self.create_as(_step_, _pairs_, _collide_, _solve_, _prepareStages_, _solveConstraints_, _prepareConstraints_, _integrateVelocities_, _warmStart_, _solveImpulses_, _integratePositions_, _relaxImpulses_, _applyRestitution_, _storeImpulses_, _splitIslands_, _transforms_, _sensorHits_, _jointEvents_, _hitEvents_, _refit_, _bullets_, _sleepIslands_, _sensors_)
|
|
646
668
|
instance = Profile.new
|
|
647
669
|
instance[:step] = _step_
|
|
648
670
|
instance[:pairs] = _pairs_
|
|
649
671
|
instance[:collide] = _collide_
|
|
650
672
|
instance[:solve] = _solve_
|
|
651
|
-
instance[:mergeIslands] = _mergeIslands_
|
|
652
673
|
instance[:prepareStages] = _prepareStages_
|
|
653
674
|
instance[:solveConstraints] = _solveConstraints_
|
|
654
675
|
instance[:prepareConstraints] = _prepareConstraints_
|
|
@@ -661,6 +682,8 @@ module Box2D
|
|
|
661
682
|
instance[:storeImpulses] = _storeImpulses_
|
|
662
683
|
instance[:splitIslands] = _splitIslands_
|
|
663
684
|
instance[:transforms] = _transforms_
|
|
685
|
+
instance[:sensorHits] = _sensorHits_
|
|
686
|
+
instance[:jointEvents] = _jointEvents_
|
|
664
687
|
instance[:hitEvents] = _hitEvents_
|
|
665
688
|
instance[:refit] = _refit_
|
|
666
689
|
instance[:bullets] = _bullets_
|
|
@@ -682,7 +705,7 @@ module Box2D
|
|
|
682
705
|
:treeHeight, :int,
|
|
683
706
|
:byteCount, :int,
|
|
684
707
|
:taskCount, :int,
|
|
685
|
-
:colorCounts, [:int,
|
|
708
|
+
:colorCounts, [:int, 24],
|
|
686
709
|
)
|
|
687
710
|
def bodyCount = self[:bodyCount]
|
|
688
711
|
def bodyCount=(v) self[:bodyCount] = v end
|
|
@@ -723,14 +746,66 @@ module Box2D
|
|
|
723
746
|
end
|
|
724
747
|
end
|
|
725
748
|
|
|
726
|
-
class
|
|
749
|
+
class JointDef < FFI::Struct
|
|
727
750
|
layout(
|
|
751
|
+
:userData, :pointer,
|
|
728
752
|
:bodyIdA, BodyId,
|
|
729
753
|
:bodyIdB, BodyId,
|
|
730
|
-
:
|
|
731
|
-
:
|
|
754
|
+
:localFrameA, Transform,
|
|
755
|
+
:localFrameB, Transform,
|
|
756
|
+
:forceThreshold, :float,
|
|
757
|
+
:torqueThreshold, :float,
|
|
758
|
+
:constraintHertz, :float,
|
|
759
|
+
:constraintDampingRatio, :float,
|
|
760
|
+
:drawScale, :float,
|
|
761
|
+
:collideConnected, :bool,
|
|
762
|
+
)
|
|
763
|
+
def userData = self[:userData]
|
|
764
|
+
def userData=(v) self[:userData] = v end
|
|
765
|
+
def bodyIdA = self[:bodyIdA]
|
|
766
|
+
def bodyIdA=(v) self[:bodyIdA] = v end
|
|
767
|
+
def bodyIdB = self[:bodyIdB]
|
|
768
|
+
def bodyIdB=(v) self[:bodyIdB] = v end
|
|
769
|
+
def localFrameA = self[:localFrameA]
|
|
770
|
+
def localFrameA=(v) self[:localFrameA] = v end
|
|
771
|
+
def localFrameB = self[:localFrameB]
|
|
772
|
+
def localFrameB=(v) self[:localFrameB] = v end
|
|
773
|
+
def forceThreshold = self[:forceThreshold]
|
|
774
|
+
def forceThreshold=(v) self[:forceThreshold] = v end
|
|
775
|
+
def torqueThreshold = self[:torqueThreshold]
|
|
776
|
+
def torqueThreshold=(v) self[:torqueThreshold] = v end
|
|
777
|
+
def constraintHertz = self[:constraintHertz]
|
|
778
|
+
def constraintHertz=(v) self[:constraintHertz] = v end
|
|
779
|
+
def constraintDampingRatio = self[:constraintDampingRatio]
|
|
780
|
+
def constraintDampingRatio=(v) self[:constraintDampingRatio] = v end
|
|
781
|
+
def drawScale = self[:drawScale]
|
|
782
|
+
def drawScale=(v) self[:drawScale] = v end
|
|
783
|
+
def collideConnected = self[:collideConnected]
|
|
784
|
+
def collideConnected=(v) self[:collideConnected] = v end
|
|
785
|
+
def self.create_as(_userData_, _bodyIdA_, _bodyIdB_, _localFrameA_, _localFrameB_, _forceThreshold_, _torqueThreshold_, _constraintHertz_, _constraintDampingRatio_, _drawScale_, _collideConnected_)
|
|
786
|
+
instance = JointDef.new
|
|
787
|
+
instance[:userData] = _userData_
|
|
788
|
+
instance[:bodyIdA] = _bodyIdA_
|
|
789
|
+
instance[:bodyIdB] = _bodyIdB_
|
|
790
|
+
instance[:localFrameA] = _localFrameA_
|
|
791
|
+
instance[:localFrameB] = _localFrameB_
|
|
792
|
+
instance[:forceThreshold] = _forceThreshold_
|
|
793
|
+
instance[:torqueThreshold] = _torqueThreshold_
|
|
794
|
+
instance[:constraintHertz] = _constraintHertz_
|
|
795
|
+
instance[:constraintDampingRatio] = _constraintDampingRatio_
|
|
796
|
+
instance[:drawScale] = _drawScale_
|
|
797
|
+
instance[:collideConnected] = _collideConnected_
|
|
798
|
+
instance
|
|
799
|
+
end
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
class DistanceJointDef < FFI::Struct
|
|
803
|
+
layout(
|
|
804
|
+
:base, JointDef,
|
|
732
805
|
:length, :float,
|
|
733
806
|
:enableSpring, :bool,
|
|
807
|
+
:lowerSpringForce, :float,
|
|
808
|
+
:upperSpringForce, :float,
|
|
734
809
|
:hertz, :float,
|
|
735
810
|
:dampingRatio, :float,
|
|
736
811
|
:enableLimit, :bool,
|
|
@@ -739,22 +814,18 @@ module Box2D
|
|
|
739
814
|
:enableMotor, :bool,
|
|
740
815
|
:maxMotorForce, :float,
|
|
741
816
|
:motorSpeed, :float,
|
|
742
|
-
:collideConnected, :bool,
|
|
743
|
-
:userData, :pointer,
|
|
744
817
|
:internalValue, :int,
|
|
745
818
|
)
|
|
746
|
-
def
|
|
747
|
-
def
|
|
748
|
-
def bodyIdB = self[:bodyIdB]
|
|
749
|
-
def bodyIdB=(v) self[:bodyIdB] = v end
|
|
750
|
-
def localAnchorA = self[:localAnchorA]
|
|
751
|
-
def localAnchorA=(v) self[:localAnchorA] = v end
|
|
752
|
-
def localAnchorB = self[:localAnchorB]
|
|
753
|
-
def localAnchorB=(v) self[:localAnchorB] = v end
|
|
819
|
+
def base = self[:base]
|
|
820
|
+
def base=(v) self[:base] = v end
|
|
754
821
|
def length = self[:length]
|
|
755
822
|
def length=(v) self[:length] = v end
|
|
756
823
|
def enableSpring = self[:enableSpring]
|
|
757
824
|
def enableSpring=(v) self[:enableSpring] = v end
|
|
825
|
+
def lowerSpringForce = self[:lowerSpringForce]
|
|
826
|
+
def lowerSpringForce=(v) self[:lowerSpringForce] = v end
|
|
827
|
+
def upperSpringForce = self[:upperSpringForce]
|
|
828
|
+
def upperSpringForce=(v) self[:upperSpringForce] = v end
|
|
758
829
|
def hertz = self[:hertz]
|
|
759
830
|
def hertz=(v) self[:hertz] = v end
|
|
760
831
|
def dampingRatio = self[:dampingRatio]
|
|
@@ -771,20 +842,15 @@ module Box2D
|
|
|
771
842
|
def maxMotorForce=(v) self[:maxMotorForce] = v end
|
|
772
843
|
def motorSpeed = self[:motorSpeed]
|
|
773
844
|
def motorSpeed=(v) self[:motorSpeed] = v end
|
|
774
|
-
def collideConnected = self[:collideConnected]
|
|
775
|
-
def collideConnected=(v) self[:collideConnected] = v end
|
|
776
|
-
def userData = self[:userData]
|
|
777
|
-
def userData=(v) self[:userData] = v end
|
|
778
845
|
def internalValue = self[:internalValue]
|
|
779
846
|
def internalValue=(v) self[:internalValue] = v end
|
|
780
|
-
def self.create_as(
|
|
847
|
+
def self.create_as(_base_, _length_, _enableSpring_, _lowerSpringForce_, _upperSpringForce_, _hertz_, _dampingRatio_, _enableLimit_, _minLength_, _maxLength_, _enableMotor_, _maxMotorForce_, _motorSpeed_, _internalValue_)
|
|
781
848
|
instance = DistanceJointDef.new
|
|
782
|
-
instance[:
|
|
783
|
-
instance[:bodyIdB] = _bodyIdB_
|
|
784
|
-
instance[:localAnchorA] = _localAnchorA_
|
|
785
|
-
instance[:localAnchorB] = _localAnchorB_
|
|
849
|
+
instance[:base] = _base_
|
|
786
850
|
instance[:length] = _length_
|
|
787
851
|
instance[:enableSpring] = _enableSpring_
|
|
852
|
+
instance[:lowerSpringForce] = _lowerSpringForce_
|
|
853
|
+
instance[:upperSpringForce] = _upperSpringForce_
|
|
788
854
|
instance[:hertz] = _hertz_
|
|
789
855
|
instance[:dampingRatio] = _dampingRatio_
|
|
790
856
|
instance[:enableLimit] = _enableLimit_
|
|
@@ -793,8 +859,6 @@ module Box2D
|
|
|
793
859
|
instance[:enableMotor] = _enableMotor_
|
|
794
860
|
instance[:maxMotorForce] = _maxMotorForce_
|
|
795
861
|
instance[:motorSpeed] = _motorSpeed_
|
|
796
|
-
instance[:collideConnected] = _collideConnected_
|
|
797
|
-
instance[:userData] = _userData_
|
|
798
862
|
instance[:internalValue] = _internalValue_
|
|
799
863
|
instance
|
|
800
864
|
end
|
|
@@ -802,93 +866,56 @@ module Box2D
|
|
|
802
866
|
|
|
803
867
|
class MotorJointDef < FFI::Struct
|
|
804
868
|
layout(
|
|
805
|
-
:
|
|
806
|
-
:
|
|
807
|
-
:
|
|
808
|
-
:
|
|
809
|
-
:
|
|
810
|
-
:
|
|
811
|
-
:
|
|
812
|
-
:
|
|
813
|
-
:
|
|
869
|
+
:base, JointDef,
|
|
870
|
+
:linearVelocity, Vec2,
|
|
871
|
+
:maxVelocityForce, :float,
|
|
872
|
+
:angularVelocity, :float,
|
|
873
|
+
:maxVelocityTorque, :float,
|
|
874
|
+
:linearHertz, :float,
|
|
875
|
+
:linearDampingRatio, :float,
|
|
876
|
+
:maxSpringForce, :float,
|
|
877
|
+
:angularHertz, :float,
|
|
878
|
+
:angularDampingRatio, :float,
|
|
879
|
+
:maxSpringTorque, :float,
|
|
814
880
|
:internalValue, :int,
|
|
815
881
|
)
|
|
816
|
-
def
|
|
817
|
-
def
|
|
818
|
-
def
|
|
819
|
-
def
|
|
820
|
-
def
|
|
821
|
-
def
|
|
822
|
-
def
|
|
823
|
-
def
|
|
824
|
-
def
|
|
825
|
-
def
|
|
826
|
-
def
|
|
827
|
-
def
|
|
828
|
-
def
|
|
829
|
-
def
|
|
830
|
-
def
|
|
831
|
-
def
|
|
832
|
-
def
|
|
833
|
-
def
|
|
882
|
+
def base = self[:base]
|
|
883
|
+
def base=(v) self[:base] = v end
|
|
884
|
+
def linearVelocity = self[:linearVelocity]
|
|
885
|
+
def linearVelocity=(v) self[:linearVelocity] = v end
|
|
886
|
+
def maxVelocityForce = self[:maxVelocityForce]
|
|
887
|
+
def maxVelocityForce=(v) self[:maxVelocityForce] = v end
|
|
888
|
+
def angularVelocity = self[:angularVelocity]
|
|
889
|
+
def angularVelocity=(v) self[:angularVelocity] = v end
|
|
890
|
+
def maxVelocityTorque = self[:maxVelocityTorque]
|
|
891
|
+
def maxVelocityTorque=(v) self[:maxVelocityTorque] = v end
|
|
892
|
+
def linearHertz = self[:linearHertz]
|
|
893
|
+
def linearHertz=(v) self[:linearHertz] = v end
|
|
894
|
+
def linearDampingRatio = self[:linearDampingRatio]
|
|
895
|
+
def linearDampingRatio=(v) self[:linearDampingRatio] = v end
|
|
896
|
+
def maxSpringForce = self[:maxSpringForce]
|
|
897
|
+
def maxSpringForce=(v) self[:maxSpringForce] = v end
|
|
898
|
+
def angularHertz = self[:angularHertz]
|
|
899
|
+
def angularHertz=(v) self[:angularHertz] = v end
|
|
900
|
+
def angularDampingRatio = self[:angularDampingRatio]
|
|
901
|
+
def angularDampingRatio=(v) self[:angularDampingRatio] = v end
|
|
902
|
+
def maxSpringTorque = self[:maxSpringTorque]
|
|
903
|
+
def maxSpringTorque=(v) self[:maxSpringTorque] = v end
|
|
834
904
|
def internalValue = self[:internalValue]
|
|
835
905
|
def internalValue=(v) self[:internalValue] = v end
|
|
836
|
-
def self.create_as(
|
|
906
|
+
def self.create_as(_base_, _linearVelocity_, _maxVelocityForce_, _angularVelocity_, _maxVelocityTorque_, _linearHertz_, _linearDampingRatio_, _maxSpringForce_, _angularHertz_, _angularDampingRatio_, _maxSpringTorque_, _internalValue_)
|
|
837
907
|
instance = MotorJointDef.new
|
|
838
|
-
instance[:
|
|
839
|
-
instance[:
|
|
840
|
-
instance[:
|
|
841
|
-
instance[:
|
|
842
|
-
instance[:
|
|
843
|
-
instance[:
|
|
844
|
-
instance[:
|
|
845
|
-
instance[:
|
|
846
|
-
instance[:
|
|
847
|
-
instance[:
|
|
848
|
-
instance
|
|
849
|
-
end
|
|
850
|
-
end
|
|
851
|
-
|
|
852
|
-
class MouseJointDef < FFI::Struct
|
|
853
|
-
layout(
|
|
854
|
-
:bodyIdA, BodyId,
|
|
855
|
-
:bodyIdB, BodyId,
|
|
856
|
-
:target, Vec2,
|
|
857
|
-
:hertz, :float,
|
|
858
|
-
:dampingRatio, :float,
|
|
859
|
-
:maxForce, :float,
|
|
860
|
-
:collideConnected, :bool,
|
|
861
|
-
:userData, :pointer,
|
|
862
|
-
:internalValue, :int,
|
|
863
|
-
)
|
|
864
|
-
def bodyIdA = self[:bodyIdA]
|
|
865
|
-
def bodyIdA=(v) self[:bodyIdA] = v end
|
|
866
|
-
def bodyIdB = self[:bodyIdB]
|
|
867
|
-
def bodyIdB=(v) self[:bodyIdB] = v end
|
|
868
|
-
def target = self[:target]
|
|
869
|
-
def target=(v) self[:target] = v end
|
|
870
|
-
def hertz = self[:hertz]
|
|
871
|
-
def hertz=(v) self[:hertz] = v end
|
|
872
|
-
def dampingRatio = self[:dampingRatio]
|
|
873
|
-
def dampingRatio=(v) self[:dampingRatio] = v end
|
|
874
|
-
def maxForce = self[:maxForce]
|
|
875
|
-
def maxForce=(v) self[:maxForce] = v end
|
|
876
|
-
def collideConnected = self[:collideConnected]
|
|
877
|
-
def collideConnected=(v) self[:collideConnected] = v end
|
|
878
|
-
def userData = self[:userData]
|
|
879
|
-
def userData=(v) self[:userData] = v end
|
|
880
|
-
def internalValue = self[:internalValue]
|
|
881
|
-
def internalValue=(v) self[:internalValue] = v end
|
|
882
|
-
def self.create_as(_bodyIdA_, _bodyIdB_, _target_, _hertz_, _dampingRatio_, _maxForce_, _collideConnected_, _userData_, _internalValue_)
|
|
883
|
-
instance = MouseJointDef.new
|
|
884
|
-
instance[:bodyIdA] = _bodyIdA_
|
|
885
|
-
instance[:bodyIdB] = _bodyIdB_
|
|
886
|
-
instance[:target] = _target_
|
|
887
|
-
instance[:hertz] = _hertz_
|
|
888
|
-
instance[:dampingRatio] = _dampingRatio_
|
|
889
|
-
instance[:maxForce] = _maxForce_
|
|
890
|
-
instance[:collideConnected] = _collideConnected_
|
|
891
|
-
instance[:userData] = _userData_
|
|
908
|
+
instance[:base] = _base_
|
|
909
|
+
instance[:linearVelocity] = _linearVelocity_
|
|
910
|
+
instance[:maxVelocityForce] = _maxVelocityForce_
|
|
911
|
+
instance[:angularVelocity] = _angularVelocity_
|
|
912
|
+
instance[:maxVelocityTorque] = _maxVelocityTorque_
|
|
913
|
+
instance[:linearHertz] = _linearHertz_
|
|
914
|
+
instance[:linearDampingRatio] = _linearDampingRatio_
|
|
915
|
+
instance[:maxSpringForce] = _maxSpringForce_
|
|
916
|
+
instance[:angularHertz] = _angularHertz_
|
|
917
|
+
instance[:angularDampingRatio] = _angularDampingRatio_
|
|
918
|
+
instance[:maxSpringTorque] = _maxSpringTorque_
|
|
892
919
|
instance[:internalValue] = _internalValue_
|
|
893
920
|
instance
|
|
894
921
|
end
|
|
@@ -896,24 +923,16 @@ module Box2D
|
|
|
896
923
|
|
|
897
924
|
class FilterJointDef < FFI::Struct
|
|
898
925
|
layout(
|
|
899
|
-
:
|
|
900
|
-
:bodyIdB, BodyId,
|
|
901
|
-
:userData, :pointer,
|
|
926
|
+
:base, JointDef,
|
|
902
927
|
:internalValue, :int,
|
|
903
928
|
)
|
|
904
|
-
def
|
|
905
|
-
def
|
|
906
|
-
def bodyIdB = self[:bodyIdB]
|
|
907
|
-
def bodyIdB=(v) self[:bodyIdB] = v end
|
|
908
|
-
def userData = self[:userData]
|
|
909
|
-
def userData=(v) self[:userData] = v end
|
|
929
|
+
def base = self[:base]
|
|
930
|
+
def base=(v) self[:base] = v end
|
|
910
931
|
def internalValue = self[:internalValue]
|
|
911
932
|
def internalValue=(v) self[:internalValue] = v end
|
|
912
|
-
def self.create_as(
|
|
933
|
+
def self.create_as(_base_, _internalValue_)
|
|
913
934
|
instance = FilterJointDef.new
|
|
914
|
-
instance[:
|
|
915
|
-
instance[:bodyIdB] = _bodyIdB_
|
|
916
|
-
instance[:userData] = _userData_
|
|
935
|
+
instance[:base] = _base_
|
|
917
936
|
instance[:internalValue] = _internalValue_
|
|
918
937
|
instance
|
|
919
938
|
end
|
|
@@ -921,43 +940,29 @@ module Box2D
|
|
|
921
940
|
|
|
922
941
|
class PrismaticJointDef < FFI::Struct
|
|
923
942
|
layout(
|
|
924
|
-
:
|
|
925
|
-
:bodyIdB, BodyId,
|
|
926
|
-
:localAnchorA, Vec2,
|
|
927
|
-
:localAnchorB, Vec2,
|
|
928
|
-
:localAxisA, Vec2,
|
|
929
|
-
:referenceAngle, :float,
|
|
943
|
+
:base, JointDef,
|
|
930
944
|
:enableSpring, :bool,
|
|
931
945
|
:hertz, :float,
|
|
932
946
|
:dampingRatio, :float,
|
|
947
|
+
:targetTranslation, :float,
|
|
933
948
|
:enableLimit, :bool,
|
|
934
949
|
:lowerTranslation, :float,
|
|
935
950
|
:upperTranslation, :float,
|
|
936
951
|
:enableMotor, :bool,
|
|
937
952
|
:maxMotorForce, :float,
|
|
938
953
|
:motorSpeed, :float,
|
|
939
|
-
:collideConnected, :bool,
|
|
940
|
-
:userData, :pointer,
|
|
941
954
|
:internalValue, :int,
|
|
942
955
|
)
|
|
943
|
-
def
|
|
944
|
-
def
|
|
945
|
-
def bodyIdB = self[:bodyIdB]
|
|
946
|
-
def bodyIdB=(v) self[:bodyIdB] = v end
|
|
947
|
-
def localAnchorA = self[:localAnchorA]
|
|
948
|
-
def localAnchorA=(v) self[:localAnchorA] = v end
|
|
949
|
-
def localAnchorB = self[:localAnchorB]
|
|
950
|
-
def localAnchorB=(v) self[:localAnchorB] = v end
|
|
951
|
-
def localAxisA = self[:localAxisA]
|
|
952
|
-
def localAxisA=(v) self[:localAxisA] = v end
|
|
953
|
-
def referenceAngle = self[:referenceAngle]
|
|
954
|
-
def referenceAngle=(v) self[:referenceAngle] = v end
|
|
956
|
+
def base = self[:base]
|
|
957
|
+
def base=(v) self[:base] = v end
|
|
955
958
|
def enableSpring = self[:enableSpring]
|
|
956
959
|
def enableSpring=(v) self[:enableSpring] = v end
|
|
957
960
|
def hertz = self[:hertz]
|
|
958
961
|
def hertz=(v) self[:hertz] = v end
|
|
959
962
|
def dampingRatio = self[:dampingRatio]
|
|
960
963
|
def dampingRatio=(v) self[:dampingRatio] = v end
|
|
964
|
+
def targetTranslation = self[:targetTranslation]
|
|
965
|
+
def targetTranslation=(v) self[:targetTranslation] = v end
|
|
961
966
|
def enableLimit = self[:enableLimit]
|
|
962
967
|
def enableLimit=(v) self[:enableLimit] = v end
|
|
963
968
|
def lowerTranslation = self[:lowerTranslation]
|
|
@@ -970,31 +975,21 @@ module Box2D
|
|
|
970
975
|
def maxMotorForce=(v) self[:maxMotorForce] = v end
|
|
971
976
|
def motorSpeed = self[:motorSpeed]
|
|
972
977
|
def motorSpeed=(v) self[:motorSpeed] = v end
|
|
973
|
-
def collideConnected = self[:collideConnected]
|
|
974
|
-
def collideConnected=(v) self[:collideConnected] = v end
|
|
975
|
-
def userData = self[:userData]
|
|
976
|
-
def userData=(v) self[:userData] = v end
|
|
977
978
|
def internalValue = self[:internalValue]
|
|
978
979
|
def internalValue=(v) self[:internalValue] = v end
|
|
979
|
-
def self.create_as(
|
|
980
|
+
def self.create_as(_base_, _enableSpring_, _hertz_, _dampingRatio_, _targetTranslation_, _enableLimit_, _lowerTranslation_, _upperTranslation_, _enableMotor_, _maxMotorForce_, _motorSpeed_, _internalValue_)
|
|
980
981
|
instance = PrismaticJointDef.new
|
|
981
|
-
instance[:
|
|
982
|
-
instance[:bodyIdB] = _bodyIdB_
|
|
983
|
-
instance[:localAnchorA] = _localAnchorA_
|
|
984
|
-
instance[:localAnchorB] = _localAnchorB_
|
|
985
|
-
instance[:localAxisA] = _localAxisA_
|
|
986
|
-
instance[:referenceAngle] = _referenceAngle_
|
|
982
|
+
instance[:base] = _base_
|
|
987
983
|
instance[:enableSpring] = _enableSpring_
|
|
988
984
|
instance[:hertz] = _hertz_
|
|
989
985
|
instance[:dampingRatio] = _dampingRatio_
|
|
986
|
+
instance[:targetTranslation] = _targetTranslation_
|
|
990
987
|
instance[:enableLimit] = _enableLimit_
|
|
991
988
|
instance[:lowerTranslation] = _lowerTranslation_
|
|
992
989
|
instance[:upperTranslation] = _upperTranslation_
|
|
993
990
|
instance[:enableMotor] = _enableMotor_
|
|
994
991
|
instance[:maxMotorForce] = _maxMotorForce_
|
|
995
992
|
instance[:motorSpeed] = _motorSpeed_
|
|
996
|
-
instance[:collideConnected] = _collideConnected_
|
|
997
|
-
instance[:userData] = _userData_
|
|
998
993
|
instance[:internalValue] = _internalValue_
|
|
999
994
|
instance
|
|
1000
995
|
end
|
|
@@ -1002,11 +997,8 @@ module Box2D
|
|
|
1002
997
|
|
|
1003
998
|
class RevoluteJointDef < FFI::Struct
|
|
1004
999
|
layout(
|
|
1005
|
-
:
|
|
1006
|
-
:
|
|
1007
|
-
:localAnchorA, Vec2,
|
|
1008
|
-
:localAnchorB, Vec2,
|
|
1009
|
-
:referenceAngle, :float,
|
|
1000
|
+
:base, JointDef,
|
|
1001
|
+
:targetAngle, :float,
|
|
1010
1002
|
:enableSpring, :bool,
|
|
1011
1003
|
:hertz, :float,
|
|
1012
1004
|
:dampingRatio, :float,
|
|
@@ -1016,21 +1008,12 @@ module Box2D
|
|
|
1016
1008
|
:enableMotor, :bool,
|
|
1017
1009
|
:maxMotorTorque, :float,
|
|
1018
1010
|
:motorSpeed, :float,
|
|
1019
|
-
:drawSize, :float,
|
|
1020
|
-
:collideConnected, :bool,
|
|
1021
|
-
:userData, :pointer,
|
|
1022
1011
|
:internalValue, :int,
|
|
1023
1012
|
)
|
|
1024
|
-
def
|
|
1025
|
-
def
|
|
1026
|
-
def
|
|
1027
|
-
def
|
|
1028
|
-
def localAnchorA = self[:localAnchorA]
|
|
1029
|
-
def localAnchorA=(v) self[:localAnchorA] = v end
|
|
1030
|
-
def localAnchorB = self[:localAnchorB]
|
|
1031
|
-
def localAnchorB=(v) self[:localAnchorB] = v end
|
|
1032
|
-
def referenceAngle = self[:referenceAngle]
|
|
1033
|
-
def referenceAngle=(v) self[:referenceAngle] = v end
|
|
1013
|
+
def base = self[:base]
|
|
1014
|
+
def base=(v) self[:base] = v end
|
|
1015
|
+
def targetAngle = self[:targetAngle]
|
|
1016
|
+
def targetAngle=(v) self[:targetAngle] = v end
|
|
1034
1017
|
def enableSpring = self[:enableSpring]
|
|
1035
1018
|
def enableSpring=(v) self[:enableSpring] = v end
|
|
1036
1019
|
def hertz = self[:hertz]
|
|
@@ -1049,21 +1032,12 @@ module Box2D
|
|
|
1049
1032
|
def maxMotorTorque=(v) self[:maxMotorTorque] = v end
|
|
1050
1033
|
def motorSpeed = self[:motorSpeed]
|
|
1051
1034
|
def motorSpeed=(v) self[:motorSpeed] = v end
|
|
1052
|
-
def drawSize = self[:drawSize]
|
|
1053
|
-
def drawSize=(v) self[:drawSize] = v end
|
|
1054
|
-
def collideConnected = self[:collideConnected]
|
|
1055
|
-
def collideConnected=(v) self[:collideConnected] = v end
|
|
1056
|
-
def userData = self[:userData]
|
|
1057
|
-
def userData=(v) self[:userData] = v end
|
|
1058
1035
|
def internalValue = self[:internalValue]
|
|
1059
1036
|
def internalValue=(v) self[:internalValue] = v end
|
|
1060
|
-
def self.create_as(
|
|
1037
|
+
def self.create_as(_base_, _targetAngle_, _enableSpring_, _hertz_, _dampingRatio_, _enableLimit_, _lowerAngle_, _upperAngle_, _enableMotor_, _maxMotorTorque_, _motorSpeed_, _internalValue_)
|
|
1061
1038
|
instance = RevoluteJointDef.new
|
|
1062
|
-
instance[:
|
|
1063
|
-
instance[:
|
|
1064
|
-
instance[:localAnchorA] = _localAnchorA_
|
|
1065
|
-
instance[:localAnchorB] = _localAnchorB_
|
|
1066
|
-
instance[:referenceAngle] = _referenceAngle_
|
|
1039
|
+
instance[:base] = _base_
|
|
1040
|
+
instance[:targetAngle] = _targetAngle_
|
|
1067
1041
|
instance[:enableSpring] = _enableSpring_
|
|
1068
1042
|
instance[:hertz] = _hertz_
|
|
1069
1043
|
instance[:dampingRatio] = _dampingRatio_
|
|
@@ -1073,9 +1047,6 @@ module Box2D
|
|
|
1073
1047
|
instance[:enableMotor] = _enableMotor_
|
|
1074
1048
|
instance[:maxMotorTorque] = _maxMotorTorque_
|
|
1075
1049
|
instance[:motorSpeed] = _motorSpeed_
|
|
1076
|
-
instance[:drawSize] = _drawSize_
|
|
1077
|
-
instance[:collideConnected] = _collideConnected_
|
|
1078
|
-
instance[:userData] = _userData_
|
|
1079
1050
|
instance[:internalValue] = _internalValue_
|
|
1080
1051
|
instance
|
|
1081
1052
|
end
|
|
@@ -1083,29 +1054,15 @@ module Box2D
|
|
|
1083
1054
|
|
|
1084
1055
|
class WeldJointDef < FFI::Struct
|
|
1085
1056
|
layout(
|
|
1086
|
-
:
|
|
1087
|
-
:bodyIdB, BodyId,
|
|
1088
|
-
:localAnchorA, Vec2,
|
|
1089
|
-
:localAnchorB, Vec2,
|
|
1090
|
-
:referenceAngle, :float,
|
|
1057
|
+
:base, JointDef,
|
|
1091
1058
|
:linearHertz, :float,
|
|
1092
1059
|
:angularHertz, :float,
|
|
1093
1060
|
:linearDampingRatio, :float,
|
|
1094
1061
|
:angularDampingRatio, :float,
|
|
1095
|
-
:collideConnected, :bool,
|
|
1096
|
-
:userData, :pointer,
|
|
1097
1062
|
:internalValue, :int,
|
|
1098
1063
|
)
|
|
1099
|
-
def
|
|
1100
|
-
def
|
|
1101
|
-
def bodyIdB = self[:bodyIdB]
|
|
1102
|
-
def bodyIdB=(v) self[:bodyIdB] = v end
|
|
1103
|
-
def localAnchorA = self[:localAnchorA]
|
|
1104
|
-
def localAnchorA=(v) self[:localAnchorA] = v end
|
|
1105
|
-
def localAnchorB = self[:localAnchorB]
|
|
1106
|
-
def localAnchorB=(v) self[:localAnchorB] = v end
|
|
1107
|
-
def referenceAngle = self[:referenceAngle]
|
|
1108
|
-
def referenceAngle=(v) self[:referenceAngle] = v end
|
|
1064
|
+
def base = self[:base]
|
|
1065
|
+
def base=(v) self[:base] = v end
|
|
1109
1066
|
def linearHertz = self[:linearHertz]
|
|
1110
1067
|
def linearHertz=(v) self[:linearHertz] = v end
|
|
1111
1068
|
def angularHertz = self[:angularHertz]
|
|
@@ -1114,25 +1071,15 @@ module Box2D
|
|
|
1114
1071
|
def linearDampingRatio=(v) self[:linearDampingRatio] = v end
|
|
1115
1072
|
def angularDampingRatio = self[:angularDampingRatio]
|
|
1116
1073
|
def angularDampingRatio=(v) self[:angularDampingRatio] = v end
|
|
1117
|
-
def collideConnected = self[:collideConnected]
|
|
1118
|
-
def collideConnected=(v) self[:collideConnected] = v end
|
|
1119
|
-
def userData = self[:userData]
|
|
1120
|
-
def userData=(v) self[:userData] = v end
|
|
1121
1074
|
def internalValue = self[:internalValue]
|
|
1122
1075
|
def internalValue=(v) self[:internalValue] = v end
|
|
1123
|
-
def self.create_as(
|
|
1076
|
+
def self.create_as(_base_, _linearHertz_, _angularHertz_, _linearDampingRatio_, _angularDampingRatio_, _internalValue_)
|
|
1124
1077
|
instance = WeldJointDef.new
|
|
1125
|
-
instance[:
|
|
1126
|
-
instance[:bodyIdB] = _bodyIdB_
|
|
1127
|
-
instance[:localAnchorA] = _localAnchorA_
|
|
1128
|
-
instance[:localAnchorB] = _localAnchorB_
|
|
1129
|
-
instance[:referenceAngle] = _referenceAngle_
|
|
1078
|
+
instance[:base] = _base_
|
|
1130
1079
|
instance[:linearHertz] = _linearHertz_
|
|
1131
1080
|
instance[:angularHertz] = _angularHertz_
|
|
1132
1081
|
instance[:linearDampingRatio] = _linearDampingRatio_
|
|
1133
1082
|
instance[:angularDampingRatio] = _angularDampingRatio_
|
|
1134
|
-
instance[:collideConnected] = _collideConnected_
|
|
1135
|
-
instance[:userData] = _userData_
|
|
1136
1083
|
instance[:internalValue] = _internalValue_
|
|
1137
1084
|
instance
|
|
1138
1085
|
end
|
|
@@ -1140,11 +1087,7 @@ module Box2D
|
|
|
1140
1087
|
|
|
1141
1088
|
class WheelJointDef < FFI::Struct
|
|
1142
1089
|
layout(
|
|
1143
|
-
:
|
|
1144
|
-
:bodyIdB, BodyId,
|
|
1145
|
-
:localAnchorA, Vec2,
|
|
1146
|
-
:localAnchorB, Vec2,
|
|
1147
|
-
:localAxisA, Vec2,
|
|
1090
|
+
:base, JointDef,
|
|
1148
1091
|
:enableSpring, :bool,
|
|
1149
1092
|
:hertz, :float,
|
|
1150
1093
|
:dampingRatio, :float,
|
|
@@ -1154,20 +1097,10 @@ module Box2D
|
|
|
1154
1097
|
:enableMotor, :bool,
|
|
1155
1098
|
:maxMotorTorque, :float,
|
|
1156
1099
|
:motorSpeed, :float,
|
|
1157
|
-
:collideConnected, :bool,
|
|
1158
|
-
:userData, :pointer,
|
|
1159
1100
|
:internalValue, :int,
|
|
1160
1101
|
)
|
|
1161
|
-
def
|
|
1162
|
-
def
|
|
1163
|
-
def bodyIdB = self[:bodyIdB]
|
|
1164
|
-
def bodyIdB=(v) self[:bodyIdB] = v end
|
|
1165
|
-
def localAnchorA = self[:localAnchorA]
|
|
1166
|
-
def localAnchorA=(v) self[:localAnchorA] = v end
|
|
1167
|
-
def localAnchorB = self[:localAnchorB]
|
|
1168
|
-
def localAnchorB=(v) self[:localAnchorB] = v end
|
|
1169
|
-
def localAxisA = self[:localAxisA]
|
|
1170
|
-
def localAxisA=(v) self[:localAxisA] = v end
|
|
1102
|
+
def base = self[:base]
|
|
1103
|
+
def base=(v) self[:base] = v end
|
|
1171
1104
|
def enableSpring = self[:enableSpring]
|
|
1172
1105
|
def enableSpring=(v) self[:enableSpring] = v end
|
|
1173
1106
|
def hertz = self[:hertz]
|
|
@@ -1186,19 +1119,11 @@ module Box2D
|
|
|
1186
1119
|
def maxMotorTorque=(v) self[:maxMotorTorque] = v end
|
|
1187
1120
|
def motorSpeed = self[:motorSpeed]
|
|
1188
1121
|
def motorSpeed=(v) self[:motorSpeed] = v end
|
|
1189
|
-
def collideConnected = self[:collideConnected]
|
|
1190
|
-
def collideConnected=(v) self[:collideConnected] = v end
|
|
1191
|
-
def userData = self[:userData]
|
|
1192
|
-
def userData=(v) self[:userData] = v end
|
|
1193
1122
|
def internalValue = self[:internalValue]
|
|
1194
1123
|
def internalValue=(v) self[:internalValue] = v end
|
|
1195
|
-
def self.create_as(
|
|
1124
|
+
def self.create_as(_base_, _enableSpring_, _hertz_, _dampingRatio_, _enableLimit_, _lowerTranslation_, _upperTranslation_, _enableMotor_, _maxMotorTorque_, _motorSpeed_, _internalValue_)
|
|
1196
1125
|
instance = WheelJointDef.new
|
|
1197
|
-
instance[:
|
|
1198
|
-
instance[:bodyIdB] = _bodyIdB_
|
|
1199
|
-
instance[:localAnchorA] = _localAnchorA_
|
|
1200
|
-
instance[:localAnchorB] = _localAnchorB_
|
|
1201
|
-
instance[:localAxisA] = _localAxisA_
|
|
1126
|
+
instance[:base] = _base_
|
|
1202
1127
|
instance[:enableSpring] = _enableSpring_
|
|
1203
1128
|
instance[:hertz] = _hertz_
|
|
1204
1129
|
instance[:dampingRatio] = _dampingRatio_
|
|
@@ -1208,8 +1133,6 @@ module Box2D
|
|
|
1208
1133
|
instance[:enableMotor] = _enableMotor_
|
|
1209
1134
|
instance[:maxMotorTorque] = _maxMotorTorque_
|
|
1210
1135
|
instance[:motorSpeed] = _motorSpeed_
|
|
1211
|
-
instance[:collideConnected] = _collideConnected_
|
|
1212
|
-
instance[:userData] = _userData_
|
|
1213
1136
|
instance[:internalValue] = _internalValue_
|
|
1214
1137
|
instance
|
|
1215
1138
|
end
|
|
@@ -1307,19 +1230,19 @@ module Box2D
|
|
|
1307
1230
|
layout(
|
|
1308
1231
|
:shapeIdA, ShapeId,
|
|
1309
1232
|
:shapeIdB, ShapeId,
|
|
1310
|
-
:
|
|
1233
|
+
:contactId, ContactId,
|
|
1311
1234
|
)
|
|
1312
1235
|
def shapeIdA = self[:shapeIdA]
|
|
1313
1236
|
def shapeIdA=(v) self[:shapeIdA] = v end
|
|
1314
1237
|
def shapeIdB = self[:shapeIdB]
|
|
1315
1238
|
def shapeIdB=(v) self[:shapeIdB] = v end
|
|
1316
|
-
def
|
|
1317
|
-
def
|
|
1318
|
-
def self.create_as(_shapeIdA_, _shapeIdB_,
|
|
1239
|
+
def contactId = self[:contactId]
|
|
1240
|
+
def contactId=(v) self[:contactId] = v end
|
|
1241
|
+
def self.create_as(_shapeIdA_, _shapeIdB_, _contactId_)
|
|
1319
1242
|
instance = ContactBeginTouchEvent.new
|
|
1320
1243
|
instance[:shapeIdA] = _shapeIdA_
|
|
1321
1244
|
instance[:shapeIdB] = _shapeIdB_
|
|
1322
|
-
instance[:
|
|
1245
|
+
instance[:contactId] = _contactId_
|
|
1323
1246
|
instance
|
|
1324
1247
|
end
|
|
1325
1248
|
end
|
|
@@ -1328,15 +1251,19 @@ module Box2D
|
|
|
1328
1251
|
layout(
|
|
1329
1252
|
:shapeIdA, ShapeId,
|
|
1330
1253
|
:shapeIdB, ShapeId,
|
|
1254
|
+
:contactId, ContactId,
|
|
1331
1255
|
)
|
|
1332
1256
|
def shapeIdA = self[:shapeIdA]
|
|
1333
1257
|
def shapeIdA=(v) self[:shapeIdA] = v end
|
|
1334
1258
|
def shapeIdB = self[:shapeIdB]
|
|
1335
1259
|
def shapeIdB=(v) self[:shapeIdB] = v end
|
|
1336
|
-
def self
|
|
1260
|
+
def contactId = self[:contactId]
|
|
1261
|
+
def contactId=(v) self[:contactId] = v end
|
|
1262
|
+
def self.create_as(_shapeIdA_, _shapeIdB_, _contactId_)
|
|
1337
1263
|
instance = ContactEndTouchEvent.new
|
|
1338
1264
|
instance[:shapeIdA] = _shapeIdA_
|
|
1339
1265
|
instance[:shapeIdB] = _shapeIdB_
|
|
1266
|
+
instance[:contactId] = _contactId_
|
|
1340
1267
|
instance
|
|
1341
1268
|
end
|
|
1342
1269
|
end
|
|
@@ -1345,6 +1272,7 @@ module Box2D
|
|
|
1345
1272
|
layout(
|
|
1346
1273
|
:shapeIdA, ShapeId,
|
|
1347
1274
|
:shapeIdB, ShapeId,
|
|
1275
|
+
:contactId, ContactId,
|
|
1348
1276
|
:point, Vec2,
|
|
1349
1277
|
:normal, Vec2,
|
|
1350
1278
|
:approachSpeed, :float,
|
|
@@ -1353,16 +1281,19 @@ module Box2D
|
|
|
1353
1281
|
def shapeIdA=(v) self[:shapeIdA] = v end
|
|
1354
1282
|
def shapeIdB = self[:shapeIdB]
|
|
1355
1283
|
def shapeIdB=(v) self[:shapeIdB] = v end
|
|
1284
|
+
def contactId = self[:contactId]
|
|
1285
|
+
def contactId=(v) self[:contactId] = v end
|
|
1356
1286
|
def point = self[:point]
|
|
1357
1287
|
def point=(v) self[:point] = v end
|
|
1358
1288
|
def normal = self[:normal]
|
|
1359
1289
|
def normal=(v) self[:normal] = v end
|
|
1360
1290
|
def approachSpeed = self[:approachSpeed]
|
|
1361
1291
|
def approachSpeed=(v) self[:approachSpeed] = v end
|
|
1362
|
-
def self.create_as(_shapeIdA_, _shapeIdB_, _point_, _normal_, _approachSpeed_)
|
|
1292
|
+
def self.create_as(_shapeIdA_, _shapeIdB_, _contactId_, _point_, _normal_, _approachSpeed_)
|
|
1363
1293
|
instance = ContactHitEvent.new
|
|
1364
1294
|
instance[:shapeIdA] = _shapeIdA_
|
|
1365
1295
|
instance[:shapeIdB] = _shapeIdB_
|
|
1296
|
+
instance[:contactId] = _contactId_
|
|
1366
1297
|
instance[:point] = _point_
|
|
1367
1298
|
instance[:normal] = _normal_
|
|
1368
1299
|
instance[:approachSpeed] = _approachSpeed_
|
|
@@ -1405,24 +1336,24 @@ module Box2D
|
|
|
1405
1336
|
|
|
1406
1337
|
class BodyMoveEvent < FFI::Struct
|
|
1407
1338
|
layout(
|
|
1339
|
+
:userData, :pointer,
|
|
1408
1340
|
:transform, Transform,
|
|
1409
1341
|
:bodyId, BodyId,
|
|
1410
|
-
:userData, :pointer,
|
|
1411
1342
|
:fellAsleep, :bool,
|
|
1412
1343
|
)
|
|
1344
|
+
def userData = self[:userData]
|
|
1345
|
+
def userData=(v) self[:userData] = v end
|
|
1413
1346
|
def transform = self[:transform]
|
|
1414
1347
|
def transform=(v) self[:transform] = v end
|
|
1415
1348
|
def bodyId = self[:bodyId]
|
|
1416
1349
|
def bodyId=(v) self[:bodyId] = v end
|
|
1417
|
-
def userData = self[:userData]
|
|
1418
|
-
def userData=(v) self[:userData] = v end
|
|
1419
1350
|
def fellAsleep = self[:fellAsleep]
|
|
1420
1351
|
def fellAsleep=(v) self[:fellAsleep] = v end
|
|
1421
|
-
def self.create_as(_transform_, _bodyId_,
|
|
1352
|
+
def self.create_as(_userData_, _transform_, _bodyId_, _fellAsleep_)
|
|
1422
1353
|
instance = BodyMoveEvent.new
|
|
1354
|
+
instance[:userData] = _userData_
|
|
1423
1355
|
instance[:transform] = _transform_
|
|
1424
1356
|
instance[:bodyId] = _bodyId_
|
|
1425
|
-
instance[:userData] = _userData_
|
|
1426
1357
|
instance[:fellAsleep] = _fellAsleep_
|
|
1427
1358
|
instance
|
|
1428
1359
|
end
|
|
@@ -1445,20 +1376,58 @@ module Box2D
|
|
|
1445
1376
|
end
|
|
1446
1377
|
end
|
|
1447
1378
|
|
|
1379
|
+
class JointEvent < FFI::Struct
|
|
1380
|
+
layout(
|
|
1381
|
+
:jointId, JointId,
|
|
1382
|
+
:userData, :pointer,
|
|
1383
|
+
)
|
|
1384
|
+
def jointId = self[:jointId]
|
|
1385
|
+
def jointId=(v) self[:jointId] = v end
|
|
1386
|
+
def userData = self[:userData]
|
|
1387
|
+
def userData=(v) self[:userData] = v end
|
|
1388
|
+
def self.create_as(_jointId_, _userData_)
|
|
1389
|
+
instance = JointEvent.new
|
|
1390
|
+
instance[:jointId] = _jointId_
|
|
1391
|
+
instance[:userData] = _userData_
|
|
1392
|
+
instance
|
|
1393
|
+
end
|
|
1394
|
+
end
|
|
1395
|
+
|
|
1396
|
+
class JointEvents < FFI::Struct
|
|
1397
|
+
layout(
|
|
1398
|
+
:jointEvents, :pointer,
|
|
1399
|
+
:count, :int,
|
|
1400
|
+
)
|
|
1401
|
+
def jointEvents = self[:jointEvents]
|
|
1402
|
+
def jointEvents=(v) self[:jointEvents] = v end
|
|
1403
|
+
def count = self[:count]
|
|
1404
|
+
def count=(v) self[:count] = v end
|
|
1405
|
+
def self.create_as(_jointEvents_, _count_)
|
|
1406
|
+
instance = JointEvents.new
|
|
1407
|
+
instance[:jointEvents] = _jointEvents_
|
|
1408
|
+
instance[:count] = _count_
|
|
1409
|
+
instance
|
|
1410
|
+
end
|
|
1411
|
+
end
|
|
1412
|
+
|
|
1448
1413
|
class ContactData < FFI::Struct
|
|
1449
1414
|
layout(
|
|
1415
|
+
:contactId, ContactId,
|
|
1450
1416
|
:shapeIdA, ShapeId,
|
|
1451
1417
|
:shapeIdB, ShapeId,
|
|
1452
1418
|
:manifold, Manifold,
|
|
1453
1419
|
)
|
|
1420
|
+
def contactId = self[:contactId]
|
|
1421
|
+
def contactId=(v) self[:contactId] = v end
|
|
1454
1422
|
def shapeIdA = self[:shapeIdA]
|
|
1455
1423
|
def shapeIdA=(v) self[:shapeIdA] = v end
|
|
1456
1424
|
def shapeIdB = self[:shapeIdB]
|
|
1457
1425
|
def shapeIdB=(v) self[:shapeIdB] = v end
|
|
1458
1426
|
def manifold = self[:manifold]
|
|
1459
1427
|
def manifold=(v) self[:manifold] = v end
|
|
1460
|
-
def self.create_as(_shapeIdA_, _shapeIdB_, _manifold_)
|
|
1428
|
+
def self.create_as(_contactId_, _shapeIdA_, _shapeIdB_, _manifold_)
|
|
1461
1429
|
instance = ContactData.new
|
|
1430
|
+
instance[:contactId] = _contactId_
|
|
1462
1431
|
instance[:shapeIdA] = _shapeIdA_
|
|
1463
1432
|
instance[:shapeIdB] = _shapeIdB_
|
|
1464
1433
|
instance[:manifold] = _manifold_
|
|
@@ -1473,24 +1442,25 @@ module Box2D
|
|
|
1473
1442
|
:DrawCircleFcn, :pointer,
|
|
1474
1443
|
:DrawSolidCircleFcn, :pointer,
|
|
1475
1444
|
:DrawSolidCapsuleFcn, :pointer,
|
|
1476
|
-
:
|
|
1445
|
+
:DrawLineFcn, :pointer,
|
|
1477
1446
|
:DrawTransformFcn, :pointer,
|
|
1478
1447
|
:DrawPointFcn, :pointer,
|
|
1479
1448
|
:DrawStringFcn, :pointer,
|
|
1480
1449
|
:drawingBounds, AABB,
|
|
1481
|
-
:
|
|
1450
|
+
:forceScale, :float,
|
|
1451
|
+
:jointScale, :float,
|
|
1482
1452
|
:drawShapes, :bool,
|
|
1483
1453
|
:drawJoints, :bool,
|
|
1484
1454
|
:drawJointExtras, :bool,
|
|
1485
1455
|
:drawBounds, :bool,
|
|
1486
1456
|
:drawMass, :bool,
|
|
1487
1457
|
:drawBodyNames, :bool,
|
|
1488
|
-
:
|
|
1458
|
+
:drawContactPoints, :bool,
|
|
1489
1459
|
:drawGraphColors, :bool,
|
|
1490
|
-
:drawContactNormals, :bool,
|
|
1491
|
-
:drawContactImpulses, :bool,
|
|
1492
1460
|
:drawContactFeatures, :bool,
|
|
1493
|
-
:
|
|
1461
|
+
:drawContactNormals, :bool,
|
|
1462
|
+
:drawContactForces, :bool,
|
|
1463
|
+
:drawFrictionForces, :bool,
|
|
1494
1464
|
:drawIslands, :bool,
|
|
1495
1465
|
:context, :pointer,
|
|
1496
1466
|
)
|
|
@@ -1504,8 +1474,8 @@ module Box2D
|
|
|
1504
1474
|
def DrawSolidCircleFcn=(v) self[:DrawSolidCircleFcn] = v end
|
|
1505
1475
|
def DrawSolidCapsuleFcn = self[:DrawSolidCapsuleFcn]
|
|
1506
1476
|
def DrawSolidCapsuleFcn=(v) self[:DrawSolidCapsuleFcn] = v end
|
|
1507
|
-
def
|
|
1508
|
-
def
|
|
1477
|
+
def DrawLineFcn = self[:DrawLineFcn]
|
|
1478
|
+
def DrawLineFcn=(v) self[:DrawLineFcn] = v end
|
|
1509
1479
|
def DrawTransformFcn = self[:DrawTransformFcn]
|
|
1510
1480
|
def DrawTransformFcn=(v) self[:DrawTransformFcn] = v end
|
|
1511
1481
|
def DrawPointFcn = self[:DrawPointFcn]
|
|
@@ -1514,8 +1484,10 @@ module Box2D
|
|
|
1514
1484
|
def DrawStringFcn=(v) self[:DrawStringFcn] = v end
|
|
1515
1485
|
def drawingBounds = self[:drawingBounds]
|
|
1516
1486
|
def drawingBounds=(v) self[:drawingBounds] = v end
|
|
1517
|
-
def
|
|
1518
|
-
def
|
|
1487
|
+
def forceScale = self[:forceScale]
|
|
1488
|
+
def forceScale=(v) self[:forceScale] = v end
|
|
1489
|
+
def jointScale = self[:jointScale]
|
|
1490
|
+
def jointScale=(v) self[:jointScale] = v end
|
|
1519
1491
|
def drawShapes = self[:drawShapes]
|
|
1520
1492
|
def drawShapes=(v) self[:drawShapes] = v end
|
|
1521
1493
|
def drawJoints = self[:drawJoints]
|
|
@@ -1528,47 +1500,48 @@ module Box2D
|
|
|
1528
1500
|
def drawMass=(v) self[:drawMass] = v end
|
|
1529
1501
|
def drawBodyNames = self[:drawBodyNames]
|
|
1530
1502
|
def drawBodyNames=(v) self[:drawBodyNames] = v end
|
|
1531
|
-
def
|
|
1532
|
-
def
|
|
1503
|
+
def drawContactPoints = self[:drawContactPoints]
|
|
1504
|
+
def drawContactPoints=(v) self[:drawContactPoints] = v end
|
|
1533
1505
|
def drawGraphColors = self[:drawGraphColors]
|
|
1534
1506
|
def drawGraphColors=(v) self[:drawGraphColors] = v end
|
|
1535
|
-
def drawContactNormals = self[:drawContactNormals]
|
|
1536
|
-
def drawContactNormals=(v) self[:drawContactNormals] = v end
|
|
1537
|
-
def drawContactImpulses = self[:drawContactImpulses]
|
|
1538
|
-
def drawContactImpulses=(v) self[:drawContactImpulses] = v end
|
|
1539
1507
|
def drawContactFeatures = self[:drawContactFeatures]
|
|
1540
1508
|
def drawContactFeatures=(v) self[:drawContactFeatures] = v end
|
|
1541
|
-
def
|
|
1542
|
-
def
|
|
1509
|
+
def drawContactNormals = self[:drawContactNormals]
|
|
1510
|
+
def drawContactNormals=(v) self[:drawContactNormals] = v end
|
|
1511
|
+
def drawContactForces = self[:drawContactForces]
|
|
1512
|
+
def drawContactForces=(v) self[:drawContactForces] = v end
|
|
1513
|
+
def drawFrictionForces = self[:drawFrictionForces]
|
|
1514
|
+
def drawFrictionForces=(v) self[:drawFrictionForces] = v end
|
|
1543
1515
|
def drawIslands = self[:drawIslands]
|
|
1544
1516
|
def drawIslands=(v) self[:drawIslands] = v end
|
|
1545
1517
|
def context = self[:context]
|
|
1546
1518
|
def context=(v) self[:context] = v end
|
|
1547
|
-
def self.create_as(_DrawPolygonFcn_, _DrawSolidPolygonFcn_, _DrawCircleFcn_, _DrawSolidCircleFcn_, _DrawSolidCapsuleFcn_,
|
|
1519
|
+
def self.create_as(_DrawPolygonFcn_, _DrawSolidPolygonFcn_, _DrawCircleFcn_, _DrawSolidCircleFcn_, _DrawSolidCapsuleFcn_, _DrawLineFcn_, _DrawTransformFcn_, _DrawPointFcn_, _DrawStringFcn_, _drawingBounds_, _forceScale_, _jointScale_, _drawShapes_, _drawJoints_, _drawJointExtras_, _drawBounds_, _drawMass_, _drawBodyNames_, _drawContactPoints_, _drawGraphColors_, _drawContactFeatures_, _drawContactNormals_, _drawContactForces_, _drawFrictionForces_, _drawIslands_, _context_)
|
|
1548
1520
|
instance = DebugDraw.new
|
|
1549
1521
|
instance[:DrawPolygonFcn] = _DrawPolygonFcn_
|
|
1550
1522
|
instance[:DrawSolidPolygonFcn] = _DrawSolidPolygonFcn_
|
|
1551
1523
|
instance[:DrawCircleFcn] = _DrawCircleFcn_
|
|
1552
1524
|
instance[:DrawSolidCircleFcn] = _DrawSolidCircleFcn_
|
|
1553
1525
|
instance[:DrawSolidCapsuleFcn] = _DrawSolidCapsuleFcn_
|
|
1554
|
-
instance[:
|
|
1526
|
+
instance[:DrawLineFcn] = _DrawLineFcn_
|
|
1555
1527
|
instance[:DrawTransformFcn] = _DrawTransformFcn_
|
|
1556
1528
|
instance[:DrawPointFcn] = _DrawPointFcn_
|
|
1557
1529
|
instance[:DrawStringFcn] = _DrawStringFcn_
|
|
1558
1530
|
instance[:drawingBounds] = _drawingBounds_
|
|
1559
|
-
instance[:
|
|
1531
|
+
instance[:forceScale] = _forceScale_
|
|
1532
|
+
instance[:jointScale] = _jointScale_
|
|
1560
1533
|
instance[:drawShapes] = _drawShapes_
|
|
1561
1534
|
instance[:drawJoints] = _drawJoints_
|
|
1562
1535
|
instance[:drawJointExtras] = _drawJointExtras_
|
|
1563
1536
|
instance[:drawBounds] = _drawBounds_
|
|
1564
1537
|
instance[:drawMass] = _drawMass_
|
|
1565
1538
|
instance[:drawBodyNames] = _drawBodyNames_
|
|
1566
|
-
instance[:
|
|
1539
|
+
instance[:drawContactPoints] = _drawContactPoints_
|
|
1567
1540
|
instance[:drawGraphColors] = _drawGraphColors_
|
|
1568
|
-
instance[:drawContactNormals] = _drawContactNormals_
|
|
1569
|
-
instance[:drawContactImpulses] = _drawContactImpulses_
|
|
1570
1541
|
instance[:drawContactFeatures] = _drawContactFeatures_
|
|
1571
|
-
instance[:
|
|
1542
|
+
instance[:drawContactNormals] = _drawContactNormals_
|
|
1543
|
+
instance[:drawContactForces] = _drawContactForces_
|
|
1544
|
+
instance[:drawFrictionForces] = _drawFrictionForces_
|
|
1572
1545
|
instance[:drawIslands] = _drawIslands_
|
|
1573
1546
|
instance[:context] = _context_
|
|
1574
1547
|
instance
|
|
@@ -1589,7 +1562,6 @@ module Box2D
|
|
|
1589
1562
|
[:DefaultChainDef, :b2DefaultChainDef, [], ChainDef.by_value],
|
|
1590
1563
|
[:DefaultDistanceJointDef, :b2DefaultDistanceJointDef, [], DistanceJointDef.by_value],
|
|
1591
1564
|
[:DefaultMotorJointDef, :b2DefaultMotorJointDef, [], MotorJointDef.by_value],
|
|
1592
|
-
[:DefaultMouseJointDef, :b2DefaultMouseJointDef, [], MouseJointDef.by_value],
|
|
1593
1565
|
[:DefaultFilterJointDef, :b2DefaultFilterJointDef, [], FilterJointDef.by_value],
|
|
1594
1566
|
[:DefaultPrismaticJointDef, :b2DefaultPrismaticJointDef, [], PrismaticJointDef.by_value],
|
|
1595
1567
|
[:DefaultRevoluteJointDef, :b2DefaultRevoluteJointDef, [], RevoluteJointDef.by_value],
|