/Utilities/Datatypes/Advanced/ContainmentType.cs
# · C# · 35 lines · 9 code · 2 blank · 24 comment · 0 complexity · 2b35e599c8d2d722c7baca8f15bafeb3 MD5 · raw file
- namespace Delta.Utilities.Datatypes.Advanced
- {
- /// <summary>
- /// Containment type for collision checking in BoundingBox and
- /// BoundingSphere with their Intersects and Contains methods.
- /// <para />
- /// Can also be casted to a boolean to just return if there are intersecting
- /// or are contained in each other (true) or disjoint otherwise (false).
- /// </summary>
- public enum ContainmentType
- {
- /// <summary>
- /// Two objects are not touching and located with distance between them.
- /// There is no intersection going on and they are also not contained in
- /// each other.
- /// </summary>
- None = 0,
-
- /// <summary>
- /// The two physics objects intersect with each other because they
- /// partially are contained in each other.
- /// </summary>
- Partial = 1,
-
- /// <summary>
- /// One physics object is fully contains the calling object, e.g.
- /// <code>
- /// simpleBox.Contains(someSphere) == ContainmentType.Fully for
- /// BoundingBox simpleBox = new BoundingBox(Vector.Zero, Vector.One);
- /// BoundingSphere someSphere = new BoundingSphere(Vector.Half, 0.1f);
- /// </code>
- /// </summary>
- Fully = 2,
- }
- }