setBoundingBox.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. return {
  2. summary = 'Set or remove the bounding box of the Mesh.',
  3. description = [[
  4. Sets or removes the axis-aligned bounding box of the Mesh.
  5. Meshes with the `cpu` storage mode can compute their bounding box automatically using
  6. `Mesh:computeBoundingBox`.
  7. Passes will use the bounding box of a Mesh to cull it against the cameras when
  8. `Pass:setViewCull` is enabled, which avoids rendering it when it's out of view.
  9. ]],
  10. arguments = {
  11. minx = {
  12. type = 'number',
  13. description = 'The minimum x coordinate of the bounding box.'
  14. },
  15. maxx = {
  16. type = 'number',
  17. description = 'The maximum x coordinate of the bounding box.'
  18. },
  19. miny = {
  20. type = 'number',
  21. description = 'The minimum y coordinate of the bounding box.'
  22. },
  23. maxy = {
  24. type = 'number',
  25. description = 'The maximum y coordinate of the bounding box.'
  26. },
  27. minz = {
  28. type = 'number',
  29. description = 'The minimum z coordinate of the bounding box.'
  30. },
  31. maxz = {
  32. type = 'number',
  33. description = 'The maximum z coordinate of the bounding box.'
  34. }
  35. },
  36. returns = {},
  37. variants = {
  38. {
  39. arguments = { 'minx', 'maxx', 'miny', 'maxy', 'minz', 'maxz' },
  40. returns = {}
  41. },
  42. {
  43. description = 'Remove the bounding box.',
  44. arguments = {},
  45. returns = {}
  46. }
  47. },
  48. related = {
  49. 'Mesh:computeBoundingBox',
  50. 'Pass:setViewCull',
  51. 'Collider:getAABB',
  52. 'Shape:getAABB',
  53. 'Model:getBoundingBox',
  54. 'ModelData:getBoundingBox'
  55. }
  56. }