Exemple #1
0
		public void initializeOneNewParticle()
		{
			Particle pParticle;
			pParticle = new Particle();

			int type = 0;
			type = determineParticleType();
			pParticle.TypeID = type;

			ParticleInfo typeInfo = ParticleStaticObjects.AtomPropertiesDefinition.Lookup[type];

			pParticle.setRadius(typeInfo.Mass * 0.5);
			pParticle.setInitialRadius(typeInfo.Mass * 0.5);
			pParticle.setpx(ParticleStaticObjects.RandomDouble(0.0 + pParticle.getRadius(), BoxWidth - pParticle.getRadius()));
			pParticle.setpy(ParticleStaticObjects.RandomDouble(0.0 + pParticle.getRadius(), BoxHeight - pParticle.getRadius()));
			pParticle.setMass(10); // typeInfo.Mass);
			pParticleVector.Add(pParticle);
		}