chipmunk 5.3.4.0-x86-mingw32 → 5.3.4.2-x86-mingw32
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.
- data/README +33 -13
 - data/Rakefile +20 -7
 - data/ext/chipmunk/extconf.rb +55 -12
 - data/ext/chipmunk/rb_chipmunk.c +92 -98
 - data/ext/chipmunk/rb_chipmunk.h +44 -34
 - data/ext/chipmunk/rb_cpArbiter.c +135 -98
 - data/ext/chipmunk/rb_cpBB.c +84 -101
 - data/ext/chipmunk/rb_cpBody.c +219 -241
 - data/ext/chipmunk/rb_cpConstraint.c +173 -185
 - data/ext/chipmunk/rb_cpShape.c +347 -251
 - data/ext/chipmunk/rb_cpSpace.c +376 -408
 - data/ext/chipmunk/rb_cpVect.c +132 -170
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk.h +163 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_ffi.h +59 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_private.h +49 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_types.h +151 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_unsafe.h +54 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpConstraint.h +105 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedRotarySpring.h +46 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedSpring.h +53 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpGearJoint.h +41 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpGrooveJoint.h +48 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpPinJoint.h +43 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpPivotJoint.h +42 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpRatchetJoint.h +40 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpRotaryLimitJoint.h +39 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpSimpleMotor.h +37 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpSlideJoint.h +44 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/util.h +134 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpArbiter.h +188 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpArray.h +49 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpBB.h +74 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpBody.h +219 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpCollision.h +28 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpHashSet.h +82 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpPolyShape.h +103 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpShape.h +177 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpSpace.h +206 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpSpaceHash.h +110 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpVect.h +207 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/chipmunk.c +151 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpConstraint.c +54 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpDampedRotarySpring.c +105 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpDampedSpring.c +115 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpGearJoint.c +113 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpGrooveJoint.c +161 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpPinJoint.c +116 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpPivotJoint.c +114 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpRatchetJoint.c +126 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpRotaryLimitJoint.c +120 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpSimpleMotor.c +97 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpSlideJoint.c +129 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpArbiter.c +280 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpArray.c +143 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpBB.c +47 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpBody.c +192 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpCollision.c +411 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpHashSet.c +253 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpPolyShape.c +240 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpShape.c +405 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpace.c +499 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceComponent.c +279 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceHash.c +534 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceQuery.c +246 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceStep.c +398 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/cpVect.c +71 -0
 - data/ext/chipmunk/vendor/chipmunk-5.3.4/src/prime.h +68 -0
 - data/lib/1.9/chipmunk.so +0 -0
 - data/lib/chipmunk.rb +19 -8
 - metadata +84 -42
 - data/lib/1.8/chipmunk.so +0 -0
 
| 
         @@ -0,0 +1,71 @@ 
     | 
|
| 
      
 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 <stdio.h>
         
     | 
| 
      
 23 
     | 
    
         
            +
            #include <math.h>
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            #include "chipmunk.h"
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            cpFloat
         
     | 
| 
      
 28 
     | 
    
         
            +
            cpvlength(const cpVect v)
         
     | 
| 
      
 29 
     | 
    
         
            +
            {
         
     | 
| 
      
 30 
     | 
    
         
            +
            	return cpfsqrt( cpvdot(v, v) );
         
     | 
| 
      
 31 
     | 
    
         
            +
            }
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            inline cpVect
         
     | 
| 
      
 34 
     | 
    
         
            +
            cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t)
         
     | 
| 
      
 35 
     | 
    
         
            +
            {
         
     | 
| 
      
 36 
     | 
    
         
            +
            	cpFloat omega = cpfacos(cpvdot(v1, v2));
         
     | 
| 
      
 37 
     | 
    
         
            +
            	
         
     | 
| 
      
 38 
     | 
    
         
            +
            	if(omega){
         
     | 
| 
      
 39 
     | 
    
         
            +
            		cpFloat denom = 1.0f/cpfsin(omega);
         
     | 
| 
      
 40 
     | 
    
         
            +
            		return cpvadd(cpvmult(v1, cpfsin((1.0f - t)*omega)*denom), cpvmult(v2, cpfsin(t*omega)*denom));
         
     | 
| 
      
 41 
     | 
    
         
            +
            	} else {
         
     | 
| 
      
 42 
     | 
    
         
            +
            		return v1;
         
     | 
| 
      
 43 
     | 
    
         
            +
            	}
         
     | 
| 
      
 44 
     | 
    
         
            +
            }
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            cpVect
         
     | 
