コード例 #1
0
ファイル: Tool.cs プロジェクト: azykise/olawork
        public static IntersectionPair Intersect(Point screenpt, Plane plane, View view)
        {
            Vector3F pos = view.getCamera().getScreenWorldLocation(screenpt.X, screenpt.Y, view);
            Vector3F dir = pos - view.getCamera().Position; dir.Normalize();

            Ray ray = new Ray(pos, dir);
            IntersectionPair res = Sharp3D.Math.Geometry3D.IntersectionMethods.Intersects(ray, plane);
            return res;
        }
コード例 #2
0
 /// <summary>
 /// Tests for intersection between a ray and a a sphere.
 /// </summary>
 /// <param name="ray">A <see cref="Ray"/> instance.</param>
 /// <param name="sphere">A <see cref="Sphere"/> instance.</param>
 /// <returns>An <see cref="IntersectionPair"/> instance containing the intersection information.</returns>
 public static IntersectionPair Intersects(Ray ray, Sphere sphere)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 /// <summary>
 /// Tests for intersection between a ray and a an axis aligned box.
 /// </summary>
 /// <param name="ray">A <see cref="Ray"/> instance.</param>
 /// <param name="aabb">A <see cref="AxisAlignedBox"/> instance.</param>
 /// <returns>An <see cref="IntersectionPair"/> instance containing the intersection information.</returns>
 public static IntersectionPair Intersects(Ray ray, AxisAlignedBox aabb)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 /// <summary>
 /// Tests for intersection between a ray and a an oriented box.
 /// </summary>
 /// <param name="ray">A <see cref="Ray"/> instance.</param>
 /// <param name="obb">A <see cref="OrientedBox"/> instance.</param>
 /// <returns>An <see cref="IntersectionPair"/> instance containing the intersection information.</returns>
 public static IntersectionPair Intersects(Ray ray, OrientedBox obb)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
ファイル: Ray.cs プロジェクト: minrogi/PLMPack
		/// <summary>
		/// Initializes a new instance of the <see cref="Ray"/> class using given ray.
		/// </summary>
		/// <param name="ray">A <see cref="Ray"/> instance to assign values from.</param>
		public Ray(Ray ray)
		{
			_origin = ray.Origin;
			_direction = ray.Direction;
		}