Class: Artoo::Drivers::Leapmotion::Frame

Inherits:
Object
  • Object
show all
Defined in:
lib/artoo/drivers/leapmotion/frame.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Frame

Returns a new instance of Frame.



11
12
13
14
15
16
17
18
19
20
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 11

def initialize(data)
  @hands = Artoo::Drivers::Leapmotion::Hand.list(data)
  @gestures = Artoo::Drivers::Leapmotion::Gesture.list(data)
  @pointables = Artoo::Drivers::Leapmotion::Pointable.list(data)
  @id = data["id"]
  @timestamp = data["timestamp"]
  @r = data["r"]
  @s = data["s"]
  @t = data["t"]
end

Instance Attribute Details

#gesturesObject (readonly)

Returns the value of attribute gestures.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def gestures
  @gestures
end

#handsObject (readonly)

Returns the value of attribute hands.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def hands
  @hands
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def id
  @id
end

#pointablesObject (readonly)

Returns the value of attribute pointables.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def pointables
  @pointables
end

#rObject (readonly)

Returns the value of attribute r.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def r
  @r
end

#sObject (readonly)

Returns the value of attribute s.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def s
  @s
end

#tObject (readonly)

Returns the value of attribute t.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def t
  @t
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



10
11
12
# File 'lib/artoo/drivers/leapmotion/frame.rb', line 10

def timestamp
  @timestamp
end