| 
      
 47 
     | 
    
         
            +
            cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a)
         
     | 
| 
      
 48 
     | 
    
         
            +
            {
         
     | 
| 
      
 49 
     | 
    
         
            +
            	cpFloat angle = cpfacos(cpvdot(v1, v2));
         
     | 
| 
      
 50 
     | 
    
         
            +
            	return cpvslerp(v1, v2, cpfmin(a, angle)/angle);
         
     | 
| 
      
 51 
     | 
    
         
            +
            }
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            cpVect
         
     | 
| 
      
 54 
     | 
    
         
            +
            cpvforangle(const cpFloat a)
         
     | 
| 
      
 55 
     | 
    
         
            +
            {
         
     | 
| 
      
 56 
     | 
    
         
            +
            	return cpv(cpfcos(a), cpfsin(a));
         
     | 
| 
      
 57 
     | 
    
         
            +
            }
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            cpFloat
         
     | 
| 
      
 60 
     | 
    
         
            +
            cpvtoangle(const cpVect v)
         
     | 
| 
      
 61 
     | 
    
         
            +
            {
         
     | 
| 
      
 62 
     | 
    
         
            +
            	return cpfatan2(v.y, v.x);
         
     | 
| 
      
 63 
     | 
    
         
            +
            }
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
            char*
         
     | 
| 
      
 66 
     | 
    
         
            +
            cpvstr(const cpVect v)
         
     | 
