public void SetScheme(MoleculeRenderingScheme scheme, CompleteOutputDescription coDesc) { latestCoDesc = new CompleteOutputDescription(coDesc); sceneManger.SetScheme(scheme); sceneManger.SetOutputDesc(coDesc); scheme.device = device; // build preview via thread if (generatorThread.ThreadState == ThreadState.Running) { // abort thread generatorThread.Abort(); generatorThread.Join(); } generatorThread = new Thread(GeneratePreviewProcess); generatorThread.Start(); wantPreview = true; }
private void OnNewDevice() { if (outSettings != null) { outSettings.CreateDevice(this, out device, out pParams); } if (device != null) { pipeline = new GraphicsFixedPipeline3D(device); deviceFont = new Microsoft.DirectX.Direct3D.Font(device, Font); sceneManger = new MoleculeSceneManager(device, outSettings); BallAndStickRenderingScheme scheme = new BallAndStickRenderingScheme(device); sceneManger.SetScheme(scheme); sceneManger.SetOutputDesc(latestCoDesc); sceneManger.OnNewDataSource(atoms, null, new Vector3(), new Bounds3D(new Vector3(), new Vector3(), 3)); } else { } }
private void OnNewDevice() { if (outSettings != null) outSettings.CreateDevice(this, out device, out pParams); if (device != null) { pipeline = new GraphicsFixedPipeline3D(device); deviceFont = new Microsoft.DirectX.Direct3D.Font(device, Font); sceneManger = new MoleculeSceneManager(device, outSettings); BallAndStickRenderingScheme scheme = new BallAndStickRenderingScheme(device); sceneManger.SetScheme(scheme); sceneManger.SetOutputDesc(latestCoDesc); sceneManger.OnNewDataSource(atoms, null, new Vector3(), new Bounds3D(new Vector3(), new Vector3(), 3)); } else { } }