Closed mdsumner closed 4 years ago
Current design is documented in vignette source
but this old copy remains here:
x [0, 1]
and y [0, 1]
and default to "y-up" (begin at 0)material3d
back
argument).ydown
flips the orientation so that y coordinates begin at 1 and count down, and ensures that quad indexes are reversed and correctly counter-clockwise. break_mesh()
- removes topology from mesh3d, by expanding every coordinate from vertex arrayquad()
generate mesh3d, a rectangular array of quads in the plane in 0,1quad_texture()
- extension of quad() to include image texture, all geometry and texture has identical x-y plane coordinates in 0,1Wrap quad_ib
and quad_vb
callable from R.
IntegerVector quad_index_cpp(IntegerVector nx, IntegerVector ny, LogicalVector ydown)
NumericVector quad_vertex_cpp(IntegerVector nx, IntegerVector ny, LogicalVector ydown)
./inst/include/quad/quad.h
namespace quad
// returns nx * ny mesh3d$ib (a 4 * (nx * ny) matrix with a column for each quad
IntegerVector quad_ib(IntegerVector nx, IntegerVector ny, LogicalVector ydown);
// returns nx * ny mesh3d$vb[1:2, ] (a 2 * ((nx+1) * (ny+1)) matrix of xy)
NumericVector quad_vb(IntegerVector nx, IntegerVector ny, LogicalVector ydown);
Need to
Design above now in master with https://github.com/hypertidy/textures/pull/4
ib_index
andvb_vertex