Beispiel #1
0
        public static void Init(PictureBox _pb)
        {
            IDrawer stdDrawer        = new DrawerStandart(_pb);
            IDrawer testDrawer       = new DrawerDebug(_pb);
            IDrawer interstingDrawer = new DrawerInteresting(_pb);

            m_pBox = _pb;


            m_factory2 = new ParticleFactoryStandart(_pb.Width, _pb.Height, stdDrawer);

            m_tstFactory = new ParticleFactoryInteresting(_pb.Width, _pb.Height, interstingDrawer);


            var borderOfArea = new BorderBounce(new List <PairDouble>
            {
                new PairDouble(0, 0),
                new PairDouble(0, _pb.Height),
                new PairDouble(_pb.Width, _pb.Height),
                new PairDouble(_pb.Width, 0)
            });

            m_box = new ParticleBox(m_factory2, Miscelaneous.ParticleCount, stdDrawer, borderOfArea);

            Run(m_box);
        }
Beispiel #2
0
        public static void Init(PictureBox _pb)
        {
            IDrawer stdDrawer = new DrawerStandart(_pb);
            IDrawer testDrawer = new DrawerDebug(_pb);
            IDrawer interstingDrawer = new DrawerInteresting(_pb);
            m_pBox = _pb;


            m_factory2 = new ParticleFactoryStandart(_pb.Width, _pb.Height, stdDrawer);

            m_tstFactory = new ParticleFactoryInteresting(_pb.Width, _pb.Height, interstingDrawer);


            var borderOfArea = new BorderBounce(new List<PairDouble>
                                            {
                                                new PairDouble(0, 0),
                                                new PairDouble(0, _pb.Height),
                                                new PairDouble(_pb.Width, _pb.Height),
                                                new PairDouble(_pb.Width, 0)
                                            });

            m_box = new ParticleBox(m_factory2, Miscelaneous.ParticleCount, stdDrawer, borderOfArea);

            Run(m_box);
        }
        public void AddParticles(IParticleFactory2D factory, int count = 1)
        {
            var pt = factory.PopulateRandomDistributed(count);

            Particles = Particles.Concat(pt);
        }
 public ParticleBox(IParticleFactory2D _factory, int _count, IDrawer _draw, IBorder _border)
 {
     Particles = _factory.PopulateRandomDistributed(_count);
     Drawer    = _draw;
     Border    = _border;
 }
 public ParticleBox(IParticleFactory2D _factory, int _count)
 {
     Particles = _factory.PopulateRandomDistributed(_count);
 }
 public void AddParticles(IParticleFactory2D factory, int count = 1)
 {
     var pt = factory.PopulateRandomDistributed(count);
     Particles = Particles.Concat(pt);
 }
 public ParticleBox(IParticleFactory2D _factory, int _count, IDrawer _draw, IBorder _border)
 {
     Particles = _factory.PopulateRandomDistributed(_count);
     Drawer = _draw;
     Border = _border;
 }
 public ParticleBox(IParticleFactory2D _factory, int _count)
 {
     Particles = _factory.PopulateRandomDistributed(_count);
 }