public override Particle Resolve(Particle Input, UniverseBoundary Boundary) { //Create a shallow copy of the input particle Particle Resolved = Particle.Copy_Shallow(Input, true); Resolved.Position = new Vector(Resolved.Position.Capacity); //Return the result return Resolved; }
public override Particle Resolve(Particle Input, UniverseBoundary Boundary) { //Create a shallow copy of the input particle Particle Resolved = Particle.Copy_Shallow(Input, true); Resolved.Position = SimMath.RandomSphericalPosition(Input.NumberDimensions, Boundary.Radius); //Return the result return Resolved; }
public override Particle Resolve(Particle Input, UniverseBoundary Boundary) { //Create a shallow copy of the input particle Particle Resolved = Particle.Copy_Shallow(Input, true); //All we need to do is reverse the direction of the position vector Resolved.Position = Vector.Vector_Negate(Resolved.Position); //Return the result return Resolved; }
public override Particle Resolve(Particle Input, UniverseBoundary Boundary) { //Create a shallow copy of the input particle Particle Resolved = Particle.Copy_Shallow(Input, true); //All we need to do is change the magnitude of the position vector Resolved.Position.Magnitude = System.Math.Abs(Boundary.Radius); //Return the result return Resolved; }
public override Particle Resolve(Particle Input, UniverseBoundary Boundary) { //Create a shallow copy of the input particle Particle Resolved = Particle.Copy_Shallow(Input, true); Resolved.Position.Magnitude = System.Math.Abs(Boundary.Radius); //this isn't right, we don't want to reverse the direction of the velocity, we want to reverse the direction of the direction vector between the particle and the edge Resolved.Velocity.Direction = Vector.Vector_Negate(Resolved.Position.Direction); //Return the result return Resolved; }
/// <summary> /// Resolves the properties of a particle that has passed the edge of the universe. /// </summary> /// <param name="Input">The particle to resolve</param> /// <param name="Boundary">The boundary of the universe that the particle has escaped.</param> public abstract Particle Resolve(Particle Input, UniverseBoundary Boundary);