Module: Gubby::Components::Position2D
- Defined in:
- lib/gubby/components/position_2d.rb
Instance Attribute Summary collapse
-
#angle ⇒ Object
Returns the value of attribute angle.
-
#center_x ⇒ Object
Returns the value of attribute center_x.
-
#center_y ⇒ Object
Returns the value of attribute center_y.
-
#factor_x ⇒ Object
Returns the value of attribute factor_x.
-
#factor_y ⇒ Object
Returns the value of attribute factor_y.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
-
#z ⇒ Object
Returns the value of attribute z.
Class Method Summary collapse
Instance Attribute Details
#angle ⇒ Object
Returns the value of attribute angle.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def angle @angle end |
#center_x ⇒ Object
Returns the value of attribute center_x.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def center_x @center_x end |
#center_y ⇒ Object
Returns the value of attribute center_y.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def center_y @center_y end |
#factor_x ⇒ Object
Returns the value of attribute factor_x.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def factor_x @factor_x end |
#factor_y ⇒ Object
Returns the value of attribute factor_y.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def factor_y @factor_y end |
#x ⇒ Object
Returns the value of attribute x.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def y @y end |
#z ⇒ Object
Returns the value of attribute z.
8 9 10 |
# File 'lib/gubby/components/position_2d.rb', line 8 def z @z end |
Class Method Details
.extend_object(e) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gubby/components/position_2d.rb', line 10 def Position2D.extend_object(e) super(e) e.x = 0 e.y = 0 e.z = 1 e.angle = 0 e.center_x = 0.5 e.center_y = 0.5 e.factor_x = 1 e.factor_y = 1 end |