getNodePose.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. return {
  2. summary = 'Get the pose of a node.',
  3. description = 'Returns the pose (position and orientation) 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 pose 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. angle = {
  35. type = 'number',
  36. description = 'The number of radians the node is rotated around its axis of rotation.'
  37. },
  38. ax = {
  39. type = 'number',
  40. description = 'The x component of the axis of rotation.'
  41. },
  42. ay = {
  43. type = 'number',
  44. description = 'The y component of the axis of rotation.'
  45. },
  46. az = {
  47. type = 'number',
  48. description = 'The z component of the axis of rotation.'
  49. }
  50. },
  51. variants = {
  52. {
  53. arguments = { 'index', 'origin' },
  54. returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
  55. },
  56. {
  57. arguments = { 'name', 'origin' },
  58. returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
  59. }
  60. },
  61. related = {
  62. 'Model:getNodePosition',
  63. 'Model:setNodePosition',
  64. 'Model:getNodeOrientation',
  65. 'Model:setNodeOrientation',
  66. 'Model:getNodeScale',
  67. 'Model:setNodeScale',
  68. 'Model:getNodeTransform',
  69. 'Model:setNodeTransform',
  70. 'Model:animate'
  71. }
  72. }