public void SetUp()
        {
            _context = new PhysicsContext();
            _context.InitializeWorld();

            _shape = new BoxShape(2);
            RigidBody staticSphere  = _context.AddStaticBody(_shape, Matrix.Translation(0, 0, 0));
            RigidBody dynamicSphere = _context.AddBody(_shape, Matrix.Translation(0, 1, 0), 1);
        }
        public void SetUp()
        {
            _context = new PhysicsContext();
            _context.InitializeWorld();

            _shape = new BoxShape(2);

            _sphere1 = _context.AddBody(_shape, Matrix.Translation(2, 2, 0), 10);
            _sphere2 = _context.AddBody(_shape, Matrix.Translation(0, 2, 0), 1);
        }
        public void SetUp()
        {
            _context = new PhysicsContext();
            _context.InitializeWorld();

            _shape = new BoxShape(2);
            RigidBody staticSphere  = _context.AddStaticBody(_shape, Matrix.Translation(0, 0, 0));
            RigidBody dynamicSphere = _context.AddBody(_shape, Matrix.Translation(0, 1, 0), 1);

            _callback = new CustomOverlapFilterCallback(staticSphere, dynamicSphere);
        }
        public void SetUp()
        {
            _context = new PhysicsContext();
            _context.InitializeWorld();

            _shape = new BoxShape(1);
            using (var bodyInfo = new RigidBodyConstructionInfo(1, null, _shape))
            {
                _body1 = new RigidBody(bodyInfo);
                _body2 = new RigidBody(bodyInfo);
                _body3 = new RigidBody(bodyInfo);
            }
        }
        public void SetUp()
        {
            _context = new PhysicsContext();
            _context.InitializeWorld();

            _ghostPairCallback = new GhostPairCallback();
            _context.Broadphase.OverlappingPairCache.SetInternalGhostPairCallback(_ghostPairCallback);

            _shape = new BoxShape(2);
            RigidBody staticBox  = _context.AddStaticBody(_shape, Matrix.Translation(0, 0, 0));
            RigidBody dynamicBox = _context.AddBody(_shape, Matrix.Translation(0, 1, 0), 1);

            _ghostObject = new PairCachingGhostObject
            {
                CollisionShape = _shape,
                WorldTransform = Matrix.Translation(2, 2, 0)
            };
            _context.World.AddCollisionObject(_ghostObject);
        }