Table of Contents

Struct GeoRay2

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

Whether a ray touches another shape.

public readonly struct GeoRay2 : IEquatable<GeoRay2>
Implements
Inherited Members

Remarks

A closed shape is read as filled: a ray reaching its material collides with it, and so does one starting inside it. The ray from (50, 50) along X starts inside the square 100 by 100 with a corner at the origin and collides with it; the ray from (-50, 150) along X passes above it and does not.

Constructors

GeoRay2(GeoPoint2, GeoPoint2)

Initializes a new ray running from one point through another.

GeoRay2(GeoPoint2, GeoVector2)

Initializes a new ray.

Properties

Direction

Gets the direction of the ray, always normalized.

IsValid

Gets whether this is a shape a constructor could have made: the origin is a valid point and the direction of unit length.

Origin

Gets the origin point of the ray.

Methods

Clone()

Creates a copy of this ray.

CollidesWith(GeoArc2)

Determines whether this ray touches or overlaps an arc.

CollidesWith(GeoArc2, Tolerance)

Determines whether this ray touches or overlaps an arc, within a tolerance.

CollidesWith(GeoCircle2)

Checks whether this ray starts inside a circle or runs into it, using the default tolerance.

CollidesWith(GeoCircle2, Tolerance)

Checks whether this ray starts inside a circle or runs into it, within a tolerance.

CollidesWith(GeoEdge2)

Checks whether this ray touches an edge.

CollidesWith(GeoEdge2, Tolerance)

Checks whether this ray touches an edge, within a tolerance.

CollidesWith(GeoFace2)

Checks whether this ray reaches the material of a face, using the default tolerance.

CollidesWith(GeoFace2, Tolerance)

Checks whether this ray reaches the material of a face, within a tolerance.

CollidesWith(GeoLine2)

Checks whether this ray touches a line segment using the default tolerance.

CollidesWith(GeoLine2, Tolerance)

Checks whether this ray touches a line segment within a tolerance.

CollidesWith(GeoPolygon2)

Checks whether this ray starts inside a polygon or runs into it, using the default tolerance.

CollidesWith(GeoPolygon2, Tolerance)

Checks whether this ray starts inside a polygon or runs into it, within a tolerance.

CollidesWith(GeoPolygonArc2)

Determines whether this ray touches or overlaps a curved loop.

CollidesWith(GeoPolygonArc2, Tolerance)

Determines whether this ray touches or overlaps a curved loop, within a tolerance.

CollidesWith(GeoPolyline2)

Checks whether this ray touches a polyline using the default tolerance.

CollidesWith(GeoPolyline2, Tolerance)

Checks whether this ray touches a polyline within a tolerance.

CollidesWith(GeoPolylineArc2)

Determines whether this ray touches or overlaps a curved chain.

CollidesWith(GeoPolylineArc2, Tolerance)

Determines whether this ray touches or overlaps a curved chain, within a tolerance.

CollidesWith(GeoRay2)

Checks whether this ray touches another ray using the default tolerance.

CollidesWith(GeoRay2, Tolerance)

Checks whether this ray touches another ray within a tolerance.

CollidesWith(GeoRectangle2)

Checks whether this ray starts inside a rectangle or runs into it, using the default tolerance.

CollidesWith(GeoRectangle2, Tolerance)

Checks whether this ray starts inside a rectangle or runs into it, within a tolerance.

CollidesWith(GeoSpline2)

Determines whether this ray touches a spline, using the default tolerance.

CollidesWith(GeoSpline2, Tolerance)

Determines whether this ray touches a spline, within a tolerance.

CollidesWith(GeoTriangle2)

Checks whether this ray starts inside a triangle or runs into it, using the default tolerance.

CollidesWith(GeoTriangle2, Tolerance)

Checks whether this ray starts inside a triangle or runs into it, within a tolerance.

CollidesWith(GeoXLine2)

Determines whether this ray touches an infinite line, using the default tolerance.

CollidesWith(GeoXLine2, Tolerance)

