Пример #1
0
            public TreeNode(FCurves window, Utl.ParameterTreeNode paramTreeNode)
            {
                this.window = window;

                Children = new List<TreeNode>();
                FCurves = new List<FCurve>();

                ParamTreeNode = paramTreeNode;

                foreach (var tn in paramTreeNode.Children)
                {
                    Children.Add(new TreeNode(window,tn));
                }

                foreach (var v in paramTreeNode.Parameters)
                {
                    var v_ = FCurve.Create(v, window);
                    v_.ParentNode = this;

                    FCurves.Add(v_);
                }
            }
Пример #2
0
            public static FCurve Create(Tuple<string, object> v, FCurves window)
            {
                if (v.Item2 is Data.Value.FCurveVector3D)
                {
                    var v_ = (Data.Value.FCurveVector3D)v.Item2;
                    return new FCurveVector3D(v.Item1, v_, window);
                }
                else if (v.Item2 is Data.Value.FCurveColorRGBA)
                {
                    var v_ = (Data.Value.FCurveColorRGBA)v.Item2;
                    return new FCurveColor(v.Item1, v_, window);
                }

                return null;
            }
Пример #3
0
            public FCurveVector3D(string name, Data.Value.FCurveVector3D value, FCurves window)
            {
                Name = name;
                Value = value;
                this.window = window;

                fCurvesMagYCount = (float)Math.Log((float)GraphPanel.Height / (value.X.DefaultValueRangeMax - value.X.DefaultValueRangeMin), 2.0);
                fCurvesOffsetY = (value.X.DefaultValueRangeMax + value.X.DefaultValueRangeMin) / 2.0f;
            }