Class: TuioCursor
- Inherits:
-
TuioContainer
- Object
- TuioPoint
- TuioContainer
- TuioCursor
- Defined in:
- lib/tuio-ruby/tuio_cursor.rb
Instance Attribute Summary collapse
-
#finger_id ⇒ Object
Returns the value of attribute finger_id.
-
#motion_accel ⇒ Object
readonly
Returns the value of attribute motion_accel.
-
#x_speed ⇒ Object
readonly
Returns the value of attribute x_speed.
-
#y_speed ⇒ Object
readonly
Returns the value of attribute y_speed.
Attributes inherited from TuioContainer
Attributes inherited from TuioPoint
Class Method Summary collapse
Instance Method Summary collapse
- #equal_to_local_params?(params) ⇒ Boolean
-
#initialize(session_id, x_pos, y_pos) ⇒ TuioCursor
constructor
A new instance of TuioCursor.
Methods inherited from TuioContainer
#equal_to_local_args?, #params_equal?, #path, #update, #update_from_params
Methods inherited from TuioPoint
#degrees_to, #distance_to, #eql?, #radians_to, #update
Constructor Details
#initialize(session_id, x_pos, y_pos) ⇒ TuioCursor
Returns a new instance of TuioCursor.
15 16 17 18 19 20 21 |
# File 'lib/tuio-ruby/tuio_cursor.rb', line 15 def initialize( session_id, x_pos, y_pos ) super( session_id, x_pos, y_pos ) @x_speed = 0.0 @y_speed = 0.0 @motion_accel = 0.0 end |
Instance Attribute Details
#finger_id ⇒ Object
Returns the value of attribute finger_id.
5 6 7 |
# File 'lib/tuio-ruby/tuio_cursor.rb', line 5 def finger_id @finger_id end |
#motion_accel ⇒ Object (readonly)
Returns the value of attribute motion_accel.
6 7 8 |
# File 'lib/tuio-ruby/tuio_cursor.rb', line 6 def motion_accel @motion_accel end |
#x_speed ⇒ Object (readonly)
Returns the value of attribute x_speed.
6 7 8 |
# File 'lib/tuio-ruby/tuio_cursor.rb', line 6 def x_speed @x_speed end |
#y_speed ⇒ Object (readonly)
Returns the value of attribute y_speed.
6 7 8 |
# File 'lib/tuio-ruby/tuio_cursor.rb', line 6 def y_speed @y_speed end |
Class Method Details
.from_params(params) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/tuio-ruby/tuio_cursor.rb', line 8 def self.from_params( params ) new( params.session_id, params.x_pos, params.y_pos ) end |
Instance Method Details
#equal_to_local_params?(params) ⇒ Boolean
24 25 26 |
# File 'lib/tuio-ruby/tuio_cursor.rb', line 24 def equal_to_local_params?( params ) true end |