| 
      
 67 
     | 
    
         
            +
            {
         
     | 
| 
      
 68 
     | 
    
         
            +
            	static char str[256];
         
     | 
| 
      
 69 
     | 
    
         
            +
            	sprintf(str, "(% .3f, % .3f)", v.x, v.y);
         
     | 
| 
      
 70 
     | 
    
         
            +
            	return str;
         
     | 
| 
      
 71 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,68 @@ 
     | 
|
| 
      
 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 
     | 
    
         
            +
            // Used for resizing hash tables.
         
     | 
| 
      
 23 
     | 
    
         
            +
            // Values approximately double.
         
     | 
| 
      
 24 
     | 
    
         
            +
            // http://planetmath.org/encyclopedia/GoodHashTablePrimes.html
         
     | 
| 
      
 25 
     | 
    
         
            +
            static int primes[] = {
         
     | 
| 
      
 26 
     | 
    
         
            +
            	5,
         
     | 
| 
      
 27 
     | 
    
         
            +
            	13,
         
     | 
| 
      
 28 
     | 
    
         
            +
            	23,
         
     | 
| 
      
 29 
     | 
    
         
            +
            	47,
         
     | 
| 
      
 30 
     | 
    
         
            +
            	97,
         
     | 
| 
      
 31 
     | 
    
         
            +
            	193,
         
     | 
| 
      
 32 
     | 
    
         
            +
            	389,
         
     | 
| 
      
 33 
     | 
    
         
            +
            	769,
         
     | 
| 
      
 34 
     | 
    
         
            +
            	1543,
         
     | 
| 
      
 35 
     | 
    
         
            +
            	3079,
         
     | 
| 
      
 36 
     | 
    
         
            +
            	6151,
         
     | 
| 
      
 37 
     | 
    
         
            +
            	12289,
         
     | 
| 
      
 38 
     | 
    
         
            +
            	24593,
         
     | 
| 
      
 39 
     | 
    
         
            +
            	49157,
         
     | 
| 
      
 40 
     | 
    
         
            +
            	98317,
         
     | 
| 
      
 41 
     | 
    
         
            +
            	196613,
         
     | 
| 
      
 42 
     | 
    
         
            +
            	393241,
         
     | 
| 
      
 43 
     | 
    
         
            +
            	786433,
         
     | 
| 
      
 44 
     | 
    
         
            +
            	1572869,
         
     | 
| 
      
 45 
     | 
    
         
            +
            	3145739,
         
     | 
| 
      
 46 
     | 
    
         
            +
            	6291469,
         
     | 
| 
      
 47 
     | 
    
         
            +
            	12582917,
         
     | 
| 
      
 48 
     | 
    
         
            +
            	25165843,
         
     | 
| 
      
 49 
     | 
    
         
            +
            	50331653,
         
     | 
| 
      
 50 
     | 
    
         
            +
            	100663319,
         
     | 
| 
      
 51 
     | 
    
         
            +
            	201326611,
         
     | 
| 
      
 52 
     | 
    
         
            +
            	402653189,
         
     | 
| 
      
 53 
     | 
    
         
            +
            	805306457,
         
     | 
| 
      
 54 
     | 
    
         
            +
            	1610612741,
         
     | 
| 
      
 55 
     | 
    
         
            +
            	0,
         
     | 
| 
      
 56 
     | 
    
         
            +
            };
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
            static inline int
         
     | 
| 
      
 59 
     | 
    
         
            +
            next_prime(int n)
         
     | 
| 
      
 60 
     | 
    
         
            +
            {
         
     | 
| 
      
 61 
     | 
    
         
            +
            	int i = 0;
         
     | 
| 
      
 62 
     | 
    
         
            +
            	while(n > primes[i]){
         
     | 
| 
      
 63 
     | 
    
         
            +
            		i++;
         
     | 
| 
      
 64 
     | 
    
         
            +
            		cpAssert(primes[i], "Tried to resize a hash table to a size greater than 1610612741 O_o"); // realistically this should never happen
         
     | 
| 
      
 65 
     | 
    
         
            +
            	}
         
     | 
| 
      
 66 
     | 
    
         
            +
            	
         
     | 
| 
      
 67 
     | 
    
         
            +
            	return primes[i];
         
     | 
| 
      
 68 
     | 
    
         
            +
            }
         
     | 
    
        data/lib/1.9/chipmunk.so
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/chipmunk.rb
    CHANGED
    
    | 
         @@ -14,6 +14,7 @@ rescue LoadError => e 
     | 
|
| 
       14 
14 
     | 
    
         
             
                require "#{direc}/chipmunk.#{dlext}"
         
     | 
| 
       15 
15 
     | 
    
         
             
            end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
       17 
18 
     | 
    
         
             
            # Add some constants to CP here, so we don't need 
         
     | 
| 
       18 
19 
     | 
    
         
             
            # to do it in the C code.
         
     | 
| 
       19 
20 
     | 
    
         
             
            # Let's cheat a bit here.. :p
         
     | 
| 
         @@ -28,12 +29,14 @@ end 
     | 
|
| 
       28 
29 
     | 
    
         | 
| 
       29 
30 
     | 
    
         
             
            module CP
         
     | 
| 
       30 
31 
     | 
    
         
             
              # Chipmunk Object
         
     | 
| 
       31 
     | 
    
         
            -
              # Makes it easier to manage complex objects that reference many primitive 
     | 
| 
       32 
     | 
    
         
            -
              #  
     | 
| 
       33 
     | 
    
         
            -
              # composite  
     | 
| 
      
 32 
     | 
    
         
            +
              # Makes it easier to manage complex objects that reference many primitive
         
     | 
| 
      
 33 
     | 
    
         
            +
              # Chipmunk objects such as bodies shapes and constraints.
         
     | 
| 
      
 34 
     | 
    
         
            +
              # New composite objects simply need to include CP::Object and call
         
     | 
| 
      
 35 
     | 
    
         
            +
              # init_chipmunk_object(*objects) with the composite and primitive Chipmunk
         
     | 
| 
      
 36 
     | 
    
         
            +
              # objects that make up itself.
         
     | 
| 
       34 
37 
     | 
    
         
             
              module Object
         
     | 
| 
       35 
     | 
    
         
            -
                # Returns the list of primitive Chipmunk objects (bodies, shapes and 
     | 
| 
       36 
     | 
    
         
            -
                # that this composite object references directly and indirectly.
         
     | 
| 
      
 38 
     | 
    
         
            +
                # Returns the list of primitive Chipmunk objects (bodies, shapes and
         
     | 
| 
      
 39 
     | 
    
         
            +
                # constraints that this composite object references directly and indirectly.
         
     | 
| 
       37 
40 
     | 
    
         
             
                def chipmunk_objects
         
     | 
| 
       38 
41 
     | 
    
         
             
                  if @chipmunk_objects
         
     | 
| 
       39 
42 
     | 
    
         
             
                    return @chipmunk_objects
         
     | 
| 
         @@ -47,8 +50,9 @@ module CP 
     | 
|
| 
       47 
50 
     | 
    
         
             
                # and composite Chipmunk objects this object references.
         
     | 
| 
       48 
51 
     | 
    
         
             
                def init_chipmunk_object(*objs)
         
     | 
| 
       49 
52 
     | 
    
         
             
                  bad_objs = objs.reject{|obj| obj.is_a?(CP::Object)}
         
     | 
| 
       50 
     | 
    
         
            -
                   
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
      
 53 
     | 
    
         
            +
                  unless bad_objs.empty?
         
     | 
| 
      
 54 
     | 
    
         
            +
                    raise(ArgumentError, "The following objects: #{bad_objs.inspect} are not CP::Objects")
         
     | 
| 
      
 55 
     | 
    
         
            +
                  end
         
     | 
| 
       52 
56 
     | 
    
         
             
                  @chipmunk_objects = objs.inject([]){|sum, obj| sum + obj.chipmunk_objects}.uniq
         
     | 
| 
       53 
57 
     | 
    
         
             
                end
         
     | 
| 
       54 
58 
     | 
    
         
             
              end
         
     | 
| 
         @@ -142,7 +146,7 @@ end 
     | 
|
| 
       142 
146 
     | 
    
         | 
| 
       143 
147 
     | 
    
         
             
            # Create derived static objects that know to add themselves as static.
         
     | 
| 
       144 
148 
     | 
    
         
             
            module CP
         
     | 
| 
       145 
     | 
    
         
            -
              class  
     | 
| 
      
 149 
     | 
    
         
            +
              class BodyStatic < Body
         
     | 
| 
       146 
150 
     | 
    
         
             
                def initialize
         
     | 
| 
       147 
151 
     | 
    
         
             
                  super(Float::INFINITY, Float::INFINITY)
         
     | 
| 
       148 
152 
     | 
    
         
             
                end
         
     | 
| 
         @@ -153,6 +157,13 @@ module CP 
     | 
|
| 
       153 
157 
     | 
    
         
             
                end
         
     | 
| 
       154 
158 
     | 
    
         
             
              end
         
     | 
| 
       155 
159 
     | 
    
         | 
| 
      
 160 
     | 
    
         
            +
              class StaticBody
         
     | 
| 
      
 161 
     | 
    
         
            +
                def chipmunk_objects
         
     | 
| 
      
 162 
     | 
    
         
            +
                  # return [] instead of [self] so the static body will not be added.
         
     | 
| 
      
 163 
     | 
    
         
            +
                  []
         
     | 
| 
      
 164 
     | 
    
         
            +
                end
         
     | 
| 
      
 165 
     | 
    
         
            +
              end
         
     | 
| 
      
 166 
     | 
    
         
            +
              
         
     | 
| 
       156 
167 
     | 
    
         
             
              module StaticShape
         
     | 
| 
       157 
168 
     | 
    
         
             
                include Shape
         
     | 
| 
       158 
169 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,39 +1,62 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification 
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: chipmunk
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version 
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
       5 
     | 
    
         
            -
               
     | 
| 
       6 
     | 
    
         
            -
              segments: 
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 5.3.4.2
         
     | 
| 
      
 5 
     | 
    
         
            +
              segments:
         
     | 
| 
       7 
6 
     | 
    
         
             
              - 5
         
     | 
| 
       8 
7 
     | 
    
         
             
              - 3
         
     | 
| 
       9 
8 
     | 
    
         
             
              - 4
         
     | 
| 
       10 
     | 
    
         
            -
              -  
     | 
| 
       11 
     | 
    
         
            -
               
     | 
| 
      
 9 
     | 
    
         
            +
              - 2
         
     | 
| 
      
 10 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
       12 
11 
     | 
    
         
             
            platform: x86-mingw32
         
     | 
| 
       13 
     | 
    
         
            -
            authors: 
     | 
| 
      
 12 
     | 
    
         
            +
            authors:
         
     | 
| 
       14 
13 
     | 
    
         
             
            - Scott Lembcke, Beoran, John Mair (banisterfiend)
         
     | 
| 
       15 
     | 
    
         
            -
            autorequire: 
         
     | 
| 
      
 14 
     | 
    
         
            +
            autorequire: !!null 
         
     | 
| 
       16 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       17 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
            default_executable: 
         
     | 
| 
      
 17 
     | 
    
         
            +
            date: 2011-05-20 00:00:00.000000000 +02:00
         
     | 
| 
      
 18 
     | 
    
         
            +
            default_executable: !!null 
         
     | 
| 
       21 
19 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            description: "Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine. "
         
     | 
| 
      
 20 
     | 
    
         
            +
            description: ! 'Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine. '
         
     | 
| 
       24 
21 
     | 
    
         
             
            email: beoran@rubyforge.org
         
     | 
| 
       25 
22 
     | 
    
         
             
            executables: []
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
23 
     | 
    
         
             
            extensions: []
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
24 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
            files: 
         
     | 
| 
      
 25 
     | 
    
         
            +
            files:
         
     | 
| 
       32 
26 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       33 
27 
     | 
    
         
             
            - README
         
     | 
| 
       34 
28 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       35 
29 
     | 
    
         
             
            - lib/chipmunk.rb
         
     | 
| 
       36 
30 
     | 
    
         
             
            - ext/chipmunk/extconf.rb
         
     | 
| 
      
 31 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpHashSet.h
         
     | 
| 
      
 32 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_private.h
         
     | 
| 
      
 33 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_types.h
         
     | 
| 
      
 34 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_unsafe.h
         
     | 
| 
      
 35 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpSpace.h
         
     | 
| 
      
 36 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpArbiter.h
         
     | 
| 
      
 37 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk_ffi.h
         
     | 
| 
      
 38 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpBody.h
         
     | 
| 
      
 39 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpVect.h
         
     | 
| 
      
 40 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpSpaceHash.h
         
     | 
| 
      
 41 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpSimpleMotor.h
         
     | 
| 
      
 42 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpRotaryLimitJoint.h
         
     | 
| 
      
 43 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpGrooveJoint.h
         
     | 
| 
      
 44 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedRotarySpring.h
         
     | 
| 
      
 45 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpPivotJoint.h
         
     | 
| 
      
 46 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedSpring.h
         
     | 
| 
      
 47 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpPinJoint.h
         
     | 
| 
      
 48 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/util.h
         
     | 
| 
      
 49 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpSlideJoint.h
         
     | 
| 
      
 50 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpConstraint.h
         
     | 
| 
      
 51 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpRatchetJoint.h
         
     | 
| 
      
 52 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/constraints/cpGearJoint.h
         
     | 
| 
      
 53 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpCollision.h
         
     | 
| 
      
 54 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpShape.h
         
     | 
| 
      
 55 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpBB.h
         
     | 
| 
      
 56 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpArray.h
         
     | 
| 
      
 57 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/chipmunk.h
         
     | 
| 
      
 58 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/include/chipmunk/cpPolyShape.h
         
     | 
| 
      
 59 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/prime.h
         
     | 
| 
       37 
60 
     | 
    
         
             
            - ext/chipmunk/rb_chipmunk.h
         
     | 
| 
       38 
61 
     | 
    
         
             
            - ext/chipmunk/rb_chipmunk.c
         
     | 
| 
       39 
62 
     | 
    
         
             
            - ext/chipmunk/rb_cpBody.c
         
     | 
| 
         @@ -43,41 +66,60 @@ files: 
     | 
|
| 
       43 
66 
     | 
    
         
             
            - ext/chipmunk/rb_cpVect.c
         
     | 
| 
       44 
67 
     | 
    
         
             
            - ext/chipmunk/rb_cpArbiter.c
         
     | 
| 
       45 
68 
     | 
    
         
             
            - ext/chipmunk/rb_cpSpace.c
         
     | 
| 
       46 
     | 
    
         
            -
            -  
     | 
| 
      
 69 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpShape.c
         
     | 
| 
      
 70 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpVect.c
         
     | 
| 
      
 71 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpArbiter.c
         
     | 
| 
      
 72 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpArray.c
         
     | 
| 
      
 73 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceHash.c
         
     | 
| 
      
 74 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceStep.c
         
     | 
| 
      
 75 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpace.c
         
     | 
| 
      
 76 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpRotaryLimitJoint.c
         
     | 
| 
      
 77 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpPinJoint.c
         
     | 
| 
      
 78 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpSimpleMotor.c
         
     | 
| 
      
 79 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpPivotJoint.c
         
     | 
| 
      
 80 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpRatchetJoint.c
         
     | 
| 
      
 81 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpSlideJoint.c
         
     | 
| 
      
 82 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpDampedRotarySpring.c
         
     | 
| 
      
 83 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpConstraint.c
         
     | 
| 
      
 84 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpDampedSpring.c
         
     | 
| 
      
 85 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpGrooveJoint.c
         
     | 
| 
      
 86 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/constraints/cpGearJoint.c
         
     | 
| 
      
 87 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpHashSet.c
         
     | 
| 
      
 88 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpCollision.c
         
     | 
| 
      
 89 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpBody.c
         
     | 
| 
      
 90 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/chipmunk.c
         
     | 
| 
      
 91 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceComponent.c
         
     | 
| 
      
 92 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpBB.c
         
     | 
| 
      
 93 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpSpaceQuery.c
         
     | 
| 
      
 94 
     | 
    
         
            +
            - ext/chipmunk/vendor/chipmunk-5.3.4/src/cpPolyShape.c
         
     | 
| 
       47 
95 
     | 
    
         
             
            - lib/1.9/chipmunk.so
         
     | 
| 
       48 
96 
     | 
    
         
             
            has_rdoc: true
         
     | 
| 
       49 
97 
     | 
    
         
             
            homepage: https://github.com/beoran/chipmunk
         
     | 
| 
       50 
98 
     | 
    
         
             
            licenses: []
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
            post_install_message: 
         
     | 
| 
      
 99 
     | 
    
         
            +
            post_install_message: !!null 
         
     | 
| 
       53 
100 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
            require_paths: 
         
     | 
| 
      
 101 
     | 
    
         
            +
            require_paths:
         
     | 
| 
       56 
102 
     | 
    
         
             
            - lib
         
     | 
| 
       57 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
     | 
| 
      
 103 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       58 
104 
     | 
    
         
             
              none: false
         
     | 
| 
       59 
     | 
    
         
            -
              requirements: 
     | 
| 
       60 
     | 
    
         
            -
              - -  
     | 
| 
       61 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       62 
     | 
    
         
            -
                   
     | 
| 
       63 
     | 
    
         
            -
                  segments: 
     | 
| 
      
 105 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 106 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 107 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 108 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 109 
     | 
    
         
            +
                  segments:
         
     | 
| 
       64 
110 
     | 
    
         
             
                  - 0
         
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 111 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       67 
112 
     | 
    
         
             
              none: false
         
     | 
| 
       68 
     | 
    
         
            -
              requirements: 
     | 
| 
       69 
     | 
    
         
            -
              - -  
     | 
| 
       70 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       71 
     | 
    
         
            -
                   
     | 
| 
       72 
     | 
    
         
            -
                  segments: 
     | 
| 
      
 113 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 114 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 115 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 116 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 117 
     | 
    
         
            +
                  segments:
         
     | 
| 
       73 
118 
     | 
    
         
             
                  - 0
         
     | 
| 
       74 
     | 
    
         
            -
                  version: "0"
         
     | 
| 
       75 
119 
     | 
    
         
             
            requirements: []
         
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
            signing_key: 
         
     | 
| 
      
 120 
     | 
    
         
            +
            rubyforge_project: !!null 
         
     | 
| 
      
 121 
     | 
    
         
            +
            rubygems_version: 1.3.7
         
     | 
| 
      
 122 
     | 
    
         
            +
            signing_key: !!null 
         
     | 
| 
       80 
123 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       81 
124 
     | 
    
         
             
            summary: Enhanced ruby bindings for the chipmunk 5.3.4 game physics engine.
         
     | 
| 
       82 
125 
     | 
    
         
             
            test_files: []
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
    
        data/lib/1.8/chipmunk.so
    DELETED
    
    | 
         Binary file 
     |