Determines whether this ray touches an infinite line, within a tolerance.

DistanceTo(GeoArc2)

Calculates the shortest distance from this ray to an arc.

DistanceTo(GeoArc2, Tolerance)

Calculates the shortest distance from this ray to an arc, within a tolerance.

DistanceTo(GeoCircle2)

Calculates the shortest distance from this ray to a circle.

DistanceTo(GeoCircle2, Tolerance)

Calculates the shortest distance from this ray to a circle, within a tolerance.

DistanceTo(GeoEdge2)

Gets the distance from this ray to an edge.

DistanceTo(GeoEdge2, Tolerance)

Gets the distance from this ray to an edge, within a tolerance.

DistanceTo(GeoFace2)

Calculates the shortest distance from this ray to the material of a face: the same answer as DistanceTo(GeoRay2).

DistanceTo(GeoFace2, Tolerance)

Calculates the shortest distance from this ray to the material of a face, within a tolerance: the same answer as DistanceTo(GeoRay2, Tolerance).

DistanceTo(GeoLine2)

Calculates the shortest distance from this ray to a line segment using the default tolerance.

DistanceTo(GeoLine2, Tolerance)

Calculates the shortest distance from this ray to a line segment within a tolerance.

DistanceTo(GeoPoint2)

Calculates the distance from a point to the closest point on this ray, using the default tolerance.

DistanceTo(GeoPoint2, Tolerance)

Calculates the distance from a point to the closest point on this ray, within a tolerance.

DistanceTo(GeoPolygon2)

Calculates the shortest distance from this ray to a polygon.

DistanceTo(GeoPolygon2, Tolerance)

Calculates the shortest distance from this ray to a polygon, within a tolerance.

DistanceTo(GeoPolygonArc2)

Calculates the shortest distance from this ray to a curved loop.

DistanceTo(GeoPolygonArc2, Tolerance)

Calculates the shortest distance from this ray to a curved loop, within a tolerance.

DistanceTo(GeoPolyline2)

Calculates the shortest distance from this ray to a polyline.

DistanceTo(GeoPolyline2, Tolerance)

Calculates the shortest distance from this ray to a polyline, within a tolerance.

DistanceTo(GeoPolylineArc2)

Calculates the shortest distance from this ray to a curved chain.

DistanceTo(GeoPolylineArc2, Tolerance)

Calculates the shortest distance from this ray to a curved chain, within a tolerance.

DistanceTo(GeoRay2)

Calculates the shortest distance from this ray to another ray using the default tolerance.

DistanceTo(GeoRay2, Tolerance)

Calculates the shortest distance from this ray to another ray within a tolerance.

DistanceTo(GeoRectangle2)

Calculates the shortest distance from this ray to a rectangle.

DistanceTo(GeoRectangle2, Tolerance)

Calculates the shortest distance from this ray to a rectangle, within a tolerance.

DistanceTo(GeoSpline2)

Calculates the shortest distance from this ray to a spline, using the default tolerance.

DistanceTo(GeoSpline2, Tolerance)

Calculates the shortest distance from this ray to a spline, within a tolerance.

DistanceTo(GeoTriangle2)

Gets the distance from this ray to a triangle.

DistanceTo(GeoTriangle2, Tolerance)

Gets the distance from this ray to a triangle, within a tolerance.

DistanceTo(GeoXLine2)

Calculates the shortest distance from this ray to an infinite line, using the default tolerance.

DistanceTo(GeoXLine2, Tolerance)

Calculates the shortest distance from this ray to an infinite line, within a tolerance.

Equals(GeoRay2)

Determines whether another ray has exactly the same origin and direction.

Equals(object)

Determines whether the specified object is equal to the current ray.

GetClosestPointOnBoundary(GeoPoint2)

Gets the closest point on this ray to a target point, clamped to the origin.

GetDistanceAtPoint(GeoPoint2)

Gets the distance from the origin to the point on the ray's carrier line closest to the supplied point. The result is negative when that point falls behind the origin.

