getMeshIndexFormat.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. return {
  2. summary = 'Get the data format of vertex indices in a mesh.',
  3. description = [[
  4. Returns the data format of vertex indices in a mesh. If a mesh doesn't use vertex indices, this
  5. function returns nil.
  6. ]],
  7. arguments = {
  8. mesh = {
  9. type = 'number',
  10. description = 'The index of a mesh.'
  11. }
  12. },
  13. returns = {
  14. type = {
  15. type = 'AttributeType',
  16. description = 'The data type of each vertex index (always u16 or u32).'
  17. },
  18. blob = {
  19. type = 'number',
  20. description = 'The index of a Blob in the mesh where the binary data is stored.'
  21. },
  22. offset = {
  23. type = 'number',
  24. description = 'A byte offset into the Blob\'s data where the index data starts.'
  25. },
  26. stride = {
  27. type = 'number',
  28. description = [[
  29. The number of bytes between subsequent vertex indices. Indices are always tightly packed,
  30. so this will always be 2 or 4 depending on the data type.
  31. ]]
  32. }
  33. },
  34. variants = {
  35. {
  36. arguments = { 'mesh' },
  37. returns = { 'type', 'blob', 'offset', 'stride' }
  38. }
  39. },
  40. related = {
  41. 'ModelData:getMeshVertexFormat'
  42. }
  43. }