public bool TryAddVisualizer(IVisualizerFactory visFactory, IAccessor accessor, out IVisualizer vis) { vis = visFactory.Create(Watch, accessor); if (vis != null) { Visualizers.Add((visFactory, vis)); return(true); } return(false); }
public Device( Camera camera, Light light, WriteableBitmap bmp, IVisualizerFactory visualizerFactory) { this.camera = camera; this.light = light; this.bmp = bmp; width = bmp.PixelWidth; height = bmp.PixelHeight; bmpRect = new Int32Rect(0, 0, width, height); backBuffer = new byte[width * height * 4]; depthBuffer = new float[width * height]; visualizer = visualizerFactory.Create(width, height, backBuffer, depthBuffer, light); }