public Simulation Create(PhysicsProcessor sceneProcessor, PhysicsEngineFlags flags = PhysicsEngineFlags.None)
        {
            var scene = new PhysicsScene {
                Processor = sceneProcessor, Simulation = new Simulation(flags)
            };

            lock (this)
            {
                scenes.Add(scene);
            }
            return(scene.Simulation);
        }
 public void Release(PhysicsProcessor processor)
 {
     lock (this)
     {
         var scene = scenes.SingleOrDefault(x => x.Processor == processor);
         if (scene == null)
         {
             return;
         }
         scenes.Remove(scene);
         scene.Simulation.Dispose();
     }
 }