Sha256: dd220087ea11d6709f06fb3e3c46a2c624604a4d15b89f0c55a95dc0217a6fed

Contents?: true

Size: 1.7 KB

Versions: 17

Compression:

Stored size: 1.7 KB

Contents

require_relative './element_factory'

module GridGenerator
  module CurvyCopter 
    class TopElementFactory < ElementFactory
      def anchors
        @anchors ||= {
          top_left_corner: Matrix.column_vector([3*units, 0]),
          top_right_corner: Matrix.column_vector([6*units, 1.5*units]),
          bottom_left_corner: Matrix.column_vector([0, 1.5*units]),
          bottom_right_corner: Matrix.column_vector([3*units, 3*units]),

          top_edge_left: Matrix.column_vector([4*units, 0.5*units]),
          top_edge_right: Matrix.column_vector([5*units, units]),
          right_edge_top: Matrix.column_vector([5*units, 2*units]),
          right_edge_bottom: Matrix.column_vector([4*units, 2.5*units]),
          bottom_edge_left: Matrix.column_vector([units, 2*units]),
          bottom_edge_right: Matrix.column_vector([2*units, 2.5*units]),
          left_edge_top: Matrix.column_vector([2*units, 0.5*units]),
          left_edge_bottom: Matrix.column_vector([units, units]),

          center: Matrix.column_vector([3*units, 1.5*units]), 

          top_edge_center: Matrix.column_vector([3.75*units, 1.125*units]), 
          right_edge_center: Matrix.column_vector([3.75*units, 1.875*units]), 
          bottom_edge_center: Matrix.column_vector([2.25*units, 1.875*units]), 
          left_edge_center: Matrix.column_vector([2.25*units, 1.125*units]), 

          top_left_corner_center: Matrix.column_vector([3*units, 0.75*units]), 
          top_right_corner_center: Matrix.column_vector([4.5*units, 1.5*units]), 
          bottom_left_corner_center: Matrix.column_vector([1.5*units, 1.5*units]), 
          bottom_right_corner_center: Matrix.column_vector([3*units, 2.25*units]) 
        }
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
grid_generator-0.6.7 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.6.6 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.6.5 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.6.4 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.6.3 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.6.2 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.6.1 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.6.0 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.5.3 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.5.2 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.5.1 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.5.0 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.4.5 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.4.4 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.4.3 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.4.2 lib/grid_generator/curvy_copter/top_element_factory.rb
grid_generator-0.4.1 lib/grid_generator/curvy_copter/top_element_factory.rb