/// <summary>
        /// Сохранить настройки.
        /// </summary>
        /// <param name="settings">Хранилище настроек.</param>
        public override void Save(SettingsStorage settings)
        {
            base.Save(settings);

            settings.SetValue("Sma", Sma.Save());
            settings.SetValue("Ao", Ao.Save());
        }
        /// <summary>
        /// Загрузить настройки.
        /// </summary>
        /// <param name="settings">Хранилище настроек.</param>
        public override void Load(SettingsStorage settings)
        {
            base.Load(settings);

            Sma.LoadNotNull(settings, "Sma");
            Ao.LoadNotNull(settings, "Ao");
        }
    Mesh CreateMesh(bool ao)
    {
        Mesh mesh = new Mesh();

        if (treeFunctions.Count > 0)
        {
            tree.GenerateMeshData(treeFunctions[0], simplifyLeafs[Lod], radialResolution[Lod]);
        }
        mesh.vertices = tree.verts;
        mesh.normals  = tree.normals;
        mesh.uv       = tree.uvs;
        Color[] colors = tree.colors;
        mesh.triangles = tree.triangles;
        if (tree.leafTriangles.Length > 0)
        {
            mesh.subMeshCount = 2;
            mesh.SetTriangles(tree.leafTriangles, 1);
        }
        if (ao)
        {
            Ao.BakeAo(ref colors, tree.verts, tree.normals, tree.triangles, tree.leafTriangles, gameObject, 64, 20);
            DestroyImmediate(GetComponent <MeshCollider>());
        }
        mesh.colors = colors;
        GetComponent <MeshFilter>().mesh = mesh;

        polycount = mesh.triangles.Length / 3;
        return(mesh);
    }
 public TFilter(Ao ao, object valueA, int columnAIndex, Op op, object valueB, int columnBIndex)
 {
     _Ao           = ao;
     _valueA       = valueA;
     _columnAIndex = columnAIndex;
     _Op           = op;
     _valueB       = valueB;
     _columnBIndex = columnBIndex;
 }
        /// <summary>
        /// Обработать входное значение.
        /// </summary>
        /// <param name="input">Входное значение.</param>
        /// <returns>Результирующее значение.</returns>
        protected override IIndicatorValue OnProcess(IIndicatorValue input)
        {
            var aoValue = Ao.Process(input);

            if (Ao.IsFormed)
            {
                return(new DecimalIndicatorValue(this, aoValue.GetValue <decimal>() - Sma.Process(aoValue).GetValue <decimal>()));
            }

            return(new DecimalIndicatorValue(this, aoValue.GetValue <decimal>()));
        }
 public TFilter(Ao ao, object valueA, int columnAIndex, Op op, object valueB, int columnBIndex)
 {
     _Ao = ao;
     _valueA = valueA;
     _columnAIndex = columnAIndex;
     _Op = op;
     _valueB = valueB;
     _columnBIndex = columnBIndex;
 }