IntersectionTests
DOC_TBA
Source:
Methods
- 
    <static> grazingAltitudeLocation
- 
    
    
    Provides the point along the ray which is nearest to the ellipsoid. Parameters:Name Type Description rayRay The ray. ellipsoidEllipsoid The ellipsoid. 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 endPoint0Cartesian3 An end point of the line segment. endPoint1Cartesian3 The other end point of the line segment. planePlane The plane. resultCartesian3 <optional> 
 The object onto which to store the result. Returns:Cartesian3 The intersection point or undefined if there is no intersection.Examplevar origin = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)); var normal = ellipsoid.geodeticSurfaceNormal(origin); var plane = Cesium.Plane.fromPointNormal(origin, normal); var p0 = new Cesium.Cartesian3(...); var p1 = new Cesium.Cartesian3(...); // find the intersection of the line segment from p0 to p1 and the tangent plane at origin. var intersection = Cesium.IntersectionTests.lineSegmentPlane(p0, p1, plane); 
- 
    <static> rayEllipsoid
- 
    
    
    Computes the intersection points of a ray with an ellipsoid. Parameters:Name Type Description rayRay The ray. ellipsoidEllipsoid The ellipsoid. 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 rayRay The ray. planePlane The plane. Returns:Cartesian3 The intersection point or undefined if there is no intersections.
- 
    <static> trianglePlaneIntersection
- 
    
    
    Computes the intersection of a triangle and a plane Parameters:Name Type Description p0Cartesian3 First point of the triangle p1Cartesian3 Second point of the triangle p2Cartesian3 Third point of the triangle planePlane Intersection plane Returns:Object An object with propertiespositionsandindices, which are arrays that represent three triangles that do not cross the plane. (Undefined if no intersection exists)Examplevar origin = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.59777, 40.03883, 0.0)); var normal = ellipsoid.geodeticSurfaceNormal(origin); var plane = Cesium.Plane.fromPointNormal(origin, normal); var p0 = new Cesium.Cartesian3(...); var p1 = new Cesium.Cartesian3(...); var p2 = new Cesium.Cartesian3(...); // convert the triangle composed of points (p0, p1, p2) to three triangles that don't cross the plane var triangles = Cesium.IntersectionTests.lineSegmentPlane(p0, p1, p2, plane); 
