getNodeTransform.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. return {
  2. summary = 'Get the transform of a node.',
  3. description = 'Returns the transform (position, scale, and rotation) of a node.',
  4. arguments = {
  5. index = {
  6. type = 'number',
  7. description = 'The index of a node.'
  8. },
  9. name = {
  10. type = 'string',
  11. description = 'The name of a node.'
  12. },
  13. origin = {
  14. type = 'OriginType',
  15. default = [['root']],
  16. description = [[
  17. Whether the transform should be returned relative to the root node or the node's parent.
  18. ]]
  19. }
  20. },
  21. returns = {
  22. x = {
  23. type = 'number',
  24. description = 'The x position of the node.'
  25. },
  26. y = {
  27. type = 'number',
  28. description = 'The y position of the node.'
  29. },
  30. z = {
  31. type = 'number',
  32. description = 'The z position of the node.'
  33. },
  34. sx = {
  35. type = 'number',
  36. description = 'The x scale of the node.'
  37. },
  38. sy = {
  39. type = 'number',
  40. description = 'The y scale of the node.'
  41. },
  42. sz = {
  43. type = 'number',
  44. description = 'The z scale of the node.'
  45. },
  46. angle = {
  47. type = 'number',
  48. description = 'The number of radians the node is rotated around its axis of rotation.'
  49. },
  50. ax = {
  51. type = 'number',
  52. description = 'The x component of the axis of rotation.'
  53. },
  54. ay = {
  55. type = 'number',
  56. description = 'The y component of the axis of rotation.'
  57. },
  58. az = {
  59. type = 'number',
  60. description = 'The z component of the axis of rotation.'
  61. }
  62. },
  63. variants = {
  64. {
  65. arguments = { 'index', 'origin' },
  66. returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
  67. },
  68. {
  69. arguments = { 'name', 'origin' },
  70. returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
  71. }
  72. },
  73. related = {
  74. 'Model:getNodePosition',
  75. 'Model:setNodePosition',
  76. 'Model:getNodeOrientation',
  77. 'Model:setNodeOrientation',
  78. 'Model:getNodeScale',
  79. 'Model:setNodeScale',
  80. 'Model:getNodePose',
  81. 'Model:setNodePose',
  82. 'Model:animate'
  83. }
  84. }