chipmunk 5.2.2 → 5.3.4.0

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.
Files changed (67) hide show
  1. data/LICENSE +21 -19
  2. data/README +67 -60
  3. data/Rakefile +85 -50
  4. data/ext/chipmunk/extconf.rb +42 -35
  5. data/ext/chipmunk/rb_chipmunk.c +250 -125
  6. data/ext/chipmunk/rb_chipmunk.h +105 -96
  7. data/ext/chipmunk/rb_cpArbiter.c +253 -225
  8. data/ext/chipmunk/rb_cpBB.c +210 -174
  9. data/ext/chipmunk/rb_cpBody.c +504 -347
  10. data/ext/chipmunk/rb_cpConstraint.c +336 -346
  11. data/ext/chipmunk/rb_cpShape.c +433 -455
  12. data/ext/chipmunk/rb_cpSpace.c +711 -544
  13. data/ext/chipmunk/rb_cpVect.c +346 -321
  14. data/lib/chipmunk.rb +183 -30
  15. metadata +12 -66
  16. data/ext/chipmunk/chipmunk.c +0 -105
  17. data/ext/chipmunk/cpArbiter.c +0 -274
  18. data/ext/chipmunk/cpArray.c +0 -128
  19. data/ext/chipmunk/cpBB.c +0 -47
  20. data/ext/chipmunk/cpBody.c +0 -188
  21. data/ext/chipmunk/cpCollision.c +0 -391
  22. data/ext/chipmunk/cpConstraint.c +0 -54
  23. data/ext/chipmunk/cpDampedRotarySpring.c +0 -106
  24. data/ext/chipmunk/cpDampedSpring.c +0 -117
  25. data/ext/chipmunk/cpGearJoint.c +0 -114
  26. data/ext/chipmunk/cpGrooveJoint.c +0 -138
  27. data/ext/chipmunk/cpHashSet.c +0 -253
  28. data/ext/chipmunk/cpPinJoint.c +0 -117
  29. data/ext/chipmunk/cpPivotJoint.c +0 -114
  30. data/ext/chipmunk/cpPolyShape.c +0 -241
  31. data/ext/chipmunk/cpRatchetJoint.c +0 -128
  32. data/ext/chipmunk/cpRotaryLimitJoint.c +0 -122
  33. data/ext/chipmunk/cpShape.c +0 -400
  34. data/ext/chipmunk/cpSimpleMotor.c +0 -99
  35. data/ext/chipmunk/cpSlideJoint.c +0 -131
  36. data/ext/chipmunk/cpSpace.c +0 -899
  37. data/ext/chipmunk/cpSpaceHash.c +0 -541
  38. data/ext/chipmunk/cpVect.c +0 -71
  39. data/ext/chipmunk/include/chipmunk/chipmunk.h +0 -148
  40. data/ext/chipmunk/include/chipmunk/chipmunk_ffi.h +0 -42
  41. data/ext/chipmunk/include/chipmunk/chipmunk_types.h +0 -80
  42. data/ext/chipmunk/include/chipmunk/chipmunk_unsafe.h +0 -54
  43. data/ext/chipmunk/include/chipmunk/constraints/cpConstraint.h +0 -92
  44. data/ext/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h +0 -46
  45. data/ext/chipmunk/include/chipmunk/constraints/cpDampedSpring.h +0 -53
  46. data/ext/chipmunk/include/chipmunk/constraints/cpGearJoint.h +0 -41
  47. data/ext/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h +0 -44
  48. data/ext/chipmunk/include/chipmunk/constraints/cpPinJoint.h +0 -43
  49. data/ext/chipmunk/include/chipmunk/constraints/cpPivotJoint.h +0 -42
  50. data/ext/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h +0 -40
  51. data/ext/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h +0 -39
  52. data/ext/chipmunk/include/chipmunk/constraints/cpSimpleMotor.h +0 -37
  53. data/ext/chipmunk/include/chipmunk/constraints/cpSlideJoint.h +0 -44
  54. data/ext/chipmunk/include/chipmunk/constraints/util.h +0 -116
  55. data/ext/chipmunk/include/chipmunk/cpArbiter.h +0 -136
  56. data/ext/chipmunk/include/chipmunk/cpArray.h +0 -46
  57. data/ext/chipmunk/include/chipmunk/cpBB.h +0 -74
  58. data/ext/chipmunk/include/chipmunk/cpBody.h +0 -160
  59. data/ext/chipmunk/include/chipmunk/cpCollision.h +0 -23
  60. data/ext/chipmunk/include/chipmunk/cpHashSet.h +0 -82
  61. data/ext/chipmunk/include/chipmunk/cpPolyShape.h +0 -103
  62. data/ext/chipmunk/include/chipmunk/cpShape.h +0 -174
  63. data/ext/chipmunk/include/chipmunk/cpSpace.h +0 -180
  64. data/ext/chipmunk/include/chipmunk/cpSpaceHash.h +0 -109
  65. data/ext/chipmunk/include/chipmunk/cpVect.h +0 -157
  66. data/ext/chipmunk/prime.h +0 -68
  67. data/lib/chipmunk/version.rb +0 -3
