Beispiel #1
0
        public static void InitializePhysXEngine()
        {
            Engine = new PEngine();

            Engine.AddPlane(new StillDesign.PhysX.PlaneShapeDescription());

            Engine.OnSimulationReady += new PEngine.SimulationReadyDelegate(Engine_OnSimulationReady);
        }
Beispiel #2
0
 public static void Engine_OnSimulationReady(PEngine e, float time)
 {
     foreach (Actor a in e.Actors)
     {
         if (BoxMatrices.ContainsKey(a))
         {
             BoxMatrices[a] = a.GlobalPose.As <Matrix>();
         }
         if (BallMatrices.ContainsKey(a))
         {
             BallMatrices[a] = a.GlobalPose.As <Matrix>();
         }
     }
     // e.Scene.FlushCaches();
 }