Exemple #1
0
 public TriangleFillingMode(FillingMode fm, bool randomfactors, bool vectorL, VectorNMode vectorN, bool textureFill, bool lightcolor)
 {
     this.fillingMode        = fm;
     this.RandomFactors      = randomfactors;
     this.IsDefaultVectorL   = vectorL;
     this.vectorNMode        = vectorN;
     this.IsTextureFill      = textureFill;
     this.IsDefaulLightColor = lightcolor;
     VectorL = Globals.DefaultVectorL.Normalize();
     //NonTexturedVectorN = Globals.DefaultVectorN;
     LightVector = new SimpleColor(Globals.LightColor).ConvertColorToVector();
     ViewVector  = Globals.ViewVector;
     KdFactor    = 100d;
     MFactor     = 1;
 }
        private void SetVariables()
        {
            triangleFillingMode        = new TriangleFillingMode(FillingMode.Direct, true, true, VectorNMode.NormalMap, true, true);
            GridRows                   = Globals.Rows;
            GridColumns                = Globals.Columns;
            TextureFileName            = Globals.BitmapSource;
            VectorNFileName            = Globals.NormalMapSource;
            VectorNPreviousValue       = VectorNMode.Default;
            IsTextureFillPreviousValue = true;
            HasChooseFileReturnedNull  = false;
            timer          = new System.Windows.Threading.DispatcherTimer();
            timer.Tick    += new EventHandler(VectorLTimer_Elapsed);
            timer.Interval = new TimeSpan(0, 0, 0, 0, Globals.VectorLTimerIntervalMS);
            //timer.Stop();
            TimerPathIndex = 0;

            BubbleSquareRadius = Globals.BubbleRadius * Globals.BubbleRadius;
        }