@@ -1,253 +0,0 @@
1
- /* Copyright (c) 2007 Scott Lembcke
2
- *
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy
4
- * of this software and associated documentation files (the "Software"), to deal
5
- * in the Software without restriction, including without limitation the rights
6
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- * copies of the Software, and to permit persons to whom the Software is
8
- * furnished to do so, subject to the following conditions:
9
- *
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- * SOFTWARE.
20
- */
21
-
22
- #include <stdlib.h>
23
- #include <assert.h>
24
-
25
- #include "chipmunk.h"
26
- #include "prime.h"
27
-
28
- static void freeWrap(void *ptr, void *unused){cpfree(ptr);}
29
-
30
- void
31
- cpHashSetDestroy(cpHashSet *set)
32
- {
33
- // Free the table.
34
- cpfree(set->table);
35
-
36
- cpArrayEach(set->allocatedBuffers, freeWrap, NULL);
37
- cpArrayFree(set->allocatedBuffers);
38
- }
39
-
40
- void
41
- cpHashSetFree(cpHashSet *set)
42
- {
43
- if(set){
44
- cpHashSetDestroy(set);
45
- cpfree(set);
46
- }
47
- }
48
-
49
- cpHashSet *
50
- cpHashSetAlloc(void)
51
- {
52
- return (cpHashSet *)cpcalloc(1, sizeof(cpHashSet));
53
- }
54
-
55
- cpHashSet *
56
- cpHashSetInit(cpHashSet *set, int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans)
57
- {
58
- set->size = next_prime(size);
59
- set->entries = 0;
60
-
61
- set->eql = eqlFunc;
62
- set->trans = trans;
63
-
64
- set->default_value = NULL;
65
-
66
- set->table = (cpHashSetBin **)cpcalloc(set->size, sizeof(cpHashSetBin *));
67
- set->pooledBins = NULL;
68
-
69
- set->allocatedBuffers = cpArrayNew(0);
70
-
71
- return set;
72
- }
73
-
74
- cpHashSet *
75
- cpHashSetNew(int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans)
76
- {
77
- return cpHashSetInit(cpHashSetAlloc(), size, eqlFunc, trans);
78
- }
79
-
80
- static int
81
- setIsFull(cpHashSet *set)
82
- {
83
- return (set->entries >= set->size);
84
- }
85
-
86
- static void
87
- cpHashSetResize(cpHashSet *set)
88
- {
89
- // Get the next approximate doubled prime.
90
- int newSize = next_prime(set->size + 1);
91
- // Allocate a new table.
92
- cpHashSetBin **newTable = (cpHashSetBin **)cpcalloc(newSize, sizeof(cpHashSetBin *));
93
-
94
- // Iterate over the chains.
95
- for(int i=0; i<set->size; i++){
96
- // Rehash the bins into the new table.
97
- cpHashSetBin *bin = set->table[i];
98
- while(bin){
99
- cpHashSetBin *next = bin->next;
100
-
101
- int idx = bin->hash%newSize;
102
- bin->next = newTable[idx];
103
- newTable[idx] = bin;
104
-
105
- bin = next;
106
- }
107
- }
108
-
109
- cpfree(set->table);
110
-
111
- set->table = newTable;
112
- set->size = newSize;
113
- }
114
-
115
- static inline void
116
- recycleBin(cpHashSet *set, cpHashSetBin *bin)
117
- {
118
- bin->next = set->pooledBins;
119
- set->pooledBins = bin;
120
- bin->elt = NULL;
121
- }
122
-
123
- static cpHashSetBin *
124
- getUnusedBin(cpHashSet *set)
125
- {
126
- cpHashSetBin *bin = set->pooledBins;
127
-
128
- if(bin){
129
- set->pooledBins = bin->next;
130
- return bin;
131
- } else {
132
- // Pool is exhausted, make more
133
- int count = CP_BUFFER_BYTES/sizeof(cpHashSetBin);
134
- cpAssert(count, "Buffer size is too small.");
135
-
136
- cpHashSetBin *buffer = (cpHashSetBin *)cpmalloc(CP_BUFFER_BYTES);
137
- cpArrayPush(set->allocatedBuffers, buffer);
138
-
139
- // push all but the first one, return the first instead
140
- for(int i=1; i<count; i++) recycleBin(set, buffer + i);
141
- return buffer;
142
- }
143
- }
144
-
145
- void *
146
- cpHashSetInsert(cpHashSet *set, cpHashValue hash, void *ptr, void *data)
147
- {
148
- int idx = hash%set->size;
149
-
150
- // Find the bin with the matching element.
151
- cpHashSetBin *bin = set->table[idx];
152
- while(bin && !set->eql(ptr, bin->elt))
153
- bin = bin->next;
154
-
155
- // Create it necessary.
156
- if(!bin){
157
- bin = getUnusedBin(set);
158
- bin->hash = hash;
159
- bin->elt = set->trans(ptr, data); // Transform the pointer.
160
-
161
- bin->next = set->table[idx];
162
- set->table[idx] = bin;
163
-
164
- set->entries++;
165
-
166
- // Resize the set if it's full.
167
- if(setIsFull(set))
168
- cpHashSetResize(set);
169
- }
170
-
171
- return bin->elt;
172
- }
173
-
174
- void *
175
- cpHashSetRemove(cpHashSet *set, cpHashValue hash, void *ptr)
176
- {
177
- int idx = hash%set->size;
178
-
179
- // Pointer to the previous bin pointer.
180
- cpHashSetBin **prev_ptr = &set->table[idx];
181
- // Pointer the the current bin.
182
- cpHashSetBin *bin = set->table[idx];
183
-
184
- // Find the bin
185
- while(bin && !set->eql(ptr, bin->elt)){
186
- prev_ptr = &bin->next;
187
- bin = bin->next;
188
- }
189
-
190
- // Remove it if it exists.
191
- if(bin){
192
- // Update the previous bin pointer to point to the next bin.
193
- (*prev_ptr) = bin->next;
194
- set->entries--;
195
-
196
- void *return_value = bin->elt;
197
-
198
- recycleBin(set, bin);
199
-
200
- return return_value;
201
- }
202
-
203
- return NULL;
204
- }
205
-
206
- void *
207
- cpHashSetFind(cpHashSet *set, cpHashValue hash, void *ptr)
208
- {
209
- int idx = hash%set->size;
210
- cpHashSetBin *bin = set->table[idx];
211
- while(bin && !set->eql(ptr, bin->elt))
212
- bin = bin->next;
213
-
214
- return (bin ? bin->elt : set->default_value);
215
- }
216
-
217
- void
218
- cpHashSetEach(cpHashSet *set, cpHashSetIterFunc func, void *data)
219
- {
220
- for(int i=0; i<set->size; i++){
221
- cpHashSetBin *bin = set->table[i];
222
- while(bin){
223
- cpHashSetBin *next = bin->next;
224
- func(bin->elt, data);
225
- bin = next;
226
- }
227
- }
228
- }
229
-
230
- void
231
- cpHashSetFilter(cpHashSet *set, cpHashSetFilterFunc func, void *data)
232
- {
233
- // Iterate over all the chains.
234
- for(int i=0; i<set->size; i++){
235
- // The rest works similarly to cpHashSetRemove() above.
236
- cpHashSetBin **prev_ptr = &set->table[i];
237
- cpHashSetBin *bin = set->table[i];
238
- while(bin){
239
- cpHashSetBin *next = bin->next;
240
-
241
- if(func(bin->elt, data)){
242
- prev_ptr = &bin->next;
243
- } else {
244
- (*prev_ptr) = next;
245
-
246
- set->entries--;
247
- recycleBin(set, bin);
248
- }
249
-
250
- bin = next;
251
- }
252
- }
253
- }
@@ -1,117 +0,0 @@
1
- /* Copyright (c) 2007 Scott Lembcke
2
- *
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy
4
- * of this software and associated documentation files (the "Software"), to deal
5
- * in the Software without restriction, including without limitation the rights
6
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- * copies of the Software, and to permit persons to whom the Software is
8
- * furnished to do so, subject to the following conditions:
9
- *
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- * SOFTWARE.
20
- */
21
-
22
- #include <stdlib.h>
23
- //#include <math.h>
24
-
25
- #include "chipmunk.h"
26
- #include "constraints/util.h"
27
-
28
- static void
29
- preStep(cpPinJoint *joint, cpFloat dt, cpFloat dt_inv)
30
- {
31
- cpBody *a = joint->constraint.a;
32
- cpBody *b = joint->constraint.b;
33
-
34
- joint->r1 = cpvrotate(joint->anchr1, a->rot);
35
- joint->r2 = cpvrotate(joint->anchr2, b->rot);
36
-
37
- cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1));
38
- cpFloat dist = cpvlength(delta);
39
- joint->n = cpvmult(delta, 1.0f/(dist ? dist : (cpFloat)INFINITY));
40
-
41
- // calculate mass normal
42
- joint->nMass = 1.0f/k_scalar(a, b, joint->r1, joint->r2, joint->n);
43
-
44
- // calculate bias velocity
45
- cpFloat maxBias = joint->constraint.maxBias;
46
- joint->bias = cpfclamp(-joint->constraint.biasCoef*dt_inv*(dist - joint->dist), -maxBias, maxBias);
47
-
48
- // compute max impulse
49
- joint->jnMax = J_MAX(joint, dt);
50
-
51
- // apply accumulated impulse
52
- cpVect j = cpvmult(joint->n, joint->jnAcc);
53
- apply_impulses(a, b, joint->r1, joint->r2, j);
54
- }
55
-
56
- static void
57
- applyImpulse(cpPinJoint *joint)
58
- {
59
- cpBody *a = joint->constraint.a;
60
- cpBody *b = joint->constraint.b;
61
- cpVect n = joint->n;
62
-
63
- // compute relative velocity
64
- cpFloat vrn = normal_relative_velocity(a, b, joint->r1, joint->r2, n);
65
-
66
- // compute normal impulse
67
- cpFloat jn = (joint->bias - vrn)*joint->nMass;
68
- cpFloat jnOld = joint->jnAcc;
69
- joint->jnAcc = cpfclamp(jnOld + jn, -joint->jnMax, joint->jnMax);
70
- jn = joint->jnAcc - jnOld;
71
-
72
- // apply impulse
73
- apply_impulses(a, b, joint->r1, joint->r2, cpvmult(n, jn));
74
- }
75
-
76
- static cpFloat
77
- getImpulse(cpPinJoint *joint)
78
- {
79
- return cpfabs(joint->jnAcc);
80
- }
81
-
82
- static const cpConstraintClass klass = {
83
- (cpConstraintPreStepFunction)preStep,
84
- (cpConstraintApplyImpulseFunction)applyImpulse,
85
- (cpConstraintGetImpulseFunction)getImpulse,
86
- };
87
- CP_DefineClassGetter(cpPinJoint);
88
-
89
-
90
- cpPinJoint *
91
- cpPinJointAlloc(void)
92
- {
93
- return (cpPinJoint *)cpmalloc(sizeof(cpPinJoint));
94
- }
95
-
96
- cpPinJoint *
97
- cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
98
- {
99
- cpConstraintInit((cpConstraint *)joint, &klass, a, b);
100
-
101
- joint->anchr1 = anchr1;
102
- joint->anchr2 = anchr2;
103
-
104
- cpVect p1 = cpvadd(a->p, cpvrotate(anchr1, a->rot));
105
- cpVect p2 = cpvadd(b->p, cpvrotate(anchr2, b->rot));
106
- joint->dist = cpvlength(cpvsub(p2, p1));
107
-
108
- joint->jnAcc = 0.0f;
109
-
110
- return joint;
111
- }
112
-
113
- cpConstraint *
114
- cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
115
- {
116
- return (cpConstraint *)cpPinJointInit(cpPinJointAlloc(), a, b, anchr1, anchr2);
117
- }
@@ -1,114 +0,0 @@
1
- /* Copyright (c) 2007 Scott Lembcke
2
- *
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy
4
- * of this software and associated documentation files (the "Software"), to deal
5
- * in the Software without restriction, including without limitation the rights
6
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- * copies of the Software, and to permit persons to whom the Software is
8
- * furnished to do so, subject to the following conditions:
9
- *
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- * SOFTWARE.
20
- */
21
-
22
- #include <stdlib.h>
23
-
24
- #include "chipmunk.h"
25
- #include "constraints/util.h"
26
-
27
- static void
28
- preStep(cpPivotJoint *joint, cpFloat dt, cpFloat dt_inv)
29
- {
30
- cpBody *a = joint->constraint.a;
31
- cpBody *b = joint->constraint.b;
32
-
33
- joint->r1 = cpvrotate(joint->anchr1, a->rot);
34
- joint->r2 = cpvrotate(joint->anchr2, b->rot);
35
-
36
- // Calculate mass tensor
37
- k_tensor(a, b, joint->r1, joint->r2, &joint->k1, &joint->k2);
38
-
39
- // compute max impulse
40
- joint->jMaxLen = J_MAX(joint, dt);
41
-
42
- // calculate bias velocity
43
- cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1));
44
- joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias);
45
-
46
- // apply accumulated impulse
47
- apply_impulses(a, b, joint->r1, joint->r2, joint->jAcc);
48
- }
49
-
50
- static void
51
- applyImpulse(cpPivotJoint *joint)
52
- {
53
- cpBody *a = joint->constraint.a;
54
- cpBody *b = joint->constraint.b;
55
-
56
- cpVect r1 = joint->r1;
57
- cpVect r2 = joint->r2;
58
-
59
- // compute relative velocity
60
- cpVect vr = relative_velocity(a, b, r1, r2);
61
-
62
- // compute normal impulse
63
- cpVect j = mult_k(cpvsub(joint->bias, vr), joint->k1, joint->k2);
64
- cpVect jOld = joint->jAcc;
65
- joint->jAcc = cpvclamp(cpvadd(joint->jAcc, j), joint->jMaxLen);
66
- j = cpvsub(joint->jAcc, jOld);
67
-
68
- // apply impulse
69
- apply_impulses(a, b, joint->r1, joint->r2, j);
70
- }
71
-
72
- static cpFloat
73
- getImpulse(cpConstraint *joint)
74
- {
75
- return cpvlength(((cpPivotJoint *)joint)->jAcc);
76
- }
77
-
78
- static const cpConstraintClass klass = {
79
- (cpConstraintPreStepFunction)preStep,
80
- (cpConstraintApplyImpulseFunction)applyImpulse,
81
- (cpConstraintGetImpulseFunction)getImpulse,
82
- };
83
- CP_DefineClassGetter(cpPivotJoint)
84
-
85
- cpPivotJoint *
86
- cpPivotJointAlloc(void)
87
- {
88
- return (cpPivotJoint *)cpmalloc(sizeof(cpPivotJoint));
89
- }
90
-
91
- cpPivotJoint *
92
- cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
93
- {
94
- cpConstraintInit((cpConstraint *)joint, &klass, a, b);
95
-
96
- joint->anchr1 = anchr1;
97
- joint->anchr2 = anchr2;
98
-
99
- joint->jAcc = cpvzero;
100
-
101
- return joint;
102
- }
103
-
104
- cpConstraint *
105
- cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
106
- {
107
- return (cpConstraint *)cpPivotJointInit(cpPivotJointAlloc(), a, b, anchr1, anchr2);
108
- }
109
-
110
- cpConstraint *
111
- cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot)
112
- {
113
- return cpPivotJointNew2(a, b, cpBodyWorld2Local(a, pivot), cpBodyWorld2Local(b, pivot));
114
- }