GetHashCode()

Returns the hash code for this instance.

GetIntersections(GeoArc2)

Gets the points where this ray meets an arc.

GetIntersections(GeoArc2, Tolerance)

Gets the points where this ray meets an arc, within a tolerance.

GetIntersections(GeoCircle2)

Gets all intersection points with a circle using default tolerance.

GetIntersections(GeoCircle2, Tolerance)

Gets all intersection points with a circle within tolerance.

GetIntersections(GeoEdge2)

Gets every point where this ray crosses an edge.

GetIntersections(GeoEdge2, Tolerance)

Gets every point where this ray crosses an edge, within a tolerance.

GetIntersections(GeoFace2)

Gets every point where this ray crosses the boundary of a face, using the default tolerance.

GetIntersections(GeoFace2, Tolerance)

Gets every point where this ray crosses the boundary of a face, within a tolerance.

GetIntersections(GeoPolygon2)

Gets all intersection points with a polygon using default tolerance.

GetIntersections(GeoPolygon2, Tolerance)

Gets all intersection points with a polygon within tolerance.

GetIntersections(GeoPolygonArc2)

Gets the points where this ray meets a curved loop.

GetIntersections(GeoPolygonArc2, Tolerance)

Gets the points where this ray meets a curved loop, within a tolerance.

GetIntersections(GeoPolyline2)

Gets all intersection points with a polyline using default tolerance.

GetIntersections(GeoPolyline2, Tolerance)

Gets all intersection points with a polyline within tolerance.

GetIntersections(GeoPolylineArc2)

Gets the points where this ray meets a curved chain.

GetIntersections(GeoPolylineArc2, Tolerance)

Gets the points where this ray meets a curved chain, within a tolerance.

GetIntersections(GeoRectangle2)

Gets all intersection points with a rectangle using default tolerance.

GetIntersections(GeoRectangle2, Tolerance)

Gets all intersection points with a rectangle within tolerance.

GetIntersections(GeoSpline2)

Gets the points where this ray crosses a spline, using the default tolerance.

GetIntersections(GeoSpline2, Tolerance)

Gets the points where this ray crosses a spline, within a tolerance.

GetIntersections(GeoTriangle2)

Gets every point where this ray meets the edges of a triangle, using the default tolerance.

GetIntersections(GeoTriangle2, Tolerance)

Gets every point where this ray meets the edges of a triangle, within a tolerance.

GetPointAtDistance(double)

Gets the point at a distance measured from the origin along the ray direction.

GetShortestLineTo(GeoArc2)

Gets the shortest segment joining this ray to an arc.

GetShortestLineTo(GeoArc2, Tolerance)

Gets the shortest segment joining this ray to an arc, within a tolerance.

GetShortestLineTo(GeoCircle2)

Gets the shortest segment leaving this ray and landing on the circumference of a circle, using the default tolerance.

GetShortestLineTo(GeoCircle2, Tolerance)

Gets the shortest segment leaving this ray and landing on the circumference of a circle, within a tolerance.

GetShortestLineTo(GeoEdge2)

Gets the shortest segment leaving this ray and landing on an edge.

GetShortestLineTo(GeoEdge2, Tolerance)

Gets the shortest segment leaving this ray and landing on an edge, within a tolerance.

GetShortestLineTo(GeoFace2)

Gets the shortest segment leaving this ray and landing on the boundary of a face, using the default tolerance.

GetShortestLineTo(GeoFace2, Tolerance)

Gets the shortest segment leaving this ray and landing on the boundary of a face, within a tolerance.

GetShortestLineTo(GeoLine2)

Gets the shortest segment leaving this ray and landing on a line segment, using the default tolerance.

GetShortestLineTo(GeoLine2, Tolerance)

Gets the shortest segment leaving this ray and landing on a line segment, within a tolerance.

GetShortestLineTo(GeoPoint2)

Gets the shortest segment leaving this ray and landing on a point, using the default tolerance.

