PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/Utilities/Datatypes/Advanced/ContainmentType.cs

#
C# | 35 lines | 9 code | 2 blank | 24 comment | 0 complexity | 2b35e599c8d2d722c7baca8f15bafeb3 MD5 | raw file
Possible License(s): Apache-2.0
  1. namespace Delta.Utilities.Datatypes.Advanced
  2. {
  3. /// <summary>
  4. /// Containment type for collision checking in BoundingBox and
  5. /// BoundingSphere with their Intersects and Contains methods.
  6. /// <para />
  7. /// Can also be casted to a boolean to just return if there are intersecting
  8. /// or are contained in each other (true) or disjoint otherwise (false).
  9. /// </summary>
  10. public enum ContainmentType
  11. {
  12. /// <summary>
  13. /// Two objects are not touching and located with distance between them.
  14. /// There is no intersection going on and they are also not contained in
  15. /// each other.
  16. /// </summary>
  17. None = 0,
  18. /// <summary>
  19. /// The two physics objects intersect with each other because they
  20. /// partially are contained in each other.
  21. /// </summary>
  22. Partial = 1,
  23. /// <summary>
  24. /// One physics object is fully contains the calling object, e.g.
  25. /// <code>
  26. /// simpleBox.Contains(someSphere) == ContainmentType.Fully for
  27. /// BoundingBox simpleBox = new BoundingBox(Vector.Zero, Vector.One);
  28. /// BoundingSphere someSphere = new BoundingSphere(Vector.Half, 0.1f);
  29. /// </code>
  30. /// </summary>
  31. Fully = 2,
  32. }
  33. }