snogglethorpe / snogray

Snogray renderer

Home Page:http://www.nongnu.org/snogray

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add convenience functionality to Lua surface.mesh function

snogglethorpe opened this issue · comments

  • 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 using load.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 of transform)
    • normal_indices ?? ... We don't support these natively, but can emulate them by duplicating vertices and adjusting references
    • uv_indices ?? ... same as normal_indices

This hopefully will make using surface.mesh convenient enough that we can drop the old utils.lua mesh-loading stuff...

See issue #37.