public void Interact(List <Light> lightList, Graphics g) { Light last = lightList[lightList.Count - 1]; PointF pi = last.pi; PointF pf = last.pf; Color lightColor = last.LightColor; Region mediumReg = this.GetRegion(); Region rayReg = last.GetRegion(); double angle = last.GetAngle(); mediumReg.Intersect(rayReg); //Intersect area of lens and the last light if (!mediumReg.IsEmpty(g)) { double n1 = AdvanceInformation.screenIndex; double n2 = this.Index; if (n1 == n2) //act as nothing { // } else if (n1 > n2) //act like a mirror { AlgoritemHelper.MirrorAlgoritem(lightList, g, this); } else //act like medium { AlgoritemHelper.MediumAlgoritem(lightList, g, this, n1, n2); } } }
public void Interact(List <Light> lightList, Graphics g) { AlgoritemHelper.MirrorAlgoritem(lightList, g, this); }