chipmunk-ffi 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -3
- data/VERSION +1 -1
- data/chipmunk-ffi.gemspec +5 -3
- data/lib/chipmunk-ffi.rb +7 -2
- data/lib/chipmunk-ffi/body.rb +60 -2
- data/lib/chipmunk-ffi/constraint.rb +26 -0
- data/lib/chipmunk-ffi/constraints/damped_rotary_spring.rb +58 -0
- data/lib/chipmunk-ffi/constraints/damped_spring.rb +36 -2
- data/lib/chipmunk-ffi/constraints/gear_joint.rb +13 -1
- data/lib/chipmunk-ffi/constraints/groove_joint.rb +6 -1
- data/lib/chipmunk-ffi/constraints/pin_joint.rb +6 -1
- data/lib/chipmunk-ffi/constraints/pivot_joint.rb +6 -1
- data/lib/chipmunk-ffi/constraints/ratchet_joint.rb +6 -1
- data/lib/chipmunk-ffi/constraints/rotary_limit_joint.rb +6 -1
- data/lib/chipmunk-ffi/constraints/simple_motor.rb +6 -1
- data/lib/chipmunk-ffi/constraints/slide_joint.rb +6 -1
- data/lib/chipmunk-ffi/core.rb +1 -1
- data/lib/chipmunk-ffi/shape.rb +32 -3
- data/lib/chipmunk-ffi/space.rb +136 -54
- data/lib/chipmunk-ffi/space_hash.rb +2 -0
- data/lib/chipmunk-ffi/struct_accessor.rb +48 -0
- data/lib/chipmunk-ffi/vec2.rb +7 -1
- data/spec/body_spec.rb +44 -0
- data/spec/constraint_spec.rb +289 -1
- data/spec/shape_spec.rb +66 -1
- data/spec/space_spec.rb +70 -0
- data/spec/vec2_spec.rb +8 -1
- metadata +40 -21
data/spec/vec2_spec.rb
CHANGED
@@ -234,6 +234,13 @@ describe 'Vect in chipmunk' do
|
|
234
234
|
rv.x.should be_close(2.244,0.001)
|
235
235
|
rv.y.should be_close(2.804,0.001)
|
236
236
|
end
|
237
|
-
|
237
|
+
|
238
|
+
it 'can compare' do
|
239
|
+
v1 = CP::Vec2.new(2,3)
|
240
|
+
v2 = CP::Vec2.new(2,3)
|
241
|
+
v3 = CP::Vec2.new(3,2)
|
242
|
+
v1.should == v2
|
243
|
+
v1.should_not == v3
|
244
|
+
end
|
238
245
|
end
|
239
246
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chipmunk-ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 1.1.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Shawn Anderson
|
@@ -9,49 +14,59 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-04-10 00:00:00 -04:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: ffi
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 6
|
30
|
+
- 0
|
23
31
|
version: 0.6.0
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: nice-ffi
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
33
43
|
version: "0"
|
34
|
-
|
44
|
+
type: :runtime
|
45
|
+
version_requirements: *id002
|
35
46
|
- !ruby/object:Gem::Dependency
|
36
47
|
name: rspec
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
50
|
requirements:
|
41
51
|
- - ">="
|
42
52
|
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 0
|
43
55
|
version: "0"
|
44
|
-
|
56
|
+
type: :development
|
57
|
+
version_requirements: *id003
|
45
58
|
- !ruby/object:Gem::Dependency
|
46
59
|
name: jeweler
|
47
|
-
|
48
|
-
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
prerelease: false
|
61
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
62
|
requirements:
|
51
63
|
- - ">="
|
52
64
|
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
53
67
|
version: "0"
|
54
|
-
|
68
|
+
type: :development
|
69
|
+
version_requirements: *id004
|
55
70
|
description: FFI bindings for chipmunk physics lib.
|
56
71
|
email: shawn42@gmail.com
|
57
72
|
executables: []
|
@@ -70,6 +85,7 @@ files:
|
|
70
85
|
- lib/chipmunk-ffi/bb.rb
|
71
86
|
- lib/chipmunk-ffi/body.rb
|
72
87
|
- lib/chipmunk-ffi/constraint.rb
|
88
|
+
- lib/chipmunk-ffi/constraints/damped_rotary_spring.rb
|
73
89
|
- lib/chipmunk-ffi/constraints/damped_spring.rb
|
74
90
|
- lib/chipmunk-ffi/constraints/gear_joint.rb
|
75
91
|
- lib/chipmunk-ffi/constraints/groove_joint.rb
|
@@ -83,6 +99,7 @@ files:
|
|
83
99
|
- lib/chipmunk-ffi/shape.rb
|
84
100
|
- lib/chipmunk-ffi/space.rb
|
85
101
|
- lib/chipmunk-ffi/space_hash.rb
|
102
|
+
- lib/chipmunk-ffi/struct_accessor.rb
|
86
103
|
- lib/chipmunk-ffi/unsafe.rb
|
87
104
|
- lib/chipmunk-ffi/vec2.rb
|
88
105
|
- spec/bb_spec.rb
|
@@ -109,18 +126,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
126
|
requirements:
|
110
127
|
- - ">="
|
111
128
|
- !ruby/object:Gem::Version
|
129
|
+
segments:
|
130
|
+
- 0
|
112
131
|
version: "0"
|
113
|
-
version:
|
114
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
133
|
requirements:
|
116
134
|
- - ">="
|
117
135
|
- !ruby/object:Gem::Version
|
136
|
+
segments:
|
137
|
+
- 0
|
118
138
|
version: "0"
|
119
|
-
version:
|
120
139
|
requirements: []
|
121
140
|
|
122
141
|
rubyforge_project: chipmunk-ffi
|
123
|
-
rubygems_version: 1.3.
|
142
|
+
rubygems_version: 1.3.6
|
124
143
|
signing_key:
|
125
144
|
specification_version: 3
|
126
145
|
summary: FFI bindings for chipmunk physics lib.
|