Ejemplo n.º 1
0
        public SingleEOSymbolModel CreateSingleEOSymbolModel(IEOModel sourceModel)
        {
            SingleEOSymbolModel singleEOSymbol = new SingleEOSymbolModel(this.positive);

            Vector3 eoStart = sourceModel.EOStart;
            Vector3 eoEnd   = sourceModel.EOEnd;

            //Following code just is a render rule
            if (!(sourceModel is LineModel))
            {
                if (this.positive == 1)
                {
                    eoEnd = eoStart + eoEnd;
                }
                else
                {
                    eoEnd = eoStart - eoEnd;

                    Vector3 temp = eoEnd;
                    eoEnd   = eoStart;
                    eoStart = temp;
                }
            }

            singleEOSymbol.Node1 = eoStart;
            singleEOSymbol.Node2 = eoEnd;

            singleEOSymbol.Initialize();

            return(singleEOSymbol);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create the SingleEO Symbol model which is just a line based on the primary model
        /// to indicate this primary model is an excitation or output
        /// </summary>
        private void UpdateSingleEOSymbolModel( )
        {
            if (currentEO == null)
            {
                eoSymbolModel = null;
                return;
            }

            //Check whether the single is an excitaion or output
            //If ture, it'll create an additional eo symbol geometry model
            //except the point output which'll just be changed color
            if (currentEO != null && primaryModel is IEOModel)
            {
                //Create an additional model
                eoSymbolModel            = currentEO.CreateSingleEOSymbolModel(primaryModel as IEOModel);
                eoSymbolModel.ModelColor = singleColor;
            }
            else if (this.currentEO is PointOutput)
            {
                primaryModel.ModelColor = this.singleColor;
            }
        }
Ejemplo n.º 3
0
 public override void Initialize( )
 {
     model = source as SingleEOSymbolModel;
     base.Initialize();
 }