fov.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. return {
  2. summary = 'Set a projection using raw field of view 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. left = {
  9. type = 'number',
  10. description = 'The left half-angle of the projection, in radians.'
  11. },
  12. right = {
  13. type = 'number',
  14. description = 'The right half-angle of the projection, in radians.'
  15. },
  16. up = {
  17. type = 'number',
  18. description = 'The top half-angle of the projection, in radians.'
  19. },
  20. down = {
  21. type = 'number',
  22. description = 'The bottom half-angle of the projection, in radians.'
  23. },
  24. near = {
  25. type = 'number',
  26. description = 'The near plane of the projection.'
  27. },
  28. far = {
  29. type = 'number',
  30. default = '0',
  31. description = [[
  32. The far plane. Zero is a special value that will set an infinite far plane with a reversed
  33. Z range, which improves depth buffer precision and is the default.
  34. ]]
  35. }
  36. },
  37. returns = {
  38. self = {
  39. type = 'Mat4',
  40. description = 'The modified matrix.'
  41. }
  42. },
  43. variants = {
  44. {
  45. arguments = { 'left', 'right', 'up', 'down', 'near', 'far' },
  46. returns = { 'self' }
  47. }
  48. },
  49. related = {
  50. 'Mat4:orthographic',
  51. 'Mat4:perspective',
  52. 'Pass:setProjection'
  53. }
  54. }