PageRenderTime 126ms CodeModel.GetById 31ms RepoModel.GetById 3ms app.codeStats 0ms

/Utilities/Datatypes/Advanced/IIntersects.cs

#
C# | 43 lines | 12 code | 3 blank | 28 comment | 0 complexity | a3ee48540c7776e4c3b57ea19514e7cb MD5 | raw file
Possible License(s): Apache-2.0
  1. namespace Delta.Utilities.Datatypes.Advanced
  2. {
  3. /// <summary>
  4. /// Interface Intersects checks whether two Delta.Utilities.Datatypes
  5. /// intersect with each other.
  6. /// </summary>
  7. public interface IIntersects
  8. {
  9. #region Intersects (Public)
  10. /// <summary>
  11. /// Intersects the current object with specified ray and returns true
  12. /// plus the intersectionPosition if the ray hits this object.
  13. /// </summary>
  14. /// <param name="ray">The ray to check with</param>
  15. /// <param name="intersectionPosition">The intersection vector</param>
  16. /// <returns>True if the ray intersected with this object</returns>
  17. bool Intersects(Ray ray, out Vector intersectionPosition);
  18. /// <summary>
  19. /// Intersects the current object with specified plane and returns true
  20. /// plus the intersectionPosition if the plane intersects this object.
  21. /// </summary>
  22. /// <param name="plane">The plane to check with</param>
  23. /// <param name="intersectionPosition">The intersection vector</param>
  24. /// <returns>True if the plane intersected with this object</returns>
  25. bool Intersects(Plane plane, out Vector intersectionPosition);
  26. /// <summary>
  27. /// Intersects the current object with the specified sphere.
  28. /// </summary>
  29. /// <param name="sphere">The sphere to check against</param>
  30. /// <returns>True if the sphere intersected with this object</returns>
  31. bool Intersects(BoundingSphere sphere);
  32. /// <summary>
  33. /// Intersects the current object with the specified box.
  34. /// </summary>
  35. /// <param name="box">The box to check against</param>
  36. /// <returns>True if the box intersected with this object</returns>
  37. bool Intersects(BoundingBox box);
  38. #endregion
  39. }
  40. }