Add convenience functionality to Lua surface.mesh function
snogglethorpe opened this issue · comments
Miles Bader commented
- String loads a filename using
load.mesh
New arguments: - Optional transform matrices (transform, separate load-transform, both defaulting to identity)
- Standard table-with-keywords argument style with keywords for:
material
(sets mesh material)file
(loads mesh usingload.mesh
)vertices
(list of 3 * coordinates; list of positions too?)normals
(list of 3 * vector components; list of vectors too?)uvs
(list of 2 * UV coordinates)triangles
(list of 3 * vertex indices)transform
(applied to all of above)file_transform
(applied to file only, defaults to value oftransform
)normal_indices
?? ... We don't support these natively, but can emulate them by duplicating vertices and adjusting referencesuv_indices
?? ... same asnormal_indices
This hopefully will make using surface.mesh
convenient enough that we can drop the old utils.lua mesh-loading stuff...
See issue #37.