Class: Carbuncle::Gesture::Pinch

Inherits:
Event show all
Defined in:
gems/carbuncle-input/mrblib/gesture.rb

Overview

Has the information of the pinch gesture

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Event

#to_s

Constructor Details

#initialize(vector, angle) ⇒ Pinch

Returns a new instance of Pinch.



106
107
108
109
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 106

def initialize(vector, angle)
  @vector = vector
  @angle = angle
end

Instance Attribute Details

#angleFloat (readonly)

The pinch’s angle

Returns:



104
105
106
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 104

def angle
  @angle
end

#vectorPoint (readonly)

The pinch vector

Returns:



101
102
103
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 101

def vector
  @vector
end

Instance Method Details

#inspectObject



111
112
113
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 111

def inspect
  "Pinch(#{vector}, #{angle})"
end