Class: Polygon
Direct Known Subclasses
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#points ⇒ Object
readonly
Returns the value of attribute points.
Instance Method Summary collapse
-
#initialize(points, paths = nil) ⇒ Polygon
constructor
A new instance of Polygon.
Methods inherited from Shape
#*, #+, #-, #align, #back, #bbox, #bottom, #center, #cx, #cy, #cz, #extrude, #front, #left, #maxx, #maxy, #maxz, #minx, #miny, #minz, #mirror, #mirror_x, #mirror_y, #mirror_z, #move, #move_x, #move_y, #move_z, #render, #revolve, #right, #rot_x, #rot_y, #rot_z, #rotate, #scale, #scale_x, #scale_y, #scale_z, #top, #transform, #xcenter, #xsize, #ycenter, #ysize, #zcenter, #zsize, #~@
Constructor Details
#initialize(points, paths = nil) ⇒ Polygon
Returns a new instance of Polygon.
406 407 408 409 |
# File 'lib/rcad.rb', line 406 def initialize(points, paths=nil) @points = points @paths = paths || [(0...points.size).to_a] end |
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
404 405 406 |
# File 'lib/rcad.rb', line 404 def paths @paths end |
#points ⇒ Object (readonly)
Returns the value of attribute points.
404 405 406 |
# File 'lib/rcad.rb', line 404 def points @points end |