{"action":"created","issue":{"url":"https://api.github.com/repos/bobombolo/automata/issues/46","labels_url":"https://api.github.com/repos/bobombolo/automata/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/bobombolo/automata/issues/46/comments","events_url":"https://api.github.com/repos/bobombolo/automata/issues/46/events","html_url":"https://github.com/bobombolo/automata/issues/46","id":94805876,"number":46,"title":"calculate indices instead of pos_hashes, and instead of neighbor offsets","user":{"login":"bobombolo","id":12679496,"avatar_url":"https://avatars.githubusercontent.com/u/12679496?v=3","gravatar_id":"","url":"https://api.github.com/users/bobombolo","html_url":"https://github.com/bobombolo","followers_url":"https://api.github.com/users/bobombolo/followers","following_url":"https://api.github.com/users/bobombolo/following{/other_user}","gists_url":"https://api.github.com/users/bobombolo/gists{/gist_id}","starred_url":"https://api.github.com/users/bobombolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobombolo/subscriptions","organizations_url":"https://api.github.com/users/bobombolo/orgs","repos_url":"https://api.github.com/users/bobombolo/repos","events_url":"https://api.github.com/users/bobombolo/events{/privacy}","received_events_url":"https://api.github.com/users/bobombolo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bobombolo/automata/labels/code%20refactor","name":"code refactor","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-13T20:38:10Z","updated_at":"2015-07-13T20:47:28Z","closed_at":null,"body":"storage of voxelarea indices as the cell list key is equivalent to hashing node positions -- this is only done that we might efficiently check to see if the cell is already in the list. in fact, now, the only such list that we need to be doing this with is the empty_neighbor list, since everything else is handled so explicitly that duplicates are impossible. this internal list is also the easiest to use indicies with since it is temporary and we are already using voxel:area by this time.\r\n\r\nneighbor offsets could be calculated by the same method that area:index() uses internally, ie: using zstride and ystride, perhaps it is possible to use an integer offset for each n? \r\n\r\nthe real problem is that we use one envelope (pmin/pmax) to generate the area, and store that, but then on the next grow we need a new envelope, which makes all the old indicies obsolete. is there a simple way to adjust all the old indicies so that we don't have to convert old_vi to pos to new_vi ?"},"comment":{"url":"https://api.github.com/repos/bobombolo/automata/issues/comments/121053157","html_url":"https://github.com/bobombolo/automata/issues/46#issuecomment-121053157","issue_url":"https://api.github.com/repos/bobombolo/automata/issues/46","id":121053157,"user":{"login":"bobombolo","id":12679496,"avatar_url":"https://avatars.githubusercontent.com/u/12679496?v=3","gravatar_id":"","url":"https://api.github.com/users/bobombolo","html_url":"https://github.com/bobombolo","followers_url":"https://api.github.com/users/bobombolo/followers","following_url":"https://api.github.com/users/bobombolo/following{/other_user}","gists_url":"https://api.github.com/users/bobombolo/gists{/gist_id}","starred_url":"https://api.github.com/users/bobombolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobombolo/subscriptions","organizations_url":"https://api.github.com/users/bobombolo/orgs","repos_url":"https://api.github.com/users/bobombolo/repos","events_url":"https://api.github.com/users/bobombolo/events{/privacy}","received_events_url":"https://api.github.com/users/bobombolo/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T20:47:28Z","updated_at":"2015-07-13T20:47:28Z","body":"see issue #29 \r\n<code>\r\nlocal idx_z_base = initial_index_offset\r\n   for z = z0, z1 do\r\n       local idx_y_base = idx_z_base\r\n       for y = y0, y1 do\r\n           local i = idx_y_base\r\n           for x = x0, x1 do\r\n               ... work here ...\r\n               i = i + 1\r\n           end\r\n           idx_y_base = idx_y_base + y_stride\r\n       end\r\n       idx_z_base = idx_z_base + z_stride\r\n   end\r\n</code>"}}