VertL1dist() public static méthode

public static VertL1dist ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v ) : Real
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
Résultat Real
Exemple #1
0
        private void VertexWeights(MeshUtils.Vertex isect, MeshUtils.Vertex org, MeshUtils.Vertex dst, out float w0, out float w1)
        {
            float num  = Geom.VertL1dist(org, isect);
            float num2 = Geom.VertL1dist(dst, isect);

            w0 = num2 / (num + num2) / 2f;
            float num3 = num;

            w1 = num3 / (num3 + num2) / 2f;
            isect._coords.X += w0 * org._coords.X + w1 * dst._coords.X;
            isect._coords.Y += w0 * org._coords.Y + w1 * dst._coords.Y;
            isect._coords.Z += w0 * org._coords.Z + w1 * dst._coords.Z;
        }