Bounds.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Math
  7. * @{
  8. */
  9. /// <summary>
  10. /// Bounds represented by an axis aligned box and a sphere.
  11. /// </summary>
  12. [StructLayout(LayoutKind.Sequential), SerializeObject]
  13. public struct Bounds
  14. {
  15. /// <summary>
  16. /// Creates new bounds.
  17. /// </summary>
  18. /// <param name="box">Axis aligned box representation of the bounds.</param>
  19. /// <param name="sphere">Sphere representation of the bounds.</param>
  20. public Bounds(AABox box, Sphere sphere)
  21. {
  22. Box = box;
  23. Sphere = sphere;
  24. }
  25. /// <summary>
  26. /// Axis aligned box representation of the bounds.
  27. /// </summary>
  28. public AABox Box;
  29. /// <summary>
  30. /// Sphere representation of the bounds.
  31. /// </summary>
  32. public Sphere Sphere;
  33. }
  34. /** @} */
  35. }