pointInsideTriangle(point, p0, p1, p2)Boolean

Determines if a point is inside a triangle.
Name Type Description
point Cartesian2 | Cartesian3 The point to test.
p0 Cartesian2 | Cartesian3 The first point of the triangle.
p1 Cartesian2 | Cartesian3 The second point of the triangle.
p2 Cartesian2 | Cartesian3 The third point of the triangle.
true if the point is inside the triangle; otherwise, false.
// Returns true
var p = new SuperMap3D.Cartesian2(0.25, 0.25);
var b = SuperMap3D.pointInsideTriangle(p,
  new SuperMap3D.Cartesian2(0.0, 0.0),
  new SuperMap3D.Cartesian2(1.0, 0.0),
  new SuperMap3D.Cartesian2(0.0, 1.0));