Пример #1
0
        public void add(Particle particle, IParticleForceGenerator forceGenerator)
        {
            ParticleForceRegistration registration = new ParticleForceRegistration();

            registration.particle       = particle;
            registration.forceGenerator = forceGenerator;
            registrations.Add(registration);
        }
Пример #2
0
 public void remove(Particle particle, IParticleForceGenerator forceGenerator)
 {
     foreach (ParticleForceRegistration i in registrations)
     {
         if (i.particle == particle && i.forceGenerator == forceGenerator)
         {
             registrations.Remove(i);
             return;
         }
     }
 }
 public void Remove(Particle particle, IParticleForceGenerator fg)
 {
     PhysicsEngineForFunPINVOKE.ParticleForceRegistry_Remove(swigCPtr, Particle.getCPtr(particle), IParticleForceGenerator.getCPtr(fg));
 }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(IParticleForceGenerator obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Пример #5
0
 public void Add(Particle particle, IParticleForceGenerator fg)
 {
     registrations.Add(new ParticleForceRegistration(particle, fg));
 }
Пример #6
0
 internal ParticleForceRegistration(Particle particle, IParticleForceGenerator fg)
 {
     this.particle = particle;
     this.fg       = fg;
 }