Class: GridGenerator::DinoCube::LeftElementFactory

Inherits:
ElementFactory show all
Defined in:
lib/grid_generator/dino_cube/left_element_factory.rb

Instance Attribute Summary

Attributes inherited from ElementFactory

#col_num, #colour, #grid_x, #grid_y, #opacity, #row_num, #units

Instance Method Summary collapse

Methods inherited from ElementFactory

#build, #initialize, #offset, #points

Constructor Details

This class inherits a constructor from GridGenerator::DinoCube::ElementFactory

Instance Method Details

#anchorsObject



6
7
8
9
10
11
12
13
14
# File 'lib/grid_generator/dino_cube/left_element_factory.rb', line 6

def anchors
  @anchors ||= {
    top_left_corner: Matrix.column_vector([0, 0]),
    top_right_corner: Matrix.column_vector([units, 0.5*units]),
    bottom_left_corner: Matrix.column_vector([0, units]),
    bottom_right_corner: Matrix.column_vector([units, 1.5*units]),
    center: Matrix.column_vector([0.5*units, 0.75*units])
  }
end