import shape_object 
, colors 

, ../vk/[ vulkan
        , vulkan_record 
        , pipeline_record
        ,  buffer
        ]

, glm 
, ../camera 

type 
 Space_Type* = enum 
  Empty 
  Spawner 
 
 Space* = object 
  render*: bool
  the_type*: Space_Type
  shape*: Shape 

 Static_Row[N] = array[N, Space]
 
 Static_Grid_Object[R, C] = object of RootObj
  spaces*: array[R, Static_Row[C]] 
  space_size*: int 
 
 Dynamic_Row = seq[Space]
 
 Dynamic_Grid_Object = object of RootObj
  rows*: seq[Dynamic_Row] 
  space_size*: int 

 Static_Grid* = ref object of Static_Grid_Object
 Dynamic_Grid* = ref object of Dynamic_Grid_Object


#[ proc a_dynamic_grid*( rows: int 
                    , columns: int
                    , rec: var Vulkan_Record 
                    , render_pass: VkRenderPass
                    , pipeline_record: Pipeline_Record
                    , current_entity_id: int  
                    , parent_buffer:  var Buffer
                    ): Dynamic_Grid = 
 
 result = Dynamic_Grid()
 result.rows.setlen rows 
 for row in result.rows.mitems:
  row.setlen columns
 
 for row in result.rows.mitems:
  for space in row.mitems:
   space.shape = a_shape( parent_buffer
                        , rec 
                        , pipeline_record
                        , render_pass
                        , current_entity_id
                        , 4
                        , "plane0_quad"
                        , theSize = vec2f( 80
                                         , 40
                                         )
                        , being_color = dark_purple
                        , deshn_color = yellow
                        , camera_type = Camera_Kind.Perspective
                        , hollow = false
                        )
 ]#