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.
Files changed (6) hide show
  1. data/README +11 -10
  2. data/Ruby-ODE-SWIG.gemspec +1 -1
  3. data/TODO +0 -2
  4. data/ext/ode.i +1 -1
  5. data/lib/ode.rb +4 -1
  6. 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
- # TODO
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
- Written in straight C (no wrapper generator) for use in FaerieMUD.
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.
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  spec = Gem::Specification.new do |s|
3
3
  s.name = "Ruby-ODE-SWIG"
4
- s.version = "0.0.1"
4
+ s.version = "0.0.2"
5
5
  s.author = "William de Beaumont"
6
6
  s.email = "wdebeaum at gmail.com"
7
7
  s.rubyforge_project = "Ruby-ODE-SWIG"
data/TODO CHANGED
@@ -1,4 +1,2 @@
1
- - make this a gem
2
- ? make "make install" work correctly (don't know whether gem handles this...)
3
1
  - give each joint type its own Ruby class
4
2
  (see also `grep TODO ode.rb`)
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, 0));
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}Get#{ODE.camelize_method_name(ruby_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.1
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-07-28 00:00:00 -04:00
12
+ date: 2008-09-21 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15