getMassData.lua 1.1 KB

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