Module: MiniScad::Transform
- Included in:
- Color, Cons, Cube, Cylinder, Difference, Hull, Intersection, Mirror, None, Projection, Rotate, Scale, Sphere, Translate, Union
- Defined in:
- lib/mini_scad.rb
Instance Method Summary collapse
- #&(val) ⇒ Object
- #+(val) ⇒ Object
- #-(val) ⇒ Object
- #color(r, g, b, a) ⇒ Object
- #hull ⇒ Object
- #mirror(x, y, z) ⇒ Object
- #projection ⇒ Object
- #render ⇒ Object
- #rotate(x, y, z) ⇒ Object
- #scale(x, y, z) ⇒ Object
- #translate(x, y, z) ⇒ Object
- #|(val) ⇒ Object
Instance Method Details
#&(val) ⇒ Object
91 92 93 |
# File 'lib/mini_scad.rb', line 91 def &(val) Intersection.new(self, val) end |
#-(val) ⇒ Object
99 100 101 |
# File 'lib/mini_scad.rb', line 99 def -(val) Difference.new(self, val) end |
#color(r, g, b, a) ⇒ Object
75 76 77 78 79 |
# File 'lib/mini_scad.rb', line 75 def color(r, g, b, a) Color.new(r, g, b, a) do self end end |
#mirror(x, y, z) ⇒ Object
57 58 59 60 61 |
# File 'lib/mini_scad.rb', line 57 def mirror(x, y, z) Mirror.new(x, y, z) do self end end |
#projection ⇒ Object
45 46 47 48 49 |
# File 'lib/mini_scad.rb', line 45 def projection Projection.new do self end end |
#render ⇒ Object
103 104 105 106 107 |
# File 'lib/mini_scad.rb', line 103 def render raise NotImplementError unless @renderer @renderer.() end |
#rotate(x, y, z) ⇒ Object
63 64 65 66 67 |
# File 'lib/mini_scad.rb', line 63 def rotate(x, y, z) Rotate.new(x, y, z) do self end end |
#scale(x, y, z) ⇒ Object
69 70 71 72 73 |
# File 'lib/mini_scad.rb', line 69 def scale(x, y, z) Scale.new(x, y, z) do self end end |