tuio-ruby 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,6 +4,8 @@ require 'spec/rake/spectask'
4
4
  task :default => :spec
5
5
 
6
6
  Spec::Rake::SpecTask.new do |t|
7
+ t.ruby_opts = ["-rubygems"]
8
+ t.libs << 'lib'
7
9
  t.warning = false
8
10
  t.rcov = false
9
11
  t.spec_opts = ["--colour"]
@@ -33,15 +35,14 @@ begin
33
35
  gem.authors = ["aberant"]
34
36
  gem.files = FileList['Rakefile', 'examples/**/*', 'lib/**/*'].to_a
35
37
  gem.test_files = FileList['spec/**/*.rb']
36
- gem.add_dependency('osc-ruby', '>= 0.1.6')
38
+ gem.add_dependency('osc-ruby', '>= 0.6.2')
37
39
  gem.rubyforge_project = "tuio-ruby"
38
40
 
39
41
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
40
42
  end
41
43
 
42
- Jeweler::RubyforgeTasks.new do |rubyforge|
43
- rubyforge.doc_task = "rdoc"
44
- end
44
+ Jeweler::GemcutterTasks.new
45
+
45
46
  rescue LoadError
46
47
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
47
48
  end
@@ -1,5 +1,8 @@
1
- require File.join( File.dirname( __FILE__ ), '..', 'lib', 'tuio-ruby' )
1
+ require 'rubygems'
2
+ require 'osc-ruby'
2
3
 
4
+ $:.unshift( File.join( File.dirname( __FILE__ ), '..', 'lib' ))
5
+ require 'tuio-ruby'
3
6
 
4
7
  @tc = TuioClient.new
5
8
 
@@ -1,5 +1,3 @@
1
- $: << File.dirname( __FILE__ )
2
-
3
1
  require 'tuio-ruby/tuio_cursor_parameter'
4
2
  require 'tuio-ruby/tuio_object_parameter'
5
3
 
@@ -1,4 +1,3 @@
1
- require 'rubygems'
2
1
  require 'osc-ruby'
3
2
 
4
3
  # core exts
@@ -10,7 +9,6 @@ class TuioClient
10
9
 
11
10
  attr_reader :tuio_objects, :tuio_cursors
12
11
 
13
-
14
12
  client_events :object_creation, :object_update, :object_removal
15
13
  client_events :cursor_creation, :cursor_update, :cursor_removal
16
14
 
@@ -2,7 +2,7 @@ require File.join( File.dirname( __FILE__ ), 'tuio_container' )
2
2
 
3
3
  class TuioObject < TuioContainer
4
4
  attr_reader :angle, :fiducial_id, :rotation_vector, :rotation_accel
5
-
5
+
6
6
  def self.from_params( params )
7
7
  new(
8
8
  params.session_id,
@@ -12,19 +12,18 @@ class TuioObject < TuioContainer
12
12
  params.angle
13
13
  )
14
14
  end
15
-
16
-
15
+
17
16
  def initialize( session_id, fiducial_id, x_pos, y_pos, angle )
18
17
  super( session_id, x_pos, y_pos )
19
-
18
+
20
19
  @fiducial_id = fiducial_id
21
20
  @angle = angle
22
-
21
+
23
22
  @rotation_vector = 0.0
24
23
  @rotation_accel = 0.0
25
24
  end
26
-
27
- def update_from_params( tuio_params )
25
+
26
+ def update_from_params( tuio_params )
28
27
  update(
29
28
  tuio_params.x_pos,
30
29
  tuio_params.y_pos,
@@ -36,18 +35,18 @@ class TuioObject < TuioContainer
36
35
  tuio_params.rotation_accel
37
36
  )
38
37
  end
39
-
38
+
40
39
  def update( x_pos, y_pos, angle, x_speed, y_speed, rotation_vector, motion_accel, rotation_accel )
41
40
  super( x_pos, y_pos, x_speed, y_speed, motion_accel )
42
-
41
+
43
42
  @angle = angle
44
43
  @rotation_vector = rotation_vector
45
44
  @rotation_accel = rotation_accel
46
45
  end
47
-
46
+
48
47
  def equal_to_local_params?( params )
49
48
  fiducial_id == params.fiducial_id &&
50
- rotation_vector.approx_equal?( params.rotation_vector ) &&
51
- rotation_accel.approx_equal?( params.rotation_accel )
49
+ rotation_vector.approx_equal?( params.rotation_vector ) &&
50
+ rotation_accel.approx_equal?( params.rotation_accel )
52
51
  end
53
52
  end
@@ -2,7 +2,6 @@ require File.join( File.dirname( __FILE__ ), 'tuio_parameter' )
2
2
 
3
3
  # /tuio/2Dobj set s i x y a X Y A m r
4
4
 
5
-
6
5
  class TuioObjectParameter < TuioParameter
7
6
  attr_reader :angle, :fiducial_id, :rotation_vector, :rotation_accel
8
7
 
@@ -79,10 +79,6 @@ describe "tuio object" do
79
79
  @server.tuio_objects.size.should == 1
80
80
  end
81
81
  end
82
-
83
- describe "fseq" do
84
- it "should probably have a test!"
85
- end
86
82
  end
87
83
  end
88
84
 
@@ -1,10 +1,6 @@
1
- require 'rubygems'
2
- require 'spec'
3
1
  require 'osc-ruby'
4
-
5
- $: << File.join( File.dirname( __FILE__ ), '..', 'lib' )
6
-
7
2
  require 'tuio-ruby'
3
+ require 'spec'
8
4
 
9
5
  # monkey patch to get at osc core to send messages
10
6
  class TuioClient
@@ -3,8 +3,6 @@ require File.join( File.dirname(__FILE__) , 'tuio_parameter_spec' )
3
3
 
4
4
  # /tuio/2Dobj set s i x y a X Y A m r
5
5
  # /tuio/2Dcur set s x y X Y m
6
- #def initialize( session_id, fiducial_id, x_pos, y_pos, angle,
7
- # x_speed, y_speed, rotation_vector, motion_accel, rotation_accel )
8
6
 
9
7
  describe TuioObjectParameter do
10
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tuio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - aberant
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-14 00:00:00 -06:00
12
+ date: 2010-01-17 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.1.6
23
+ version: 0.6.2
24
24
  version:
25
25
  description:
26
26
  email: qzzzq1@gmail.com