fov.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. return {
  2. summary = 'Set a projection using raw FoV angles.',
  3. description = [[
  4. Sets a projection matrix using raw projection angles and clipping planes.
  5. This can be used for asymmetric or oblique projections.
  6. ]],
  7. arguments = {
  8. {
  9. name = 'left',
  10. type = 'number',
  11. description = 'The left half-angle of the projection, in radians.'
  12. },
  13. {
  14. name = 'right',
  15. type = 'number',
  16. description = 'The right half-angle of the projection, in radians.'
  17. },
  18. {
  19. name = 'up',
  20. type = 'number',
  21. description = 'The top half-angle of the projection, in radians.'
  22. },
  23. {
  24. name = 'down',
  25. type = 'number',
  26. description = 'The bottom half-angle of the projection, in radians.'
  27. },
  28. {
  29. name = 'near',
  30. type = 'number',
  31. description = 'The near plane of the projection.'
  32. },
  33. {
  34. name = 'far',
  35. type = 'number',
  36. description = 'The far plane of the projection.'
  37. }
  38. },
  39. returns = {
  40. {
  41. name = 'm',
  42. type = 'Mat4',
  43. description = 'The original matrix.'
  44. }
  45. },
  46. related = {
  47. 'Mat4:orthographic',
  48. 'Mat4:perspective',
  49. 'lovr.graphics.setProjection'
  50. }
  51. }