示例#1
0
 public virtual void Init(BGCcVisualizationLineRenderer cc)
 {
     this.cc = cc;
     doNotOptimizeStraightLines = cc.doNotOptimizeStraightLines;
     Math         = cc.Math.Math;
     straightBits = cc.straightBits;
 }
示例#2
0
 public override void Init(BGCcVisualizationLineRenderer cc)
 {
     base.Init(cc);
     parts = cc.PartsPerSection;
 }
示例#3
0
        private static PositionsProvider InitProvider(ref PositionsProvider positionsProvider, BGCcVisualizationLineRenderer cc)
        {
            //assign positions provider if needed
            var mode = cc.splitMode;

            if (positionsProvider == null || !positionsProvider.Comply(mode))
            {
                switch (mode)
                {
                case SplitModeEnum.PartsTotal:
                    positionsProvider = new PositionsProviderTotalParts();
                    break;

                case SplitModeEnum.PartsPerSection:
                    positionsProvider = new PositionsProviderPartsPerSection();
                    break;

                default:
//                    case SplitModeEnum.UseMathData:
                    positionsProvider = new PositionsProviderMath();
                    break;
                }
            }

            //init provider
            positionsProvider.Init(cc);
            return(positionsProvider);
        }