GetShortestLineTo(GeoPoint2, Tolerance)

Gets the shortest segment leaving this ray and landing on a point, within a tolerance.

GetShortestLineTo(GeoPolygon2)

Gets the shortest segment leaving this ray and landing on the boundary of a polygon, using the default tolerance.

GetShortestLineTo(GeoPolygon2, Tolerance)

Gets the shortest segment leaving this ray and landing on the boundary of a polygon, within a tolerance.

GetShortestLineTo(GeoPolygonArc2)

Gets the shortest segment joining this ray to a curved loop.

GetShortestLineTo(GeoPolygonArc2, Tolerance)

Gets the shortest segment joining this ray to a curved loop, within a tolerance.

GetShortestLineTo(GeoPolyline2)

Gets the shortest segment leaving this ray and landing on a polyline, using the default tolerance.

GetShortestLineTo(GeoPolyline2, Tolerance)

Gets the shortest segment leaving this ray and landing on a polyline, within a tolerance.

GetShortestLineTo(GeoPolylineArc2)

Gets the shortest segment joining this ray to a curved chain.

GetShortestLineTo(GeoPolylineArc2, Tolerance)

Gets the shortest segment joining this ray to a curved chain, within a tolerance.

GetShortestLineTo(GeoRay2)

Gets the shortest segment leaving this ray and landing on another ray, using the default tolerance.

GetShortestLineTo(GeoRay2, Tolerance)

Gets the shortest segment leaving this ray and landing on another ray, within a tolerance.

GetShortestLineTo(GeoRectangle2)

Gets the shortest segment leaving this ray and landing on the boundary of a rectangle, using the default tolerance.

GetShortestLineTo(GeoRectangle2, Tolerance)

Gets the shortest segment leaving this ray and landing on the boundary of a rectangle, within a tolerance.

GetShortestLineTo(GeoSpline2)

Gets the shortest segment leaving this ray and landing on a spline, using the default tolerance.

GetShortestLineTo(GeoSpline2, Tolerance)

Gets the shortest segment leaving this ray and landing on a spline, within a tolerance.

GetShortestLineTo(GeoTriangle2)

Gets the shortest segment leaving this ray and landing on a triangle, using the default tolerance.

GetShortestLineTo(GeoTriangle2, Tolerance)

Gets the shortest segment leaving this ray and landing on a triangle, within a tolerance.

GetShortestLineTo(GeoXLine2)

Gets the shortest segment leaving this ray and landing on an infinite line, using the default tolerance.

GetShortestLineTo(GeoXLine2, Tolerance)

Gets the shortest segment leaving this ray and landing on an infinite line, within a tolerance.

IsEqualTo(GeoRay2)

Compares whether this ray equals another ray using the default tolerance.

IsEqualTo(GeoRay2, Tolerance)

Compares whether this ray equals another ray within a tolerance.

IsParallelTo(GeoLine2)

Checks whether this ray is parallel to a line segment using the default tolerance.

IsParallelTo(GeoLine2, Tolerance)

Checks whether this ray is parallel to a line segment within a tolerance.

IsPointOn(GeoPoint2)

Checks whether a point lies on this ray using the default tolerance.

IsPointOn(GeoPoint2, Tolerance)

Checks whether a point lies on this ray within a tolerance.

Locate(GeoPoint2)

Says where a point lies with respect to this ray.

Locate(GeoPoint2, Tolerance)

Says where a point lies with respect to this ray, within a tolerance.

Reverse()

Gets the ray running the opposite way from the same origin.

ToLine(double)

Gets the line segment covering the ray from its origin out to a given distance.

ToRay3(GeoCoordinateSystem3)

Puts this ray of the plane back into space, on the plane of a frame.

ToString()

Returns a string that represents the current ray.

ToXLine()

Gets the infinite line this ray lies on: the same origin and direction, with the half behind the origin added.

TransformBy(GeoTransform2)

Applies a transformation to this ray.

Translate(GeoVector2)

Moves the ray by a vector.

