Class: TuioParameter

Inherits:
Object show all
Defined in:
lib/tuio-ruby/tuio_parameter.rb

Direct Known Subclasses

TuioCursorParameter, TuioObjectParameter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session_id, x_pos, y_pos, x_speed, y_speed, motion_accel) ⇒ TuioParameter

Returns a new instance of TuioParameter.



8
9
10
11
12
13
14
15
# File 'lib/tuio-ruby/tuio_parameter.rb', line 8

def initialize( session_id, x_pos, y_pos, x_speed, y_speed, motion_accel )
  @session_id = session_id
  @x_pos = x_pos
  @y_pos = y_pos
  @x_speed = x_speed
  @y_speed = y_speed
  @motion_accel = motion_accel
end

Instance Attribute Details

#motion_accelObject

Returns the value of attribute motion_accel.



2
3
4
# File 'lib/tuio-ruby/tuio_parameter.rb', line 2

def motion_accel
  @motion_accel
end

#session_idObject

Returns the value of attribute session_id.



2
3
4
# File 'lib/tuio-ruby/tuio_parameter.rb', line 2

def session_id
  @session_id
end

#x_posObject

Returns the value of attribute x_pos.



2
3
4
# File 'lib/tuio-ruby/tuio_parameter.rb', line 2

def x_pos
  @x_pos
end

#x_speedObject

Returns the value of attribute x_speed.



2
3
4
# File 'lib/tuio-ruby/tuio_parameter.rb', line 2

def x_speed
  @x_speed
end

#y_posObject

Returns the value of attribute y_pos.



2
3
4
# File 'lib/tuio-ruby/tuio_parameter.rb', line 2

def y_pos
  @y_pos
end

#y_speedObject

Returns the value of attribute y_speed.



2
3
4
# File 'lib/tuio-ruby/tuio_parameter.rb', line 2

def y_speed
  @y_speed
end

Class Method Details

.new_from_initial_params(session_id, x_pos, y_pos) ⇒ Object



4
5
6
# File 'lib/tuio-ruby/tuio_parameter.rb', line 4

def self.new_from_initial_params( session_id, x_pos, y_pos )
  new session_id, x_pos, y_pos, 0.0, 0.0, 00
end