Пример #1
0
 /// <summary>
 /// Initializes a new instance of the Attraction class
 /// </summary>
 /// <param name="end1">Particule at first end of the spring</param>
 /// <param name="end2">Particule at second end of the spring</param>
 /// <param name="k">Attraction strength</param>
 /// <param name="d">Minimal distance under which attraction is restricted</param>
 public Attraction(Particle end1, Particle end2, float k, float d)
     : base()
 {
     this.strength = k;
     this.minDist = d;
     this.End1 = end1;
     this.End2 = end2;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the Spring class
 /// </summary>
 /// <param name="end1">Particule at first end of the spring</param>
 /// <param name="end2">Particule at second end of the spring</param>
 /// <param name="sk">Spring strength</param>
 /// <param name="d">Damping value of spring</param>
 /// <param name="rl">Rest lenght of spring</param>
 public Spring(Particle end1, Particle end2, float sk, float d, float rl)
     : base()
 {
     this.springConstant = sk;
     this.damping = d;
     this.restLength = rl;
     this.End1 = end1;
     this.End2 = end2;
 }