module Mlr
Constants
- AnchorPoint2D
- AnchorPoint3D
define point struct it is used everywhere
- DETECT_MODE
- MODE2D
modes
- MODE3D
- PYTHON
STRATEGIES
- ResultPoint2D
- ResultPoint3D
- SOLVER_LSE
sorvers
- STRATEGY
- VERSION
Public Class Methods
from_array(array)
click to toggle source
interface
# File lib/mlr.rb, line 45 def self.from_array(array) points = array.map do |line| case line.size when 3 then Mlr::AnchorPoint2D.new(*line) when 4 then Mlr::AnchorPoint3D.new(*line) else raise 'wrong number of elements in array' end end from_points(points) end
from_points(points)
click to toggle source
# File lib/mlr.rb, line 58 def self.from_points(points) strategy.get_point(points: points, mode: DETECT_MODE.call(points)) end
strategy()
click to toggle source
strategy selector
# File lib/mlr.rb, line 38 def self.strategy case STRATEGY when PYTHON then Mlr::Strategy::Python end end