PageRenderTime 242ms CodeModel.GetById 110ms app.highlight 2ms RepoModel.GetById 109ms app.codeStats 0ms

/Utilities/Datatypes/Advanced/IIntersects.cs

#
C# | 43 lines | 12 code | 3 blank | 28 comment | 0 complexity | a3ee48540c7776e4c3b57ea19514e7cb MD5 | raw file
 1namespace 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
19		/// <summary>
20		/// Intersects the current object with specified plane and returns true
21		/// plus the intersectionPosition if the plane intersects this object.
22		/// </summary>
23		/// <param name="plane">The plane to check with</param>
24		/// <param name="intersectionPosition">The intersection vector</param>
25		/// <returns>True if the plane intersected with this object</returns>
26		bool Intersects(Plane plane, out Vector intersectionPosition);
27
28		/// <summary>
29		/// Intersects the current object with the specified sphere.
30		/// </summary>
31		/// <param name="sphere">The sphere to check against</param>
32		/// <returns>True if the sphere intersected with this object</returns>
33		bool Intersects(BoundingSphere sphere);
34
35		/// <summary>
36		/// Intersects the current object with the specified box.
37		/// </summary>
38		/// <param name="box">The box to check against</param>
39		/// <returns>True if the box intersected with this object</returns>
40		bool Intersects(BoundingBox box);
41		#endregion
42	}
43}