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; }
/// <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(); }
/// <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(); }
/// <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(); }
/// <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; }