trianglePlaneIntersection

Computes the intersection of a triangle and a plane

const origin = Cartesian3.fromDegrees(-75.59777, 40.03883);
const normal = ellipsoid.geodeticSurfaceNormal(origin);
const plane = Plane.fromPointNormal(origin, normal);

const p0 = new Cartesian3(...);
const p1 = new Cartesian3(...);
const p2 = new Cartesian3(...);

// convert the triangle composed of points (p0, p1, p2) to three triangles that don't cross the plane
const triangles = IntersectionTests.trianglePlaneIntersection(p0, p1, p2, plane);

Return

An object with properties positions and indices, which are arrays that represent three triangles that do not cross the plane. (Undefined if no intersection exists)

Parameters

p0

First point of the triangle

p1

Second point of the triangle

p2

Third point of the triangle

plane

Intersection plane

See also