getMass.lua 1.2 KB

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