Module: Chem::Transform::TwoDimension
- Included in:
- ThreeDimension
- Defined in:
- lib/chem/utils/transform.rb
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
11 12 13 14 |
# File 'lib/chem/utils/transform.rb', line 11 def initialize super @pos = Vector[0.0, 0.0] end |
#pos ⇒ Object
16 |
# File 'lib/chem/utils/transform.rb', line 16 def pos ; @pos ||= Vector[@x, @y, @z] ; end |
#x ⇒ Object
17 |
# File 'lib/chem/utils/transform.rb', line 17 def x ; pos[0] ; end |
#x=(x_val) ⇒ Object
19 |
# File 'lib/chem/utils/transform.rb', line 19 def x=(x_val) ; pos[0] = x_val ; end |
#y ⇒ Object
18 |
# File 'lib/chem/utils/transform.rb', line 18 def y ; pos[1] ; end |
#y=(y_val) ⇒ Object
20 |
# File 'lib/chem/utils/transform.rb', line 20 def y=(y_val) ; pos[1] = y_val ; end |