Module: Gubby::Components::Position2D

Defined in:
lib/gubby/components/position_2d.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#angleObject

Returns the value of attribute angle.



8
9
10
# File 'lib/gubby/components/position_2d.rb', line 8

def angle
  @angle
end

#center_xObject

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_yObject

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_xObject

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_yObject

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

#xObject

Returns the value of attribute x.



8
9
10
# File 'lib/gubby/components/position_2d.rb', line 8

def x
  @x
end

#yObject

Returns the value of attribute y.



8
9
10
# File 'lib/gubby/components/position_2d.rb', line 8

def y
  @y
end

#zObject

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