EdgeEval() публичный статический Метод

Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), evaluates the t-coord of the edge uw at the s-coord of the vertex v. Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. If uw is vertical (and thus passes thru v), the result is zero. The calculation is extremely accurate and stable, even when v is very close to u or w. In particular if we set v->t = 0 and let r be the negated result (this evaluates (uw)(v->s)), then r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t).
public static EdgeEval ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
w LibTessDotNet.MeshUtils.Vertex
Результат Real
Пример #1
0
        private bool EdgeLeq(ActiveRegion reg1, ActiveRegion reg2)
        {
            MeshUtils.Edge eUp  = reg1._eUp;
            MeshUtils.Edge eUp2 = reg2._eUp;
            if (eUp._Dst == _event)
            {
                if (eUp2._Dst == _event)
                {
                    if (Geom.VertLeq(eUp._Org, eUp2._Org))
                    {
                        return(Geom.EdgeSign(eUp2._Dst, eUp._Org, eUp2._Org) <= 0f);
                    }
                    return(Geom.EdgeSign(eUp._Dst, eUp2._Org, eUp._Org) >= 0f);
                }
                return(Geom.EdgeSign(eUp2._Dst, _event, eUp2._Org) <= 0f);
            }
            if (eUp2._Dst == _event)
            {
                return(Geom.EdgeSign(eUp._Dst, _event, eUp._Org) >= 0f);
            }
            float num  = Geom.EdgeEval(eUp._Dst, _event, eUp._Org);
            float num2 = Geom.EdgeEval(eUp2._Dst, _event, eUp2._Org);

            return(num >= num2);
        }