lazy QUAD
Opened this issue · 1 comments
I'd lost sight of how enormous this is, unnecessarily - the size comes from having structures for quads to belong to objects, and vertices to quads - but arguably none of that is needed, the vertices could be a raster template (xmin, xmax, ymin, ymax, nrow, ncol, crs) and a table of values and everything else be implicit, unless converted to a different type.
All that stuff, reprojection, setting NAs, setting colours and so on should be capture lazily until the vertex, index, and materials must be created so QUAD now should drop it until we can have those things.
I've pushed an updated lazy approach for QUAD, copy_down and plot3d. On creation $quad$value has the pixel values, but on copy_down that gets removed and either i) if is.null(z) the value gets propagated to the vertices or ii) the vertices are created to extract from z.
It's all structural, and in future we'll need quad and vertex, and simply keep either or both if we have to have explicit x, y, etc.
TODO: make this work for the internal reproject