PageRenderTime 81ms CodeModel.GetById 39ms app.highlight 2ms RepoModel.GetById 39ms app.codeStats 0ms

/Utilities/Datatypes/Advanced/ContainmentType.cs

#
C# | 35 lines | 9 code | 2 blank | 24 comment | 0 complexity | 2b35e599c8d2d722c7baca8f15bafeb3 MD5 | raw file
 1namespace 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
19		/// <summary>
20		/// The two physics objects intersect with each other because they
21		/// partially are contained in each other.
22		/// </summary>
23		Partial = 1,
24
25		/// <summary>
26		/// One physics object is fully contains the calling object, e.g.
27		/// <code>
28		/// simpleBox.Contains(someSphere) == ContainmentType.Fully for
29		/// BoundingBox simpleBox = new BoundingBox(Vector.Zero, Vector.One);
30		/// BoundingSphere someSphere = new BoundingSphere(Vector.Half, 0.1f);
31		/// </code>
32		/// </summary>
33		Fully = 2,
34	}
35}