コード例 #1
0
        internal DirectXScene(DeviceWorker deviceWorker, Body root, Body floor)
        {
            DeviceWorker = deviceWorker;
            RootBody     = root;
            Floor        = floor;      //TODO. get rid of floor by determining intersection
            List <Light> lights =
                SceneConfig.Lights.Select(lightSetting => lightSetting.ToDirectXLight()).ToList();

            DeviceWorker.Disposing += Dispose;
            Effect = new DefaultEffect(DeviceWorker.Device, lights);
            DeviceWorker.AfterReset += Effect.Reset;
            Models        = new Dictionary <Body, DirectXModel>(new BodyComparer());
            _modelFactory = new DirectXModelFactory(DeviceWorker.Device);
        }
コード例 #2
0
 public void SetUp()
 {
     _deviceWorker = new DeviceWorker();
     _device       = _deviceWorker.Device;
     _modelFactory = new DirectXModelFactory(_device);
 }