Class: Sevgi::Sundries::Grid::Axis::Query Private

Inherits:
Object
  • Object
show all
Defined in:
lib/sevgi/sundries/grid.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Memoized grid line query for an axis.

Direct Known Subclasses

Halve, Major, Minor

Instance Method Summary collapse

Constructor Details

#initialize(this, other) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates a query.

Parameters:



87
# File 'lib/sevgi/sundries/grid.rb', line 87

def initialize(this, other) = (@this, @other = this, other)

Instance Method Details

#linesArray<Sevgi::Geometry::Line>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns generated grid lines.

Returns:

  • (Array<Sevgi::Geometry::Line>)


99
# File 'lib/sevgi/sundries/grid.rb', line 99

def lines = @lines ||= lines!

#pointsArray<Array<Sevgi::Geometry::Point>>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns grid line endpoints as points.

Returns:

  • (Array<Array<Sevgi::Geometry::Point>>)


95
# File 'lib/sevgi/sundries/grid.rb', line 95

def points = @points ||= lines.map { it.points(true) }

#xysArray<Array<Array<Float>>>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns grid line endpoints as coordinate pairs.

Returns:

  • (Array<Array<Array<Float>>>)


91
# File 'lib/sevgi/sundries/grid.rb', line 91

def xys = @xys ||= lines.map { it.points(true).map(&:deconstruct) }