Method TryGetBarycentric
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
TryGetBarycentric(GeoPoint2, out double, out double, out double)
Gets the barycentric coordinates of a point with respect to this triangle.
public bool TryGetBarycentric(GeoPoint2 point, out double u, out double v, out double w)
Parameters
pointGeoPoint2The point to express; it need not lie within the triangle.
udoubleWeight of vertex A.
vdoubleWeight of vertex B.
wdoubleWeight of vertex C.
Returns
- bool
false when the triangle is degenerate, in which case all three weights are nought.
Remarks
The three weights always add up to one, and all three are positive or nought exactly when the point lies within the triangle.