pointInsideTriangle
external fun pointInsideTriangle(point: Cartesian3, p0: Cartesian3, p1: Cartesian3, p2: Cartesian3): Boolean(source)
Determines if a point is inside a triangle.
// Returns true
const p = new Cartesian2(0.25, 0.25);
const b = pointInsideTriangle(p,
new Cartesian2(0.0, 0.0),
new Cartesian2(1.0, 0.0),
new Cartesian2(0.0, 1.0));
Content copied to clipboard
Return
true
if the point is inside the triangle; otherwise, false
.
Parameters
point
The point to test.
p0
The first point of the triangle.
p1
The second point of the triangle.
p2
The third point of the triangle.