| 230 | buf.resize(dim.x * dim.y * dim.z); |
| 231 | } |
| 232 | void shift_depth(int16_t to_add) { |
| 233 | dim.z += to_add; |
| 234 | buf.insert(buf.begin(), dim.x*dim.y*to_add, T()); |
| 235 | } |
| 236 | |
| 237 | T &operator() (int x, int y, int z = 0) { |
| 238 | return buf[x + dim.x*(y + dim.y*z)]; |