rotate.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. return {
  2. summary = 'Rotate the matrix.',
  3. description = 'Rotates the matrix using a quaternion or an angle/axis rotation.',
  4. arguments = {
  5. q = {
  6. type = 'Quat',
  7. description = 'The rotation to apply to the matrix.'
  8. },
  9. angle = {
  10. type = 'number',
  11. description = 'The angle component of the angle/axis rotation (radians).'
  12. },
  13. ax = {
  14. type = 'number',
  15. default = '0',
  16. description = 'The x component of the axis of rotation.'
  17. },
  18. ay = {
  19. type = 'number',
  20. default = '1',
  21. description = 'The y component of the axis of rotation.'
  22. },
  23. az = {
  24. type = 'number',
  25. default = '0',
  26. description = 'The z component of the axis of rotation.'
  27. }
  28. },
  29. returns = {
  30. self = {
  31. type = 'Mat4',
  32. description = 'The rotated matrix.'
  33. }
  34. },
  35. variants = {
  36. {
  37. arguments = { 'q' },
  38. returns = { 'self' }
  39. },
  40. {
  41. arguments = { 'angle', 'ax', 'ay', 'az' },
  42. returns = { 'self' }
  43. }
  44. },
  45. related = {
  46. 'Mat4:translate',
  47. 'Mat4:scale',
  48. 'Mat4:identity'
  49. }
  50. }