Exemple #1
0
 public Window(Size size)
 {
     this.size      = size;
     this.drawTimer = new PhysicsTimer(GraphicsProcess, .01f);
     this.viewports = new PendableCollection <Window, Viewport>(this);
     this.syncRoot  = new object();
     this.rwLock    = new AdvReaderWriterLock();
 }
Exemple #2
0
 public Scene()
 {
     this.syncRoot      = new object();
     this.engine        = new PhysicsEngine();
     this.rwLock        = new AdvReaderWriterLock();
     this.timer         = new PhysicsTimer(Update, .01f);
     this.graphics      = new PendableCollection <Scene, Graphic>(this);
     this.viewports     = new List <Viewport>();
     this.bodies        = new List <Body>();
     this.joints        = new List <Joint>();
     this.physicsLogics = new List <PhysicsLogic>();
 }
        public PhysicsEngine()
        {
            this.nextBodyID = firstBodyID;
            this.syncRoot   = new object();
            this.rwLock     = new AdvReaderWriterLock();

            this.joints = new List <Joint>();
            this.bodies = new List <Body>();
            this.logics = new List <PhysicsLogic>();

            this.pendingBodies  = new List <Body>();
            this.pendingJoints  = new List <Joint>();
            this.pendingLogics  = new List <PhysicsLogic>();
            this.pendingProxies = new List <BodyProxy>();

            this.removedBodies = new List <Body>();
            this.removedJoints = new List <Joint>();
            this.removedLogics = new List <PhysicsLogic>();
        }