getMassData.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. return {
  2. summary = 'Compute mass properties for the Collider.',
  3. description = 'Computes mass properties for the Collider.',
  4. arguments = {},
  5. returns = {
  6. {
  7. name = 'cx',
  8. type = 'number',
  9. description = 'The x position of the center of mass.'
  10. },
  11. {
  12. name = 'cy',
  13. type = 'number',
  14. description = 'The y position of the center of mass.'
  15. },
  16. {
  17. name = 'cz',
  18. type = 'number',
  19. description = 'The z position of the center of mass.'
  20. },
  21. {
  22. name = 'mass',
  23. type = 'number',
  24. description = 'The computed mass of the Collider.'
  25. },
  26. {
  27. name = 'inertia',
  28. type = 'table',
  29. description = [[
  30. A table containing 6 values of the rotational inertia tensor matrix. The table contains the
  31. 3 diagonal elements of the matrix (upper left to bottom right), followed by the 3 elements
  32. of the upper right portion of the 3x3 matrix.
  33. ]]
  34. }
  35. },
  36. related = {
  37. 'Collider:getMass',
  38. 'Collider:setMass',
  39. 'Shape:getMass'
  40. }
  41. }