IntersectionTests

IntersectionTests

IntersectionTests

DOC_TBA

Methods

<static> grazingAltitudeLocation

Provides the point along the ray which is nearest to the ellipsoid.

Parameters:
Name Type Description
ray Ray The ray.
ellipsoid Ellipsoid The ellipsoid.
Throws:
Returns:
Cartesian The nearest planetodetic point on the ray.

<static> lineSegmentPlane

Computes the intersection of a line segment and a plane.

Parameters:
Name Type Argument Description
endPoint0 Cartesian3 An end point of the line segment.
endPoint1 Cartesian3 The other end point of the line segment.
plane Plane The plane.
result Cartesian3 <optional>
The object onto which to store the result.
Throws:
Returns:
Cartesian3 The intersection point or undefined if there is no intersection.
Example
var origin = ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883, 0.0));
var normal = ellipsoid.geodeticSurfaceNormal(origin);
var plane = Plane.fromPointNormal(origin, normal);

var p0 = new Cartesian3(...);
var p1 = new Cartesian3(...);

// find the intersection of the line segment from p0 to p1 and the tangent plane at origin.
var intersection = IntersectionTests.lineSegmentPlane(p0, p1, plane);

<static> rayEllipsoid

Computes the intersection points of a ray with an ellipsoid.

Parameters:
Name Type Description
ray Ray The ray.
ellipsoid Ellipsoid The ellipsoid.
Throws:
Returns:
Object An object with the first (start) and the second (stop) intersection scalars for points along the ray or undefined if there are no intersections.

<static> rayPlane

Computes the intersection of a ray and a plane.

Parameters:
Name Type Description
ray Ray The ray.
plane Plane The plane.
Throws:
Returns:
Cartesian3 The intersection point or undefined if there is no intersections.