Class Ray3D
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Represents a ray in three-dimensional space.
public class Ray3D
- Inheritance
-
Ray3D
- Inherited Members
- Extension Methods
Constructors
Ray3D()
Initializes a new instance of the Ray3D class.
public Ray3D()
Ray3D(Point3D, Point3D)
Initializes a new instance of the Ray3D class.
public Ray3D(Point3D p0, Point3D p1)
Parameters
Ray3D(Point3D, Vector3D)
Initializes a new instance of the Ray3D class.
public Ray3D(Point3D origin, Vector3D direction)
Parameters
Properties
Direction
Gets or sets the direction.
public Vector3D Direction { get; set; }
Property Value
- Vector3D
The direction.
Origin
Gets or sets the origin.
public Point3D Origin { get; set; }
Property Value
- Point3D
The origin.
Methods
GetNearest(Point3D)
Gets the point on the ray that is nearest the specified point.
public Point3D GetNearest(Point3D p3)
Parameters
p3Point3DThe point.
Returns
- Point3D
The nearest point on the ray.
PlaneIntersection(Point3D, Vector3D)
Finds the intersection with a plane.
public Point3D? PlaneIntersection(Point3D position, Vector3D normal)
Parameters
Returns
- Point3D?
The intersection point.
PlaneIntersection(Point3D, Vector3D, out Point3D)
Finds the intersection with a plane.
public bool PlaneIntersection(Point3D position, Vector3D normal, out Point3D intersection)
Parameters
positionPoint3DA point on the plane.
normalVector3DThe normal of the plane.
intersectionPoint3DThe intersection point.
Returns
- bool
True if a intersection was found.