Quickly generate an indexed mesh for a rectangular prism, because triangles.
mesh = prism([size], [position])
Returns a simplicial-complex-style mesh, i.e. an object with two properties:
mesh.positions: the prism's vertices.
mesh.cells: the prism's faces.
If you don't pass the function any arguments, you'll simply get a unit (1x1x1) cube mesh in return. You can optionally pass in the following arguments for your convenience:
size: the size of the prism. May either be a number (if you just want a cube), or an array with the
[x, y, z]dimensions of your new mesh. Defaults to
position: an array containing the
[x, y, z]position of the mesh. Defaults to
[0, 0, 0].
MIT. See LICENSE.md for details.