setMassData.lua 1.1 KB

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