Ruby-ODE-SWIG 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +11 -10
- data/Ruby-ODE-SWIG.gemspec +1 -1
- data/TODO +0 -2
- data/ext/ode.i +1 -1
- data/lib/ode.rb +4 -1
- metadata +2 -2
data/README
CHANGED
@@ -20,23 +20,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
20
20
|
Ruby-ODE-SWIG provides Ruby language bindings for the Open Dynamics Engine (ODE), written using the Simplified Wrapper and Interface Generator (SWIG). I wrote it so I could use it in my game, Modularity (which is still at a very early stage of development).
|
21
21
|
|
22
22
|
=== Requirements
|
23
|
-
Ruby
|
24
|
-
ODE
|
25
|
-
SWIG
|
26
|
-
|
27
|
-
=== To Compile
|
28
|
-
Edit the path to the ODE includes in extconf.rb, if necessary.
|
29
|
-
ruby extconf.rb
|
30
|
-
make
|
23
|
+
- Ruby
|
24
|
+
- ODE
|
25
|
+
- SWIG
|
31
26
|
|
32
27
|
=== To Install
|
33
|
-
|
28
|
+
|
29
|
+
gem install Ruby-ODE-SWIG
|
34
30
|
|
35
31
|
=== To Use
|
36
32
|
require "ode"
|
37
33
|
w = ODE::World.new
|
38
34
|
# etc.
|
39
35
|
|
36
|
+
=== RubyForge Pages
|
37
|
+
|
38
|
+
- http://rubyforge.org/projects/ruby-ode-swig/
|
39
|
+
- http://ruby-ode-swig.rubyforge.org/
|
40
|
+
|
40
41
|
== Similar Projects
|
41
42
|
|
42
43
|
=== Ruby-ODE
|
@@ -48,7 +49,7 @@ URL: http://www.deveiate.org/projects/Ruby-ODE/
|
|
48
49
|
License: Creative Commons Attribution
|
49
50
|
|
50
51
|
==== Description
|
51
|
-
|
52
|
+
Written in straight C (no wrapper generator) for use in FaerieMUD.
|
52
53
|
|
53
54
|
==== Why I didn't use it
|
54
55
|
- It appears to be unmaintained since about 2003. The latest version is 0.01.
|
data/Ruby-ODE-SWIG.gemspec
CHANGED
data/TODO
CHANGED
data/ext/ode.i
CHANGED
@@ -77,7 +77,7 @@ VALUE dCollideRuby(dGeomID o1, dGeomID o2, int max_contacts) {
|
|
77
77
|
for (i = 0; i < num_contacts; i++) {
|
78
78
|
dContactGeom* cg = malloc(sizeof(dContactGeom));
|
79
79
|
*cg = contacts[i];
|
80
|
-
rb_ary_push(ret, SWIG_NewPointerObj(SWIG_as_voidptr(cg), SWIGTYPE_p_dContactGeom,
|
80
|
+
rb_ary_push(ret, SWIG_NewPointerObj(SWIG_as_voidptr(cg), SWIGTYPE_p_dContactGeom, SWIG_POINTER_OWN));
|
81
81
|
}
|
82
82
|
free(contacts);
|
83
83
|
return ret;
|
data/lib/ode.rb
CHANGED
@@ -119,7 +119,10 @@ module Kernel
|
|
119
119
|
def vector_transform(*args)
|
120
120
|
args.each { |ruby_name, length|
|
121
121
|
class_name = self.to_s.sub(/.*::/,'')
|
122
|
-
c_name = "d#{class_name}
|
122
|
+
c_name = "d#{class_name}#{ODE.camelize_method_name(ruby_name)}"
|
123
|
+
unless (ODE.respond_to?(c_name.intern))
|
124
|
+
c_name = "d#{class_name}Get#{ODE.camelize_method_name(ruby_name)}"
|
125
|
+
end
|
123
126
|
c_args = ((0...length).collect { |i| "vin[#{i}]" }).join(", ")
|
124
127
|
class_eval <<-EOS
|
125
128
|
def #{ruby_name.to_s}(vin)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Ruby-ODE-SWIG
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William de Beaumont
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-09-21 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|