Exemple #1
0
        private static List <Coeffs> GetCoeffs(ref ParseTreeNode dictionary, out string patch)
        {
            var ret = new List <Coeffs>();

            patch = null;
            foreach (ParseTreeNode x in dictionary.ChildNodes)
            {
                var id = x.ChildNodes[0].GetEntryIdentifier();
                if (id == "patch")
                {
                    patch = x.ChildNodes[0].GetBasicValString();
                }
                else
                {
                    var item = new Coeffs();
                    item.dir   = x.ChildNodes[0].ChildNodes[0].Token.Text.ToEnum <DirectionType>();
                    item.value = new Vertice();
                    var a = x.ChildNodes[0].ChildNodes[2].ChildNodes[1].GetArrayOfDecimal();
                    item.value.X = a[0];
                    item.value.Y = a[1];
                    item.value.Z = a[2];
                    ret.Add(item);
                }
            }
            return(ret);
        }
 private static List<Coeffs> GetCoeffs(ref ParseTreeNode dictionary, out string patch)
 {
     var ret = new List<Coeffs>();
     patch = null;
     foreach (ParseTreeNode x in dictionary.ChildNodes)
     {
         var id = x.ChildNodes[0].GetEntryIdentifier();
         if (id == "patch")
         {
             patch = x.ChildNodes[0].GetBasicValString();
         }
         else
         {
             var item = new Coeffs();
             item.dir = x.ChildNodes[0].ChildNodes[0].Token.Text.ToEnum<DirectionType>();
             item.value = new Vertice();
             var a = x.ChildNodes[0].ChildNodes[2].ChildNodes[1].GetArrayOfDecimal();
             item.value.X = a[0];
             item.value.Y = a[1];
             item.value.Z = a[2];
             ret.Add(item);
         }               
     }
     return ret;
 }