pub fn chunk_grid(res: u32) -> (Vec<[f32; 3]>, Vec<i32>)Expand description
Generate the triangular grid vertices and triangle indices for a chunk at resolution res.
Returns (vertices, indices) where:
vertices: exactlyverts_per_chunk(res)entries — theinterior_verts_per_chunk(res)interior grid verts in canonical(i,j)row-major order FIRST, then the3*(res+1)perimeter skirt verts (see the module docs). Each is[wa, wb, wc]withwa+wb+wc=1; a skirt vert carries the same barycentric as the interior edge vert it mirrors.indices: exactly(res*res + 6*res)*3values — theres*resinterior triangles FIRST, then the6*resskirt triangles, all with uniform winding (outward = front) so the surface shader can use backface culling (render_mode cull_back).
§Panics
Panics if res == 0.