Ejemplo n.º 1
0
 public IntPtr create(BulletScene obj, BulletSceneDefinition definition)
 {
     handle = GCHandle.Alloc(obj);
     fixed(BulletSceneInfo *info = &definition.sceneInfo)
     {
         return(BulletScene_CreateBulletScene(info, managedTickCallback, GCHandle.ToIntPtr(handle)));
     }
 }
Ejemplo n.º 2
0
        public unsafe SimElementManagerDefinition createDefinition()
        {
            BulletSceneDefinition definition = createDefinition(name);

            fixed(BulletSceneInfo *info = &definition.sceneInfo)
            {
                BulletScene_fillOutInfo(bulletScene, info);
            }

            definition.InternalTimestep = InternalTimestep;
            definition.SolverIterations = SolverIterations;
            return(definition);
        }
Ejemplo n.º 3
0
 public unsafe BulletScene(BulletSceneDefinition definition, UpdateTimer timer)
 {
     callbackHandler = new CallbackHandler();
     bulletScene     = callbackHandler.create(this, definition);
     this.timer      = timer;
     this.name       = definition.Name;
     timer.addBackgroundUpdateListener("Rendering", this);
     factory                    = new BulletFactory(this);
     debugDraw                  = new BulletDebugDraw();
     performanceName            = String.Format("BulletScene {0} Background", name);
     Active                     = true;
     InternalTimestep           = definition.InternalTimestep;
     SolverIterations           = definition.SolverIterations;
     AutoSynchronizeAfterUpdate = true;
 }