Click or drag to resize

EllipsoidIntersections Method

Computes the intersection of the line of sight vector emanating from a given external point with the ellipsoid.

Namespace:  AGI.Foundation.Geometry.Shapes
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 20.3.405.0 (20.3.405.0)
public double[] Intersections(
	Cartesian position,
	UnitCartesian direction


Type: AGI.Foundation.CoordinatesCartesian
The reference point for the direction.
Type: AGI.Foundation.CoordinatesUnitCartesian
The direction along which the intersections are to be determined.

Return Value

Type: Double
If intersections exist, the distances along the direction to the points of intersection.
The length of the array of distances indicates how many points of intersection exist:
  • A length of zero indicates that there are no intersections.
  • A length of one indicates the case of a degenerate ellipse.
  • A length of two indicates two points of intersection.
In the case of two intersections, the distances are ordered from most negative (i.e. "furthest behind") to most positive (i.e. "furthest before"). If the two distances are equal, the points of intersection indicate a single point of tangency to the ellipsoid.
See Also