Table of Contents

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

p0 Point3D

The p0.

p1 Point3D

The p1.

Ray3D(Point3D, Vector3D)

Initializes a new instance of the Ray3D class.

public Ray3D(Point3D origin, Vector3D direction)

Parameters

origin Point3D

The origin.

direction Vector3D

The direction.

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

p3 Point3D

The 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

position Point3D

A point on the plane.

normal Vector3D

The normal of the plane.

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

position Point3D

A point on the plane.

normal Vector3D

The normal of the plane.

intersection Point3D

The intersection point.

Returns

bool

True if a intersection was found.