DragRay

References
public sealed class DragRay
A ray in a viewport used for picking and dragging shapes in 3D.

Constructors

DragRay

#
public DragRay(
viewport,
ray,
pickMode
)

Properties

CPlane

#
Gets the construction plane of the viewport at the time of pick.
public Plane CPlane { get; }

CurveRadius

#
Gets an acceptable distance (measured in pixels) from a ray to an edge to count as a hit.
public double CurveRadius { get; set; }

MaximumParameter

#
Gets the furthest parameter along the ray where a hit may still be considered.
public double MaximumParameter { get; }

PickMode

#
Gets whether the ray is designed to hit sub-objects or only whole objects.
public DragPickingMode PickMode { get; }

PointRadius

#
Gets an acceptable distance (measured in pixels) from a ray to a point to count as a hit.
public double PointRadius { get; set; }

Projection

#
Gets the projection from world space into viewport space. This projection eradicates the z-depth, so it can be used directly to measure separation between shapes in the XY plane.
public Transform Projection { get; }

Ray

#
Gets the ray. Note that the start point of the ray is meaningful. The line ought not hit any objects behind the start point.
public Line Ray { get; }

Methods

CreateHitAt

#
Create a new hit result along this ray.
public DragHit CreateHitAt(
obj,
pointOnShape,
site,
scale
)

PixelDistance

#
Measure the visual separation (in pixels) between two points in the viewport.
public double PixelDistance(
a,
First point.
b
Second point.
)
Pixel distance between the points given the viewport projection.