Class: Sevgi::Sundries::Grid::Axis::Query
- Inherits:
-
Object
- Object
- Sevgi::Sundries::Grid::Axis::Query
- Defined in:
- lib/sevgi/sundries/grid.rb
Overview
Memoized grid line query for an axis.
Instance Method Summary collapse
-
#initialize(this, other) ⇒ void
constructor
Creates a query.
-
#lines ⇒ Array<Sevgi::Geometry::Line>
Returns generated grid lines.
-
#points ⇒ Array<Array<Sevgi::Geometry::Point>>
Returns grid line endpoints as points.
-
#xys ⇒ Array<Array<Array<Float>>>
Returns grid line endpoints as coordinate pairs.
Constructor Details
#initialize(this, other) ⇒ void
Creates a query.
85 |
# File 'lib/sevgi/sundries/grid.rb', line 85 def initialize(this, other) = (@this, @other = this, other) |
Instance Method Details
#lines ⇒ Array<Sevgi::Geometry::Line>
Returns generated grid lines.
97 |
# File 'lib/sevgi/sundries/grid.rb', line 97 def lines = @lines ||= lines! |
#points ⇒ Array<Array<Sevgi::Geometry::Point>>
Returns grid line endpoints as points.
93 |
# File 'lib/sevgi/sundries/grid.rb', line 93 def points = @points ||= lines.map { it.points(true) } |
#xys ⇒ Array<Array<Array<Float>>>
Returns grid line endpoints as coordinate pairs.
89 |
# File 'lib/sevgi/sundries/grid.rb', line 89 def xys = @xys ||= lines.map { it.points(true).map(&:deconstruct) } |