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: 24.3.420.0 (24.3.420.0)
Syntax public double[] Intersections(
Cartesian position,
UnitCartesian direction
)
Public Function Intersections (
position As Cartesian,
direction As UnitCartesian
) As Double()
public:
array<double>^ Intersections(
Cartesian position,
UnitCartesian direction
)
member Intersections :
position : Cartesian *
direction : UnitCartesian -> float[]
Parameters
- position
- Type: AGI.Foundation.CoordinatesCartesian
The reference point for the direction. - direction
- Type: AGI.Foundation.CoordinatesUnitCartesian
The direction along which the intersections are to be determined.
Return Value
Type:
DoubleIf intersections exist, the distances along the direction to the points of intersection.
Remarks
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