Class: Transform
- Inherits:
-
Object
- Object
- Transform
- Defined in:
- lib/rcad.rb
Instance Method Summary collapse
- #mirror_x ⇒ Object
- #mirror_y ⇒ Object
- #mirror_z ⇒ Object
- #move_x(delta) ⇒ Object
- #move_y(delta) ⇒ Object
- #move_z(delta) ⇒ Object
- #rot_x(angle) ⇒ Object
- #rot_y(angle) ⇒ Object
- #rot_z(angle) ⇒ Object
- #scale_x(factor) ⇒ Object
- #scale_y(factor) ⇒ Object
- #scale_z(factor) ⇒ Object
Instance Method Details
#mirror_x ⇒ Object
78 79 80 |
# File 'lib/rcad.rb', line 78 def mirror_x mirror(1, 0, 0) end |
#mirror_y ⇒ Object
82 83 84 |
# File 'lib/rcad.rb', line 82 def mirror_y mirror(0, 1, 0) end |
#mirror_z ⇒ Object
86 87 88 |
# File 'lib/rcad.rb', line 86 def mirror_z mirror(0, 0, 1) end |
#move_x(delta) ⇒ Object
42 43 44 |
# File 'lib/rcad.rb', line 42 def move_x(delta) move(delta, 0, 0) end |
#move_y(delta) ⇒ Object
46 47 48 |
# File 'lib/rcad.rb', line 46 def move_y(delta) move(0, delta, 0) end |
#move_z(delta) ⇒ Object
50 51 52 |
# File 'lib/rcad.rb', line 50 def move_z(delta) move(0, 0, delta) end |
#rot_x(angle) ⇒ Object
54 55 56 |
# File 'lib/rcad.rb', line 54 def rot_x(angle) rotate(angle, [1, 0, 0]) end |
#rot_y(angle) ⇒ Object
58 59 60 |
# File 'lib/rcad.rb', line 58 def rot_y(angle) rotate(angle, [0, 1, 0]) end |
#rot_z(angle) ⇒ Object
62 63 64 |
# File 'lib/rcad.rb', line 62 def rot_z(angle) rotate(angle, [0, 0, 1]) end |
#scale_x(factor) ⇒ Object
66 67 68 |
# File 'lib/rcad.rb', line 66 def scale_x(factor) scale(factor, 1, 1) end |
#scale_y(factor) ⇒ Object
70 71 72 |
# File 'lib/rcad.rb', line 70 def scale_y(factor) scale(1, factor, 1) end |
#scale_z(factor) ⇒ Object
74 75 76 |
# File 'lib/rcad.rb', line 74 def scale_z(factor) scale(1, 1, factor) end |