TryIntersectWith(GeoArc2, out GeoPoint2[])

Tries to find where this ray crosses an arc, using the default tolerance.

TryIntersectWith(GeoArc2, out GeoPoint2[], Tolerance)

Tries to find where this ray crosses an arc, within a tolerance.

TryIntersectWith(GeoCircle2, out GeoPoint2[])

Tries to find where this ray crosses a circle, using the default tolerance.

TryIntersectWith(GeoCircle2, out GeoPoint2[], Tolerance)

Tries to find where this ray crosses a circle, within a tolerance.

TryIntersectWith(GeoFace2, out GeoPoint2[])

Tries to find where this ray meets a face: the same answer, and the same points in the same order, as TryIntersectWith(GeoRay2, out GeoPoint2[]).

TryIntersectWith(GeoFace2, out GeoPoint2[], Tolerance)

Tries to find where this ray meets a face, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoRay2, out GeoPoint2[], Tolerance).

TryIntersectWith(GeoLine2, out GeoPoint2)

Tries to find where this ray crosses a line segment, using the default tolerance.

TryIntersectWith(GeoLine2, out GeoPoint2, Tolerance)

Tries to find where this ray crosses a line segment, within a tolerance.

TryIntersectWith(GeoPolygonArc2, out GeoPoint2[])

Tries to find where this ray crosses a curved loop, using the default tolerance.

TryIntersectWith(GeoPolygonArc2, out GeoPoint2[], Tolerance)

Tries to find where this ray crosses a curved loop, within a tolerance.

TryIntersectWith(GeoPolyline2, out GeoPoint2[])

Tries to find where this ray crosses a polyline, using the default tolerance.

TryIntersectWith(GeoPolyline2, out GeoPoint2[], Tolerance)

Tries to find where this ray crosses a polyline, within a tolerance.

TryIntersectWith(GeoPolylineArc2, out GeoPoint2[])

Tries to find where this ray crosses a curved chain, using the default tolerance.

TryIntersectWith(GeoPolylineArc2, out GeoPoint2[], Tolerance)

Tries to find where this ray crosses a curved chain, within a tolerance.

TryIntersectWith(GeoRay2, out GeoPoint2)

Tries to find where this ray crosses another ray, using the default tolerance.

TryIntersectWith(GeoRay2, out GeoPoint2, Tolerance)

Tries to find where this ray crosses another ray, within a tolerance.

TryIntersectWith(GeoRectangle2, out GeoPoint2[])

Tries to find where this ray meets a rectangle: the same answer, and the same points in the same order, as TryIntersectWith(GeoRay2, out GeoPoint2[]).

TryIntersectWith(GeoRectangle2, out GeoPoint2[], Tolerance)

Tries to find where this ray meets a rectangle, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoRay2, out GeoPoint2[], Tolerance).

TryIntersectWith(GeoSpline2, out GeoPoint2[])

Tries to find where this ray crosses a spline, using the default tolerance.

TryIntersectWith(GeoSpline2, out GeoPoint2[], Tolerance)

Tries to find where this ray crosses a spline, within a tolerance.

TryIntersectWith(GeoTriangle2, out GeoPoint2[])

Tries to find where this ray meets a triangle: the same answer, and the same points in the same order, as TryIntersectWith(GeoRay2, out GeoPoint2[]).

TryIntersectWith(GeoTriangle2, out GeoPoint2[], Tolerance)

Tries to find where this ray meets a triangle, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoRay2, out GeoPoint2[], Tolerance).

TryIntersectWith(GeoXLine2, out GeoPoint2)

Tries to find where this ray crosses an infinite line, using the default tolerance.

TryIntersectWith(GeoXLine2, out GeoPoint2, Tolerance)

Tries to find where this ray crosses an infinite line, within a tolerance.

Operators

operator ==(GeoRay2, GeoRay2)

Checks if two rays have exactly the same origin and direction.

operator !=(GeoRay2, GeoRay2)

Checks if two rays differ in origin or direction.