transform.lua 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. return {
  2. tag = 'transform',
  3. summary = 'Apply a general transform to the coordinate system.',
  4. description = 'Transforms the coordinate system.',
  5. arguments = {
  6. x = {
  7. type = 'number',
  8. description = 'The x component of the translation.'
  9. },
  10. y = {
  11. type = 'number',
  12. description = 'The y component of the translation.'
  13. },
  14. z = {
  15. type = 'number',
  16. description = 'The z component of the translation.'
  17. },
  18. sx = {
  19. type = 'number',
  20. description = 'The x component of the scale.'
  21. },
  22. sy = {
  23. type = 'number',
  24. description = 'The y component of the scale.'
  25. },
  26. sz = {
  27. type = 'number',
  28. description = 'The z component of the scale.'
  29. },
  30. angle = {
  31. type = 'number',
  32. description = 'The amount to rotate the coordinate system by, in radians.'
  33. },
  34. ax = {
  35. type = 'number',
  36. description = 'The x component of the axis of rotation.'
  37. },
  38. ay = {
  39. type = 'number',
  40. description = 'The y component of the axis of rotation.'
  41. },
  42. az = {
  43. type = 'number',
  44. description = 'The z component of the axis of rotation.'
  45. },
  46. translation = {
  47. type = 'Vec3',
  48. description = 'The translation to apply.'
  49. },
  50. scale = {
  51. type = 'Vec3',
  52. description = 'The scale to apply.'
  53. },
  54. rotation = {
  55. type = 'Quat',
  56. description = 'A quaternion containing the rotation to apply.'
  57. },
  58. transform = {
  59. type = 'Mat4',
  60. description = 'A matrix containing the transformation to apply.'
  61. }
  62. },
  63. returns = {},
  64. variants = {
  65. {
  66. description = 'Transform the coordinate system using numbers.',
  67. arguments = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' },
  68. returns = {}
  69. },
  70. {
  71. description = 'Transform the coordinate system using vector types.',
  72. arguments = { 'translation', 'scale', 'rotation' },
  73. returns = {}
  74. },
  75. {
  76. description = 'Transform the coordinate system using a matrix.',
  77. arguments = { 'transform' },
  78. returns = {}
  79. }
  80. },
  81. related = {
  82. 'Pass:translate',
  83. 'Pass:rotate',
  84. 'Pass:scale',
  85. 'Pass:origin',
  86. 'Pass:push',
  87. 'Pass:pop'
  88. }
  89. }